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://orhttp(s)://paths. Before, a path under a GDAL virtual file system, such as/vsitar/tiles.tar/t.tifor/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 raiseValueErrorfor 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")becomesfrom_raster("s3://bucket/t.tif"), which needs thes3extra.
Fixed
- write_cog and VRT.to_cog read
COGcreation 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
Deprecated
vrt.warpis renamed vrt.reproject, andVRT.writeis renamed VRT.to_vrt. The old names still work but emit aDeprecationWarning.- build_vrt_mosaic, create_warped_vrt, create_decibel_vrt, create_rgb_vrt and create_rgba_vrt emit a
DeprecationWarningthat names the replacement: build the VRT with the steps above, then write it with to_vrt. For example,build_vrt_mosaic(files, out)becomesvrt.mosaic(files).to_vrt(out).
Fixed
- write_cog and rewrite_tiff raise RasterWriteError for a CRS that GeoTIFF cannot store, such as UTM with ellipsoidal heights, instead of writing a file without a CRS.
- write_cog and rewrite_tiff no longer leave a hidden
.aux.xmlfile behind. - MGRSGeoBox.crs is typed as
CRSrather thanCRS | None.
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
ValueErrorforCOGoptions 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 withfreezebase.vrt.warp, then pass the result to write_cog. - retry_request keeps the signature of the function it wraps for type checkers. The
WrappedFntype 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_okandgeotiff_versionoptions 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
freezebase.errorswith FreezebaseError, the base of freezebase-specific errors, DownloadError and RasterWriteError. WhereRuntimeErrorwas raised before:- HTTPDownloader raises DownloadError (a response that is not a file, a redirect without a host, too many redirects, no inferable filename).
- write_cog and rewrite_tiff raise RasterWriteError when the write fails.
RuntimeError, so existingexcept RuntimeErrorhandlers keep working.
Changed
- Breaking: write_cog from an array and rewrite_tiff from a file raise
ValueErrorwhen 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 raisedRuntimeErrorafter staging the write. CatchValueErrorinstead ofRuntimeError. - Breaking: rewrite_tiff’s
band_namesandcolor_interpare keyword-only, as in write_cog. Replacerewrite_tiff(src, dst, profile, names)withrewrite_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.
- 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://andhttps://paths in rasterio_open and the readers built on it; http_env().- vectools.write_parquet writes a GeoDataFrame atomically as zstd-compressed GeoParquet.
Changed
mgrsis 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.vrtand 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 withVRT.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 withgdal_translate -expand rgba. - create_decibel_vrt and create_rgb_vrt raise
ValueErrorfor 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
ValueErrorif the tiles disagree. - create_decibel_vrt writes NaN where a source holds its NODATA value. Before, the output held values such as
-inffor a NODATA of 0. - create_warped_vrt raises
ValueErrorwhen nodata doesn’t fit the output dtype (before, NaN silently became 0 inuint8). It also raises when PROJ has no exact datum transformation (before, a silent zero shift); install the grids, e.g. viaPROJ_DATA. Heights are now shifted between compound or 3D CRSs, and a vertical/2D CRS pair raisesValueError.
- Sources on the VRT’s store are written relative to the VRT (
- Breaking: MGRSGeoBox.from_mgrs raises
ValueErrorfor every invalid reference. Before, it raisedmgrs.core.MGRSError, emitted aRuntimeWarningor returned a wrong square. CatchValueErrorinstead ofMGRSError. - Breaking: MGRSGeoBox.from_mgrs normalizes the code it stores:
from_mgrs("4QFJ15").mgrs_codeis 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,sumand count methods andmem_limit_mbhave no replacement.Breaking:
MGRSGrid.utm_to_mgrs(undocumented). Readgrid.mgrs_codesinstead.Breaking:
vectools.save_and_read_parquet. Usewrite_parquet(gdf, path), thengpd.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.
- 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.
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 raisesOSErroron mismatch. Refused uploads retain their exception class anderrno.
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 unsignedContent-Typewith403 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 ans3://URI into aPathor a configuredUPath. It replaces the copies of this class downstream packages carried.pydantic-settingsjoins thes3extra. configured_endpoint_url(profile)performs botocore’s own configured endpoint lookup (AWS_ENDPOINT_URL_S3,AWS_ENDPOINT_URL, theservicessection, the profile’sendpoint_url, honouringignore_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: anendpoint_urlon the path, else one insideclient_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
UPathand 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 setsendpoint_urlsent s3fs to that gateway and GDAL to AWS; the same held forAWS_ENDPOINT_URLwith 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_DIRand the HTTP retry settings). Before, a child process listed the directory of every/vsis3/object it opened. Both builders read the newGDAL_S3_OPTIONStable, 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
checksumkeyword. WhenTrue, it returns the SHA-256 of the written bytes as a multihash ("1220"+ hex) instead ofNone. - 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_tagsandunits, writing dataset-level tags, per-band tags and band unit strings. All three are keyword-only and default toNone, so existing calls are unchanged.
Fixed
- rewrite_tiff no longer loses
LAYOUT: COGwhen 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
s3extra now requiress3fs>=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 singleglob("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.methodandtimeoutare now named parameters and are spelled exactly as before, so calls that only used those keep working;methodis restricted to"GET"and"POST". Any otherrequestskeyword, such asparamsorheaders, now raisesTypeErrorinstead of reaching the request. To configure the transport, for example a connection pool size, mount an adapter onHTTPDownloader.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 withanon=Trueand explicitkey/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
AWSSessionfor an S3 path, and clear_aws_session_cache to discard those sessions. Prefer aws_session over constructing anAWSSessiondirectly, 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_DATAenvironment variables, and the GitHub repository all changed accordingly; there is no compatibility shim for the old names. - s3_env reuses a cached
AWSSessionper 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 eachEnventry; 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.