Skip to main content

Changelog

This changelog is generated automatically from GitHub Releases.

freezebase 0.13.0

2026-11-27 · GitHub

freezebase 0.13 is a bug-fix release.

Changed

  • Breaking: VRT sources must be local, s3:// or http(s):// paths. Before, a path under a GDAL virtual file system, such as /vsitar/tiles.tar/t.tif or /vsimem/t.tif, worked with to_cog and to_raster but failed in reproject or vrt.read, and to_vrt wrote it as a broken relative path. Now from_raster, stack, mosaic, derive, reproject and write_cog raise ValueError for such a path, and so do to_xml, to_vrt, to_cog, to_raster and open for a hand-built Source holding one. Extract the file from its archive, or write the in-memory file to disk, and pass that path. For S3, from_raster("/vsis3/bucket/t.tif") becomes from_raster("s3://bucket/t.tif"), which needs the s3 extra.

Fixed

  • write_cog and VRT.to_cog read COG creation options in any case, as GDAL does. An uppercase key such as "BIGTIFF" or "COMPRESS" was ignored, and an uppercase reprojection option such as "TARGET_SRS" did not raise. When both spellings are given, the later one wins.

freezebase 0.12.0

2026-11-24 · GitHub

freezebase 0.12 makes VRTs chainable: build one step by step, such as vrt.mosaic(tiles).reproject(crs=...), and write it with to_cog, to_raster or to_vrt. GDAL reads the source pixels only when the result is written.

Added

  • VRT.reproject and VRT.derive take the VRT as the source, so steps chain: vrt.mosaic(tiles).reproject(crs=...).derive(...).
  • VRT.to_cog writes a COG like write_cog, and VRT.to_raster writes a single file in any format GDAL can create, such as PNG.
  • New steps: select picks and reorders bands, set changes band names, color interpretation, units and tags, clip_box cuts out a box, and colorize renders one band as RGBA.
  • Printing a VRT summarizes its grid, bands and steps without opening a source; notebooks show it as HTML with a map of its extent. VRT.bounds, res, shape, count, dtypes and nodatavals give the grid and band details as properties.

Changed

  • Breaking: mosaic, stack, derive and reproject nest a copy of a VRT input instead of the object itself. Before, after m = vrt.mosaic([a]), editing a also changed m, and m.sources[0] is a. Now edit a before building m, or edit the copy in m.sources[0].

Deprecated

Fixed

freezebase 0.11.0

2026-11-02 · GitHub

Safer downloads to S3, more recognized file types for uploads, and additional write_cog options.

### Added

  • upload_object(..., content_type=...) sets the file type that S3 reports to browsers, for formats freezebase does not recognize.

Changed

  • Breaking: write_cog raises ValueError for COG options that would reproject the output (target_srs, tiling_scheme, res, extent, zoom_level, zoom_level_strategy, aligned_levels, warp_resampling, add_alpha) instead of ignoring them. Reproject first with freezebase.vrt.warp, then pass the result to write_cog.
  • retry_request keeps the signature of the function it wraps for type checkers. The WrappedFn type variable is removed.

Fixed

  • An interrupted HTTPDownloader download no longer leaves a partial file in an S3 bucket, and keeps any file already there. Downloads to S3 are first saved to a local temporary file, so they need local disk space for the whole file.
  • write_cog applies the num_threads, bigtiff, statistics, nbits, sparse_ok and geotiff_version options instead of ignoring them. For example, num_threads="ALL_CPUS" compresses on all CPU cores.
  • Uploads to S3 declare the right file type for more formats: WebP, GeoPackage and FlatGeobuf, and common ones such as ZIP and PDF. Files downloaded to S3 also get their file type now.

freezebase 0.10.0

2026-10-26 · GitHub

Adds freezebase.errors with DownloadError and RasterWriteError, increases accuracy of MGRS square edges, and includes two small breaking changes to write_cog and rewrite_tiff.

Added

Changed

  • Breaking: write_cog from an array and rewrite_tiff from a file raise ValueError when a per-band sequence (band_names, color_interp, band_tags, units) does not hold one entry per band, as they already did for a VRT. Before, they raised RuntimeError after staging the write. Catch ValueError instead of RuntimeError.
  • Breaking: rewrite_tiff’s band_names and color_interp are keyword-only, as in write_cog. Replace rewrite_tiff(src, dst, profile, names) with rewrite_tiff(src, dst, profile, band_names=names).

