Skip to content

Acknowledgements

terrio stands on the work of many projects and their authors. Thank you to all of them.

Disclaimer

terrio is primarily built with Claude Opus 5.5, an AI model by Anthropic, working under human direction and review. Its results are tested against GDAL, PROJ and PDAL, but check them for your own use, and please report anything that looks wrong.

Whitebox

terrio began on the pure-Rust format libraries of whitebox_next_gen by John Lindsay: wbraster, wbvector and wbprojection. They still read and write many of the formats terrio supports, and they made a C-free geospatial library in Rust a realistic goal.

GDAL, PROJ and PDAL

GDAL, PROJ and PDAL are the reference terrio measures itself against. Its commands, options and outputs follow GDAL's and PDAL's, and its tests compare its results with theirs, pixel for pixel and point for point.

  • The map projections in crates/terrio/src/crs/ are ported from PROJ (MIT licence). The ellipsoidal gnomonic, as PROJ's, uses Charles Karney's geodesic algorithms, from geographiclib-rs (MIT licence), a port of GeographicLib.
  • The EPSG table, with the coordinate operations GDAL uses for each CRS, is generated with GDAL and PROJ by scripts/gen_epsg_table.py, the ESRI table, from PROJ's ESRI authority, by scripts/gen_esri_table.py, and the datum names by scripts/gen_datum_names.py.
  • The point cloud filters follow PDAL's (filters.csf, filters.pmf, filters.elm, filters.hag_nn, filters.normal and others); the cloth simulation filter is a port of the CSF code PDAL vendors (Apache-2.0, copyright the State Key Laboratory of Remote Sensing Science, Beijing Normal University), after Zhang et al. (2016), An Easy-to-Use Airborne LiDAR Data Filtering Method Based on Cloth Simulation.

The EPSG dataset and Esri's projection data

terrio's EPSG table and datum names (crates/terrio/data/epsg.tsv.zst and datums.tsv.zst) are derived from the EPSG Geodetic Parameter Dataset, copyright the International Association of Oil & Gas Producers (IOGP), whose terms of use permit their redistribution with this attribution.

Its ESRI table (crates/terrio/data/esri.tsv.zst) and the ESRI datum names are derived, through PROJ's database, from Esri's projection engine data, copyright Esri, under the Apache License 2.0.

Python APIs

terrio's Python package borrows its shape from rasterio, xarray and rioxarray, so that code written for them carries over. terrio.rio follows rasterio's API and several of its algorithms (BSD-3-Clause, copyright Mapbox), and terrio.xarray is adapted from rioxarray (Apache-2.0).

Pure-Rust codecs and format crates

terrio reads and writes its formats with these crates, among others:

Crate For
tiff, png, image-webp, weezl (image-rs) TIFF, PNG and WebP, LZW
jpeg-decoder, jpeg-encoder JPEG
openjp2 JPEG 2000, a port of OpenJPEG
rusty_av1d AVIF, a port of dav1d
jxl-oxide, zune-jpegxl JPEG XL
lerc-reader, lerc-writer LERC
flate2, ruzstd, zstd, lz4_flex, lzma-rust2, zip Compression and archives
flatgeobuf FlatGeobuf
Apache Arrow and Parquet GeoParquet and Arrow
netcdf-reader, hdf5-reader netCDF and HDF5
osmpbfreader OpenStreetMap PBF
quick-xml KML, GPX and other XML formats
laz LAZ and COPC, a port of LASzip
e57 E57 laser scans
delaunator Delaunay triangulation

Tooling

clap parses the command line, rayon runs it in parallel, ureq fetches remote data, serde handles JSON, PyO3 and rust-numpy build the Python package, and wasm-bindgen builds the JavaScript one. The optional gdal feature uses the gdal crate.

JPEG writing (through jpeg-encoder) is based in part on the work of the Independent JPEG Group.

Notices and licenses

NOTICE holds the copyright and license notices of the code and data terrio adapts (PROJ, CSF, the EPSG dataset, Esri's projection data, rasterio, rioxarray, Apache Arrow and the IJG), and LICENSE-THIRD-PARTY.md the licenses of every Rust crate terrio's packages and binaries are built with, generated with cargo-about. Both ship with the Python wheels, the npm package and the command-line archives.

The full list of dependencies is in Cargo.toml and Cargo.lock. If your work is missing here, please open an issue.