Skip to content

v0.11.0

Latest

Choose a tag to compare

@github-actions github-actions released this 01 Dec 00:32
· 80 commits to main since this release
cb7c709

Highlights

  • Hyperspectral imagery, end to end: lazy inspection, wavelength selection, spatial cropping, EMIT GLT orthorectification, spectral signatures, and GeoTIFF/COG/NetCDF-4/Zarr export for EMIT, PACE OCI, NEON AOP, PRISMA L2D, Planet Tanager, AVIRIS, EnMAP, DESIS and Wyvern, in Rust, the CLI/MCP, Python and WebAssembly (#1416).
  • Remote vector data by range requests: a remote GeoPackage is no longer downloaded whole: a bbox read fetches 0.45 to 11.7 MiB instead of 146 to 236 MiB, 2.2 to 3.7 times fewer bytes than GDAL 3.13.3 over /vsicurl/ (#1371). Indexed remote FlatGeobuf bbox reads fetch only the header, index nodes and matching features (#1328), and SQL on remote GeoParquet skips row groups by statistics and prefetches ahead (#1303, #1370).
  • Faster, leaner local vector reads: a GeoPackage WHERE query is about 3 times faster and peaks at about 120 MB instead of 0.9 to 1.7 GB (#1393); R-tree bbox reads read 15 to 92 times fewer bytes on Hilbert-ordered rows (#1356); FlatGeobuf bbox reads without an index peak at about 70 MB instead of 570 to 760 MB (#1328); Shapefile filters use the .qix index (#1424). Converting a 38 GB, 10.8 million feature GeoPackage to PMTiles or MBTiles no longer exhausts memory (#1306).
  • Faster raster reads:
    • Remote GeoTIFF tiles decode on the worker threads, up to 2.5 times faster (JPEG 266 to 132 ms, WebP 473 to 191 ms) (#1324), and concurrent readers of one remote file share requests in flight (#1389).
    • A whole 4096 x 4096 Float32 LERC_ZSTD COG reads in 0.57 of its former time (#1321), JPEG decodes faster (#1390), and a whole Sentinel-2 B04 COG read peaks at 340 MB instead of 552 MB (#1368).
    • Blosc Zarr decodes faster with AVX2 shuffles (#1317, #1391), and sharded Zarr windows read the same bytes as GDAL (#1367).
  • Faster operations: coverage cleaning of 3,600 overlapping polygons takes about 0.7 s instead of 24 to 29 s (#1348), and calc, layer_algebra, polygon rasterization and the RPC transformer's DEM do less work (#1310, #1349, #1359, #1420).
  • Progress, cancellation and control: warps report progress and can be cancelled from Rust, Python and JavaScript (#1397, #1428); terrio::set_max_threads sets the native worker budget (#1417); LazyRaster gains GDAL-style metadata accessors and approx_min_max (#1307, #1347, #1396); TLS failures are reported as Error::Tls, and TERRIO_HTTP_UNSAFESSL turns off certificate checks as GDAL does (#1394, #1398).
  • Smaller COGs that match GDAL: three-band JPEG COGs are written as YCbCr like GDAL's COG driver, 3.3 MB instead of 12.5 MB on a 4096 x 4096 RGB fixture (GDAL: 2.7 MB), and the COG writer takes LEVEL (#1333).
  • terrio-crs 0.3.1: lookup_crs finds one CRS without building the catalog (#1423), and geocentric and geographic 3D CRSs, prime-meridian chains, ballparks and BOUNDCRS follow PROJ 9.9.0 (#1301, #1308, #1350, #1362, #1418, #1433, #1434).
  • A security hardening sweep across SQLite/GeoPackage, .gdalg.json, JPEG, Zarr, point clouds, PMTiles, TopoJSON, remote and cloud inputs, and CLI, Python, JavaScript and web arguments (#1318, #1320, #1322, #1343, #1373, #1403).
  • Behavior changes:
    • Three-band Byte JPEG COGs are written as YCbCr; pass PHOTOMETRIC=RGB to keep RGB (#1333).
    • CLI: options taking several values in one occurrence (--srcwin, --tr, --te, --spat and the like) refuse a second occurrence instead of concatenating the values (#1346).
    • Python: terrio.rio.stack(dst_path=writer) no longer closes a writer the caller passed; close it yourself (#1401).
    • Average and RMS translations of paletted rasters with partial coverage, a type change, scaling or exponents return Unsupported instead of averaging palette indices (#1409).
    • Loaded GDALG definitions discard embedded write destinations by default, and remote VRT definitions are bounded, may not name local sources and need consent to use ambient credentials (#1373).

See CHANGELOG.md for the full list.

What's Changed

  • terrio-crs: geocentric and geographic 3D CRSs by PROJ's transformations for each direction by @pick2510 in #1301
  • docs(playground): update terrio-js to 0.10.0 by @giswqs in #1304
  • feat(tiles): stream vector PMTiles/MBTiles/MVT writing with external spill and per-layer CONF by @giswqs in #1306
  • perf(layer-algebra): reuse cached polygon area masks and skip unused union by @giswqs in #1310
  • perf(sql): a WHERE query on a remote GeoParquet file skips row groups too by @nkarasiak in #1303
  • fix(ops): resolve edge-case panics, U64 proximity, SQL 3VL, and band nodata bugs by @giswqs in #1309
  • perf(crs): the first EPSG lookup indexes an embedded table without decompressing it by @nkarasiak in #1319
  • cog: LazyRaster::approx_min_max, GDAL's approximate band min/max over lazy reads by @tapiab in #1307
  • Harden cloud URL, VSI archive, Zarr, JPEG 2000, NetCDF, and HDF5 I/O by @giswqs in #1318
  • bench(perf-matrix): FlatGeobuf reads against GDAL by @nkarasiak in #1323
  • perf(gtiff): faster LERC, LZW and floating-point predictor decoding by @nkarasiak in #1321
  • Harden vector, point cloud, and tile readers against malformed inputs by @giswqs in #1320
  • fix(xarray): an unreadable CRS raises instead of reading as no CRS by @nkarasiak in #1335
  • bench(perf-matrix): GeoPackage vector reads against GDAL by @nkarasiak in #1326
  • perf(flatgeobuf): bbox reads keep only the features they intersect, read remote indexes by range and local ones unbuffered by @nkarasiak in #1328
  • perf(par): a serial outside call no longer keeps other outside calls off the pool by @nkarasiak in #1332
  • perf(zarr): Blosc blocks unshuffled 3-4x faster, decompressed into the chunk without intermediate copies by @nkarasiak in #1317
  • fix(cog): YCbCr JPEG COGs by default, the COG LEVEL option, and GDAL colour interpretations under RGB/YCbCr by @nkarasiak in #1333
  • bench(perf-matrix): threaded reads at 1, 2, 4 and 8 threads; values compared by a hash of every value by @nkarasiak in #1327
  • test(zarr): run the URL-delimiter node fixture on Windows by @giswqs in #1340
  • terrio-crs: the open items of #1012 as PROJ 9.9.0 and GDAL read them by @pick2510 in #1308
  • bench(perf-matrix): COG, GeoTIFF and GeoParquet writes against GDAL by @nkarasiak in #1329
  • bench(perf-matrix): warp, terrain, proximity and calc against GDAL by @nkarasiak in #1330
  • Fix CLI, UI/MCP, Python, JS/WASM, and web path bugs by @giswqs in #1322
  • perf(gtiff): GeoTIFFs read over HTTP decode on the worker threads; faster JPEG output stage and IDCT by @nkarasiak in #1324
  • fix(overview): external average overviews match GDAL for masked cascades and requested existing levels by @nkarasiak in #1336
  • terrio-crs: bound grid TIFF decoding, downloads, scratch files and subgrid depth by @giswqs in #1344
  • fix(sqlite): reject cyclic overflow chains and aliased leaf cell pointers by @lyn1dev in #1343
  • perf(coverage-clean): index face-to-source, gap-border and hole-to-shell lookups by @giswqs in #1348
  • fix(js): keep NaN/Infinity nodata options instead of dropping them to null by @giswqs in #1345
  • fix(cli): multi-value options take a single occurrence (ArgAction::Set) by @giswqs in #1346
  • fix(cog): approx_min_max honors the mask band when a band has no nodata by @giswqs in #1347
  • terrio-crs: #1012 leftovers: PROJ ballpark names, ESRI Lo zones, GeoKeys codes as GDAL by @pick2510 in #1350
  • fix(rio): CRS.from_user_input reads a NumPy integer as an EPSG code by @nkarasiak in #1351
  • fix(python): combine transforms without @, which affine 2 lacks by @nkarasiak in #1352
  • fix(png,jpeg): warn when a write converts a type the format cannot hold by @nkarasiak in #1353
  • fix(par): reads from a caller's rayon pool no longer nest while they wait on terrio's pool by @nkarasiak in #1354
  • perf(geopackage): a streamed bbox read reads each page on the way to its rows once by @nkarasiak in #1356
  • fix(gtiff): JPEG XL tiles with long uniform runs are written decodable by @nkarasiak in #1358
  • perf(calc): borrow arrays, pick each loop once and write chunks into the output by @nkarasiak in #1359
  • bench(perf-matrix): a second GDAL reference configuration, default cache and ALL_CPUS by @nkarasiak in #1357
  • terrio-crs: ballpark vertical transformations named as PROJ by @pick2510 in #1362
  • bench(perf-matrix): real data: Sentinel-2 COGs with nodata, sparse tiles and a mask band, a big-endian DEM and a large GeoParquet by @nkarasiak in #1360
  • bench(perf-matrix): --source cold reads the local file dropped from the page cache before each sample by @nkarasiak in #1361
  • rpc: read the DEM lazily, block by block, instead of whole by @tapiab in #1349
  • perf(crs): the first EPSG lookup indexes CRS lines with boxed entries and scans them in table order by @nkarasiak in #1364
  • bench(perf-matrix): a worker's peak memory is its own VmHWM, not ru_maxrss carried over from the runner by @nkarasiak in #1363
  • perf(zarr): sharded windows read only their inner chunks; an open array keeps the chunks windows share by @nkarasiak in #1367
  • bench(perf-matrix): rasterize and zonal statistics against GDAL by @nkarasiak in #1365
  • bench(perf-matrix): polygonize and contour against GDAL, features matched by value and vertices by @nkarasiak in #1366
  • perf(geotiff): a whole-image read keeps its chunks out of the block cache by @nkarasiak in #1368
  • bench(perf-matrix): Shapefile reads against GDAL, with and without a .qix, UTF-8 and LATIN1 by @nkarasiak in #1369
  • perf(geopackage): stream a remote GeoPackage by range requests by @nkarasiak in #1371
  • perf(geoparquet): a remote read announces row groups ahead of its windows by @nkarasiak in #1370
  • docs: neutral names for zonal examples, benchmarks and tests by @nkarasiak in #1372
  • fix: isolate saved pipeline outputs and remote VRT sources by @giswqs in #1373
  • perf(jpeg): range limit without branches, table colour conversion and bounds-check-free upsampling by @nkarasiak in #1390
  • perf(zarr): Blosc blocks unshuffled in AVX2 where the CPU has it by @nkarasiak in #1391
  • perf(http): readers of a remote file share the requests in flight by @nkarasiak in #1389
  • perf(geotiff): pixel-interleaved reads at 16+ threads copy chunks into bands on threads of their own by @nkarasiak in #1392
  • perf(geopackage): a WHERE query on a GeoPackage on disk filters rows as it streams the table by @nkarasiak in #1393
  • fix(gml): read repeated and maxOccurs properties as GDAL's list fields (#1374) by @rvalavi in #1388
  • fix(core): fix EWKB SRID, rasterize clipping, HFA I8 nodata, PNG, HTTP, and calc round by @giswqs in #1400
  • feat(cog): metadata_item/band_metadata_item, public band_data_type, band metadata and NBITS for lazy TIFFs by @tapiab in #1396
  • fix(crs): harden grid search paths, TIFF grid parsing, units, and GeoKeys by @giswqs in #1399
  • fix(python): fix xarray merge/squeeze, rio VRT/merge/stack/env/features, pyogrio, and overflow checks by @giswqs in #1401
  • fix(io): harden resource bounds and remote policy checks across parsers by @giswqs in #1403
  • feat(warp): WarpOptions.progress callback, which can cancel the warp by @tapiab in #1397
  • fix(gpkg): preserve the JSON subtype of text fields by @rvalavi in #1405
  • feat(gcp): GcpTransformer::residuals and ::rms over a GCP set by @tapiab in #1395
  • feat(error): Error::Tls for TLS handshake/certificate failures by @tapiab in #1394
  • fix(vrt): honor source nodata and masks in resampled reads (#1386) by @rvalavi in #1406
  • feat(http): opt-in TERRIO_HTTP_UNSAFESSL / GDAL_HTTP_UNSAFESSL switch for HTTPS by @tapiab in #1398
  • ci(review): set allow_fork_prs so Claude keeps reviewing and fixing fork PRs by @giswqs in #1410
  • fix(ci): gate Linux-only PLY test module by @giswqs in #1412
  • fix(ci): make HTTP regression fixtures portable on Windows by @giswqs in #1415
  • Add optional hyperspectral data I/O feature (HyperCoast backend support) by @giswqs in #1416
  • fix(js): return SpectralCube shape as numbers on the memory64 module by @giswqs in #1425
  • test(js): check selectBandIndices picks the requested wavelengths by @giswqs in #1426
  • ci(perf-matrix): install affine in runner env and split long PR comments by @nkarasiak in #1422
  • fix(crs): preserve coordinate bits through null geographic operations by @gisflw in #1418
  • perf(tiff): cache packed internal mask chunks by @gisflw in #1419
  • perf(crs): direct lookup_crs and lazy CRS catalog parsing by @nkarasiak in #1423
  • perf(rasterize): use active edges for polygon scanlines by @gisflw in #1420
  • feat: expose a native worker budget for Rust applications by @gisflw in #1417
  • fix(raster): use palette colors for Average and RMS window reads (#1387) by @rvalavi in #1409
  • perf(shapefile): filter by .qix quadtree index and record bounding boxes by @nkarasiak in #1424
  • Expose warp progress in Python and JavaScript by @giswqs in #1428
  • fix(python): choose WarpedVRT source windows without the GIL and check GIL stalls directly by @giswqs in #1431
  • fix(vector): match GDAL feature IDs in KML, MIF and CSV by @gezerui888 in #1430
  • fix(crs): list PROJ's geographic ballpark beside ballpark vertical transformations by @pick2510 in #1433
  • fix(crs): keep heights through a chain with a prime meridian rotation by @pick2510 in #1434
  • bench(perf-matrix): GeoJSON, GeoJSONSeq and CSV reads against GDAL by @nkarasiak in #1436
  • bench(perf-matrix): FlatGeobuf and GeoPackage writes against GDAL by @nkarasiak in #1435
  • bench(perf-matrix): reproject, simplify, clip and buffer against GDAL by @nkarasiak in #1437
  • bench(perf-matrix): Zarr v2 and v3 writes against GDAL by @nkarasiak in #1438
  • bench(perf-matrix): GeoPackage tiles, PNG and WebP reads against GDAL by @nkarasiak in #1439
  • Release 0.11.0 by @giswqs in #1440

New Contributors

Full Changelog: v0.10.0...v0.11.0

Credits

terrio does not need GDAL to be installed, but it is not independent of GDAL: its commands, options and behavior follow GDAL's, many of its algorithms and drivers are ports of GDAL code, its results are tested against GDAL, PROJ and PDAL, and GDAL is its optional backend. This release ports code from, adapts, or is built on:

  • GDAL (Frank Warmerdam, Even Rouault and hundreds of contributors): the design of terrio's commands and the reference it is tested against. New in this release: Average and RMS reads of paletted rasters are adapted from GDAL 3.13.3's gcore/overview.cpp (GDALResampleChunk_AverageOrRMS_T and BestColorEntry); YCbCr JPEG COGs, color interpretation on write, approx_min_max, external average overviews of masked rasters, TERRIO_HTTP_UNSAFESSL, VRT source nodata and GML list properties follow GDAL 3.13.3; and the performance matrix now compares reads, writes and operations across a dozen formats with GDAL 3.13.3.
  • PROJ: the map projections and datum transformations. New in this release: geocentric and geographic 3D CRSs, heights through prime-meridian rotations, ballparks and their names, and BOUNDCRS chains follow PROJ 9.9.0.
  • HyperCoast and NASA EMIT-Data-Resources: New in this release: the hyperspectral sensor readers and wavelength tables derive from HyperCoast (MIT), and the EMIT GLT orthorectification and band quality-mask unpacking adapt EMIT-Data-Resources' emit_tools.py through HyperCoast (Apache-2.0).
  • zune-jpegxl (zune-image developers): New in this release: the JPEG XL encoder for GeoTIFF tiles adapts zune-jpegxl 0.5.2 with a fix from a later zune-image commit (MIT).
  • rasterio, rioxarray, xarray and pyogrio: the APIs terrio.rio, terrio.xarray and terrio.pyogrio follow. New in this release: merge_arrays, open_rasterio(band_as_variable=True), rotated WarpedVRT, rio.merge, rio.stack, rio.setenv and rio.features.rasterize match them in more edge cases.

Thanks to everyone who contributed code to this release: @gezerui888, @lyn1dev, @nkarasiak, @pick2510, @rvalavi, @sigflw and @tapiab.

Copyright and license notices are in NOTICE, and the acknowledgements page lists every project. If terrio is useful to you, please consider sponsoring GDAL.