Fixed

  • MGRSGrid follows the curved WGS84 edges of its squares to within 5 cm, instead of joining their corners with straight lines that strayed up to 19 m. Points near a square’s edge were assigned to its neighbour, or to no square.

freezebase 0.9.0

2026-10-26 · GitHub

This release adds freezebase.vrt, a pure-Python way to build, inspect and warp GDAL VRTs. MGRS no longer depends on the mgrs package, and Python 3.15 is supported.

Added

  • Python 3.15 support.
  • freezebase.vrt, an editable model of GDAL VRTs (VRT, Band, Source, …) that reads existing VRT files (vrt.read) and writes them (VRT.to_xml, VRT.write). Builders:
    • from_raster: a 1:1 VRT over a raster.
    • stack: combine the bands of rasters on one grid.
    • mosaic: mosaic tiles of any band count, including mixed resolutions.
    • derive: apply a GDAL pixel function.
    • warp: reproject onto an explicit grid, a derived grid or a reference raster’s grid, shifting heights between vertical datums when both CRSs are compound or 3D.
    VRTs can be nested and opened from memory (VRT.open()), and they list the files and credentials they need (VRT.source_files(), VRT.env()).
  • write_cog accepts a VRT or a raster path, and rewrite_tiff accepts a VRT. Both stream through GDAL without loading the data into memory.
  • http:// and https:// paths in rasterio_open and the readers built on it; http_env().
  • vectools.write_parquet writes a GeoDataFrame atomically as zstd-compressed GeoParquet.

Changed

  • mgrs is no longer a dependency: MGRS codes are computed with NumPy and pyproj, and MGRSGrid builds about five times faster.
  • GeoVectorData caches are a quarter to a half smaller. Existing caches stay valid.
  • build_vrt_mosaic accepts multi-band, complex and CRS-less tiles. create_warped_vrt accepts an (x, y) resolution.
  • Breaking: the VRT helpers (build_vrt_mosaic, create_decibel_vrt, create_rgb_vrt, create_rgba_vrt, create_warped_vrt) are built on freezebase.vrt and refuse inputs they used to handle incorrectly:
    • Sources on the VRT’s store are written relative to the VRT (../tiles/a.tif, before /data/tiles/a.tif), except in create_warped_vrt. Move a VRT together with its sources, or write it with VRT.write(path, relative=False).
    • South-up inputs and inputs with a colour table raise ValueError. Warp south-up inputs north-up first, and expand colour tables to RGB(A) first, for example with gdal_translate -expand rgba.
    • create_decibel_vrt and create_rgb_vrt raise ValueError for complex inputs and for inputs with a scale or offset. Convert them to real, physical values first.
    • build_vrt_mosaic takes each band’s colour interpretation from the first tile (before, always gray). It writes the tiles’ scale and offset (before, none) and raises ValueError if the tiles disagree.
    • create_decibel_vrt writes NaN where a source holds its NODATA value. Before, the output held values such as -inf for a NODATA of 0.
    • create_warped_vrt raises ValueError when nodata doesn’t fit the output dtype (before, NaN silently became 0 in uint8). It also raises when PROJ has no exact datum transformation (before, a silent zero shift); install the grids, e.g. via PROJ_DATA. Heights are now shifted between compound or 3D CRSs, and a vertical/2D CRS pair raises ValueError.
  • Breaking: MGRSGeoBox.from_mgrs raises ValueError for every invalid reference. Before, it raised mgrs.core.MGRSError, emitted a RuntimeWarning or returned a wrong square. Catch ValueError instead of MGRSError.
  • Breaking: MGRSGeoBox.from_mgrs normalizes the code it stores: from_mgrs("4QFJ15").mgrs_code is now "04QFJ15" (before, "4QFJ15").

