opengeos / terrio
git clone https://github.com/opengeos/terrio.git
v0.3.2 · today
Pure-Rust geospatial raster and vector data I/O
—
stars, 24h
+45
stars, 7 days · #983
+45
stars, 30 days · #6,547
45
★ total · +45% this week
2
forks · 17 open issues
Star history starts 2026-10-20; the chart appears after the second daily snapshot.
LanguageRust
LicenseMIT
Created2026-10-14 (6d ago)
Last pushtoday
Watchers1
OwnerOrganization
GitHub topics
Links
- GitHub: github.com/opengeos/terrio
- Homepage: https://terrio.opengeos.org
- Releases · Issues · Hacker News mentions
README excerpt
# terrio
Pure-Rust geospatial raster, vector and point cloud data I/O.
Documentation:
terrio aims to read, write, convert and reproject the geospatial formats most workflows use, without
C dependencies, so that it builds anywhere Rust does, including WebAssembly.
**Status:** early development. Reading, writing and converting work; the processing operations are
in progress. See ROADMAP.md.
terrio builds on the pure-Rust format libraries of
whitebox_next_gen (`wbraster`, `wbvector`,
`wbprojection`) and adds format detection, remote and archived inputs, a GeoTIFF reader built on
the `tiff` crate, fixes for what the format libraries miss, and
GDAL-style operations.
Coordinate transformations match GDAL's: terrio carries the EPSG CRSs with the coordinate
operations GDAL uses for them (generated from GDAL and PROJ by `scripts/gen_epsg_table.py`) and
pure-Rust ports of the projections they need. For each of the 6,354 EPSG geographic and projected
CRSs GDAL 3.12 transforms, transformations from and to WGS 84 agree with GDAL's within a
centimetre, and 99 % of a sample of transformations between two CRSs within a metre (see
`crates/terrio/tests/epsg_accuracy.rs`).
## Command line
Install the `terrio` command, a standalone binary, with:
[code]
`pip install terrio` installs it too, and `cargo install terrio-cli` builds it from source (see
Installation).
[code]
`terrio mcp` serves the commands to AI agents (Claude Code, Claude Desktop, Cursor, VS Code) over
the Model Context Protocol: `claude mcp add terrio -- terrio mcp` (see
AI Agents).
## Library
[code]
Remote reads are configured with environment variables: `AWS_ACCESS_KEY_ID`,
`AWS_SECRET_ACCESS_KEY`, `AWS_SESSION_TOKEN`, `AWS_PROFILE`, `AWS_REGION`, `AWS_NO_SIGN_REQUEST`
and `AWS_S3_ENDPOINT` for S3; `AZURE_STORAGE_ACCOUNT` and `AZURE_STORAGE_SAS_TOKEN` for Azure;
`TERRIO_HTTP_TIMEOUT`, `TERRIO_HTTP_MAX_RETRY` and `TERRIO_HTTP_LOG` (and more, see the `http`
module) for HTTP.
Datasets can also be opened from bytes and written to bytes (`terrio::memory`), for data
already in memory and for WebAssembly, which has no file system.
An optional GDAL backend (the `gdal` cargo feature, off by default and the only C dependency)
opens what terrio has no driver for (HDF4, GRIB, NITF and the rest of GDAL's formats)
into the same data model, and writes rasters with GDAL's drivers: `terrio::open("GDAL:file.hdf")`,
`terrio info --driver gdal`, or a plain path when terrio's own drivers cannot open it.
Point clouds are read into columns, one typed vector per dimension (`terrio::pointcloud`):
[code]
LAZ compression comes from the pure-Rust `laz` crate (the codec of
laspy's `lazrs` backend); terrio reads and writes the LAS container, extra bytes, CRS records and
COPC octrees itself.
## Python
[code]
[code]
The operations (`convert`, `translate`, `warp`, `mosaic`, `rasterize`, `polygonize`, `dem`,
`calc`, `proximity`, `sieve`) take the command-line options as keyword arguments. See
python/README.md.
rasterio sc