Removed

  • Breaking: merge_tiffs. Mosaic with freezebase.vrt.mosaic instead. Later files win, so reverse the list to keep the old first-wins behaviour:

    # Before
    merge_tiffs(files, "out.tif")
    # After, as a COG
    write_cog(vrt.mosaic(files[::-1], band_names=..., nodata=...), "out.tif")
    # After, as a GTiff with a given profile
    rewrite_tiff(vrt.mosaic(files[::-1]), "out.tif", profile)

    Tiles must agree in nodata, dtype and band count. The min, max, sum and count methods and mem_limit_mb have no replacement.

  • Breaking: MGRSGrid.utm_to_mgrs (undocumented). Read grid.mgrs_codes instead.

  • Breaking: vectools.save_and_read_parquet. Use write_parquet(gdf, path), then gpd.read_parquet(path) if you need the frame.

Fixed

  • Breaking: MGRSGrid fixes three edge cases, which changes some codes and geometries:
    • Zone-31 squares that only touch the 3°E edge of zone 31V (56–64°N) are dropped. Before, they were named after zone-32 squares (e.g. 32VJH22), so codes repeated.
    • Squares straddling 72°N in zones 32, 34 and 36 get band W (32WNE69). Before, they got band X (32XNE69), which those zones don’t have.
    • Squares crossing the antimeridian are split into a two-part MultiPolygon. Before, they became a polygon spanning every longitude, and spurious squares appeared in zones 1–6 and 55–60.

freezebase 0.8.0

2026-09-21 · GitHub

Added

  • upload_object(src, dst) uploads bytes or a local file to an object store, using content_type_for on S3. It reads back the stored size and raises OSError on mismatch. Refused uploads retain their exception class and errno.

Changed

  • S3 integration tests now use RustFS 1.0.0 instead of MinIO, which is archived and whose Docker Hub image is gone.

Fixed

  • write_cog, rewrite_tiff, merge_tiffs, create_warped_vrt and rasterio_open in write modes no longer write through GDAL’s /vsis3/. A gateway rejected GDAL’s unsigned Content-Type with 403 AccessDenied; GDAL warned without raising, so writes silently stored nothing. Uploads now use s3fs, which signs the headers and raises on refusal. atomic_write_text and the VRT XML writers use the same upload path on S3.
  • rasterio_open in S3 write modes ("w", "w+", "r+") stages a local copy and uploads it on clean close. A failed write leaves the object untouched.

freezebase 0.7.1

2026-09-08 · GitHub

Added

  • freezebase.settings.S3Settings reads a profile, an optional endpoint and the two botocore checksum policies from prefixed environment variables (S3Settings.from_env("MYAPP_S3_")), and resolve_path turns a local path or an s3:// URI into a Path or a configured UPath. It replaces the copies of this class downstream packages carried. pydantic-settings joins the s3 extra.
  • configured_endpoint_url(profile) performs botocore’s own configured endpoint lookup (AWS_ENDPOINT_URL_S3, AWS_ENDPOINT_URL, the services section, the profile’s endpoint_url, honouring ignore_configured_endpoint_urls), cached per profile and cleared by clear_aws_session_cache. resolve_endpoint_url(path) returns the endpoint a path’s requests go to: an endpoint_url on the path, else one inside client_kwargs, else the configured one — the same precedence s3fs applies.
  • list_object_sizes(directory, recursive=...) lists a prefix as {relative path: size} from one listing call, on any fsspec filesystem, skipping zero-byte folder-marker keys. A missing prefix lists as empty.
  • atomic_write_text(path, text) writes through a renamed sibling on the local filesystem and as one put on an object store.
  • CONTENT_TYPES and content_type_for(path) give the media type a cloud-native geospatial object should be served as, by suffix.
  • file_sha256 accepts a UPath and streams a remote file in chunks.

Fixed

  • s3_env and subprocess_s3_env point GDAL at the endpoint the path’s AWS configuration sets when the path carries no explicit endpoint_url. Before, a path built from a profile whose config section sets endpoint_url sent s3fs to that gateway and GDAL to AWS; the same held for AWS_ENDPOINT_URL with explicit credentials.
  • subprocess_s3_env now hands the child the same GDAL reader configuration s3_env applies in-process (GDAL_DISABLE_READDIR_ON_OPEN=EMPTY_DIR and the HTTP retry settings). Before, a child process listed the directory of every /vsis3/ object it opened. Both builders read the new GDAL_S3_OPTIONS table, so they cannot drift apart again. An S3 path without a profile or endpoint therefore no longer yields an empty mapping.

freezebase 0.7.0

2026-09-04 · GitHub

Added

  • write_cog takes a checksum keyword. When True, it returns the SHA-256 of the written bytes as a multihash ("1220" + hex) instead of None.
  • subprocess_s3_env builds the S3 environment variables a child process needs to open /vsis3/ paths.
  • create_warped_vrt reprojects a raster onto a fixed target grid, and create_rgba_vrt colour-maps a raster into a 4-band VRT via per-band lookup tables.
  • build_vrt_mosaic takes a bounds keyword to fix the mosaic extent, and no longer requires tiles to live beside the output VRT.

freezebase 0.6.1

2026-08-31 · GitHub

Fixed

  • write_cog now applies caller-supplied COG creation options to the finished COG instead of silently discarding them. Its intermediate GTiff remains losslessly compressed, avoiding double quantization for lossy codecs such as LERC.

freezebase 0.6.0

2026-08-25 · GitHub

Added

  • write_cog and rewrite_tiff take tags, band_tags and units, writing dataset-level tags, per-band tags and band unit strings. All three are keyword-only and default to None, so existing calls are unchanged.

Fixed

  • rewrite_tiff no longer loses LAYOUT: COG when a non-GTiff destination carries band descriptions, tags, band tags or units. All of those live in the GDAL_METADATA TIFF tag, which grows when written into a finished file and is relocated behind the image data; they now go into an intermediate GTiff so the driver copy writes the final layout around them.
  • Every per-band sequence (band_names, color_interp, band_tags, units) is now rejected if it does not match the band count.
  • The s3 extra now requires s3fs>=2026.7.0. Earlier versions cache a prefix-filtered listing under the unfiltered directory key (fsspec/s3fs[#1034](https://github.com/lqgentner/freezebase/issues/1034)), so a single glob("prefix*") makes every later listing miss files.

freezebase 0.5.0

2026-08-24 · GitHub

Added

  • Python 3.14 support
  • freezebase.__version__, read from the installed distribution metadata.

Fixed

  • HTTPDownloader now closes the streamed response on every path out of a download, not only on the successful one.

freezebase 0.4.0

2026-08-17 · GitHub

Added

  • HTTPDownloader.close() and context-manager support, which close the downloader’s session and release its pooled connections. Creating one downloader per download previously held a connection open until the garbage collector ran, which made downstream test suites fail unpredictably. The session is also closed on garbage collection as a fallback.

Changed

  • Breaking: HTTPDownloader no longer forwards arbitrary keyword arguments to requests. method and timeout are now named parameters and are spelled exactly as before, so calls that only used those keep working; method is restricted to "GET" and "POST". Any other requests keyword, such as params or headers, now raises TypeError instead of reaching the request. To configure the transport, for example a connection pool size, mount an adapter on HTTPDownloader.session.

freezebase 0.3.0

2026-08-05 · GitHub

This release marks the first release of freezebase on PyPI!

Added

  • Per-path named AWS profile support in make_s3_upath. Combinable with a custom endpoint_url, mutually exclusive with anon=True and explicit key/secret/token. Setting a profile takes environment credentials out of boto’s resolution chain, so the path signs with the profile’s keys only.
  • aws_session, returning the cached Rasterio AWSSession for an S3 path, and clear_aws_session_cache to discard those sessions. Prefer aws_session over constructing an AWSSession directly, so every layer signs identically.

Changed

  • Renamed the package to freezebase, to allow publication on PyPI under the same name. The import path, PyPI distribution name, FREEZEBASE_CACHE/FREEZEBASE_DATA environment variables, and the GitHub repository all changed accordingly; there is no compatibility shim for the old names.
  • s3_env reuses a cached AWSSession per distinct S3 configuration instead of building one per call. Constructing a session resolves boto’s whole credential chain eagerly, and s3_env is entered on every raster operation, so a profile-authenticated path previously re-read the shared credentials file for every raster read and write. Refreshable STS/SSO credentials still rotate, because Rasterio re-freezes them on each Env entry; static credentials rewritten mid-process now need clear_aws_session_cache.
  • make_s3_upath rejects credentials in client_kwargs, which reach s3fs but not s3_env.