geolith-cli 0.4.2

Rust vector tile generator — OSM + Overture Maps → protomaps PMTiles
Documentation
# Changelog

## 0.4.2 (2026-12-02)

Crates released with it: `geolith` 0.2.2, `geolith-tiles-builder` 0.4.2, `geolith-search-builder` 0.3.2, `geolith-routing-builder` 0.3.2, `geolith-dataset-builder` 0.5.0, `geolith-soi` 0.1.2 and `geolith-geo` 0.33.3 (the vendored fork).

- **`dataset downloads areas` writes GeoParquet 2.0 by default.** The geometry column carries the native Parquet `GEOMETRY` logical type with CRS `OGC:CRS84`, and every row group carries geospatial statistics (bounding box and geometry types), so a reader that asks for one district skips the row groups that cannot hold it. The rows are sorted along a Hilbert curve over their bounding box centres and written in row groups of 100 000 at Zstd level 15. `--geoparquet 1.1` writes the earlier 1.1.0 file: a plain WKB `Binary` column with no statistics. The rows are no longer in `GeoJSON` feature order, and the default output of the subcommand changed, which is why `geolith-dataset-builder` moves to 0.5.0.
- **A Parquet source with no `bbox` covering column is filtered by the native geospatial statistics.** A `--bbox` build over a GeoParquet 2.0 source read every row group of it; Overture's `bbox` columns still decide first, and a file whose geometry column is plain WKB is read as before.
- **`geolith terrain` opens its DEM sources on demand.** A `CogMosaic` kept one open reader per source, and a planet DEM is 26 475 files against macOS's 10 240-descriptor limit, so a global set could not be read in one process. Each source is now read once for its bounds, levels and elevation range and closed, and a tile takes its readers from a pool of at most 32.
- **Every dependency is at its newest release.** `mlt-core` 0.25.0 (from 0.22.2), `geolith-glx` 0.2.3, `geolith-routing` 0.5.0, `ahash` 0.8.15 and `sha2` 0.11.3. `mlt-core` 0.23 and later need `earcut ^0.4.10`, so `geolith-geo` stops carrying upstream's `=0.4.5` pin and takes 0.4.12; its one call site uses `earcut_slice`, the public API and every encoded byte are unchanged.

## 0.4.1 (2026-11-30)

Crates released with it: `geolith` 0.2.1, `geolith-tiles-builder` 0.4.1, `geolith-search-builder` 0.3.1, `geolith-routing-builder` 0.3.1 and `geolith-soi` 0.1.1. `geolith-dataset-builder` 0.4.2 is unchanged: it takes the fix through `geolith` 0.2.1.

- **`--india-boundary` takes either DataMeet file and gives the same tiles.** The raw polygon file (`india-composite.geojson`) used to be read as it came: 6 entries instead of the 109 of the lines file `tools/india-boundary/derive.py` writes, with no warning, so the Survey of India line was incomplete. A polygon file is now turned into lines with the algorithm of `derive.py` (every ring of every polygon, outer ring first), and the result is the lines file, coordinate for coordinate (tested on the pinned files).
- **`--india-outline` needs polygons.** The lines file used to load as an outline of no land; it is now an error that names the file and the fix.
- **Both files are checked before any build reads them:** an empty file, a file that is not JSON or not GeoJSON, a `crs` that is not WGS 84, a file with no geometry, with points only, or with polygons and lines mixed, and a file whose extent does not reach India (another country's file) are typed errors that name the file. A file whose sha256 is not the pinned DataMeet one is accepted with a warning, and so is one that does not cover the whole map.
- **The coordinates of the Survey of India files are read to the nearest double** (each number parsed by `str::parse::<f64>`, as the dataset builder reads its areas). `serde_json`'s own parser reads 8 % of the coordinates of the pinned file one or two units in the last place (1.4e-14 degrees) away from the double the pinned lines file holds; with the exact reading a polygon file turned into lines is that lines file bit for bit.
- **`--tmpdir` is created when missing** for geocoding and routing builds, as the tile build does; before, they stopped with `i/o error: No such file or directory` and no path (routing blamed the output file). A `--tmpdir` that cannot be created is an error that names it.
- **A file with no OSM header block is refused** (an empty or cut-short download): a routing build wrote an empty graph and exited 0, and the readers of the other builds took it for a PBF with no elements.
- **No private-repository links in the packaged changelog.**


## 0.4.0 (2026-11-30)

Library crates released with it: `geolith` 0.2.0, `geolith-tiles-builder` 0.4.0, `geolith-search-builder` 0.3.0, `geolith-routing-builder` 0.3.0, `geolith-dataset-builder` 0.4.2, and the new `geolith-soi` 0.1.0.

0.x versions follow Cargo: a minor bump marks a change that can break a caller (a removed or retyped public item, a new variant in an exhaustive error enum).

### Behaviour you will meet

- **A build over Survey of India land needs the Survey of India file.** The area is the `--bbox`, the PBF extent, or the whole world when neither is given. Tiles want `--india-boundary`, search and routing want `--india-outline`; without it the build stops with a typed error before it reads data. A box over Gilgit-Baltistan, Aksai Chin or Pakistan-administered Kashmir counts too. `.data/inputs/india/india-boundary.geojson` is made by `tools/india-boundary/derive.py` from the DataMeet files (see `NOTICE.md`).
- **No claim line inside India.** A boundary line of any kind (`country`, `region`, `county`, `locality`) that carries `disputed`, `disputed_by` or `claimed_by` is removed from Survey of India land and from 0.02 degrees outside its edge. Lines and labels of other countries' divisions are removed inside India. A geocoding record on that land takes its country, region and locality only from Indian divisions, and a locality, area or city only from its own country and region.
- **Bad input stops the build.** A Parquet file that cannot be read, has no geometry column or one of the wrong type, or holds more than a few bad geometries is an error that names the file. `--reclaim-source-after-read` never deletes a file that produced no features or an error, and it stops before it deletes anything when the data folder holds no file of an Overture type the enabled layers read (`--allow-missing-type` builds anyway). A failed `osmium extract`, a GeoTIFF header that claims more pixels than the file can hold, `--threads 0`, a typo in a source, `--tile-format` or `--geocoding-format` value, and a search output name that is not a SQL identifier are errors.
- **Release builds unwind on a panic.** Before, the release profile aborted, so the guards around the polygon clipper did nothing. A panic in one feature's clip is caught, logged with the feature id, layer and operation, and counted. The build summary prints `geometry failures: N features skipped`, and the build fails above 100 features. A panic while merging or encoding a tile fails the build and names the tile.
- **Credits in every output.** The tile metadata credits OpenStreetMap, Overture Maps Foundation and Natural Earth, and the DataMeet India boundary when it was used. The `.glx` META part carries the data credits, then the geolith credit.
- **`--places-source` is deprecated.** It is accepted, does nothing and warns; places always read OSM place nodes and the Overture divisions.
- **Disk and temporary files.** The disk pre-flight counts the Overture files `--reclaim-source-after-read` will delete and the chunks `--reclaim-chunks` frees, and never asks for less than 64 GiB on a volume that gets chunks. `--tmpdir` is never removed: the build removes only what it made there. A second run on one `--node-store` file is refused (the file is locked), and a node cache built from a bounding-box extract is not reused for the whole PBF.
- **The dataset uploader verifies by content.** Large objects are checked by size and `x-amz-meta-sha256`, never by an ETag read as md5; a token that cannot read no longer reads as "absent"; writes are conditional (`If-None-Match: *`). CHIRPS rasters come over https only and must start like a TIFF.

### Version stamp of the planet tiles archive

`planet-2026-11-27.pmtiles` (tiles) carries the stamp `geolith v0.3.6` in its metadata, but it was built from `main` at `1903261`, which was not released at build time. `0.3.6` on crates.io is the build of 29 Nov. The `SOURCE.txt` next to the build binary (`bin-main-1903261`) is the record of what the archive was built from. The first release that contains that code is 0.4.0.

## 0.3.5 (2026-11-27)


### Bug Fixes

* **tiles:** every write, flush and fsync error of a sort run, the node store or the archive stops the build with an error that names the file and the OS error; before, phase 1 logged a failed chunk write and went on, so a full disk could give an archive with missing tiles. A short archive is removed. Runs and the archive are synced before the build reports success
* **tiles:** `--resume` refuses, and says why, a folder whose phase 1 did not finish (`phase1.complete`), that lost a run, or that a `--reclaim-chunks` merge began to consume (`merge.reclaiming`)
* **tiles:** a failed read of the node store is raised (`NodeStore::check_reads`) instead of the node going missing; an unreadable bridge directory is an error

### Libraries

* `geolith` 0.1.5: `PmtilesWriter` errors name the archive and it syncs on finalize; `NodeStore::check_reads`; `geolith-tiles-builder` 0.3.4: typed `SortRunError`, `TilesError::{Phase1Incomplete, RunCountMismatch, ChunksConsumed}`, `TilesConfig::try_discover_bridge_files`, `sort::manifest`

## 0.3.4 (2026-11-27)


### Features

* **tiles:** the sort chunks are columnar, zstd-compressed, checksummed runs: 28 bytes per tile feature instead of 41, the same archive byte for byte; a cut, damaged or foreign run stops the build with a typed `SortRunError`
* **tiles:** `--reclaim-chunks` gives the disk of each chunk block back as the merge reads it and deletes a chunk at its end, so chunks and archive do not peak together (it costs `--resume` of a started merge)
* **tiles:** before phase 1 the build estimates the disk of each volume it writes to (`--tmpdir`, `--output`, `--node-store`) and stops with `TilesError::InsufficientDisk`, naming the GiB needed; `--no-disk-check` skips it

### Libraries

* `geolith-tiles-builder` 0.3.3: `sort::chunk` and `sort::merge` return `TilesError`; new `sort::block`, `sort::error` and `TilesConfig::{reclaim_chunks, disk_check}`

## 0.3.3 (2026-11-27)


### Features

* **dataset:** `geolith-dataset-builder` 0.4.0 makes `stage::pointer_json` and `Settings::new` public and reserves dataset ids
* **routing:** `geolith-routing-builder` 0.2.1 uses `geolith-routing` (features `cch` and `costing`, default features off) instead of the retired crates `geolith-cch` and `geolith-costing`; the routing output is unchanged except its builder version stamp (`routing.glx` and `routing-cch.glx` goldens re-recorded; the dataset goldens change only their `engine_version` / generator stamp)

## 0.3.2 (2026-11-27)


### Features

* **tiles:** label features carry `name`, `script`, `name2`/`script2`, `name3`/`script3` and `name:<lang>` for the 41 protomaps languages, from OSM `name:*`, Overture `names.common` and Natural Earth `name_*`, so a `@protomaps/basemaps` style with `lang: 'en'` draws English labels (places, pois, roads, water, earth); `name:<lang>` and the script attributes add about 1% to tiles at z12 and above on a regional extract

### Bug Fixes

* **hooks:** `cargo fmt --all` works inside `.worktrees/*`, so the pre-commit hook passes in nested worktrees

### Libraries

* `geolith` 0.1.4 adds `geolith::names` (`push_names`, `script_of`, `segment_by_script`, `languages`); `geolith-tiles-builder` 0.3.2 uses it in the places, pois, roads, water and earth layers

## 0.3.1 (2026-11-27)


### Bug Fixes

* **terrain, splat-tiles:** a missing DEM or PLY is named in the error, not only in the log

## 0.3.0 (2026-11-27)


### ⚠ BREAKING CHANGES

* `geolith-tiles-builder`, `geolith-search-builder`, `geolith-routing-builder` and `geolith-dataset-builder` return their own error enums (`TilesError`, `SearchError`, `BuildError`, `DatasetError`) instead of `anyhow::Error`; `geolith_cli::run` returns `CliError`. `anyhow` is removed from all of them.

### Features

* `geolith::error::report` prints an error with its causes; the CLI uses it, and new tests check that a failing command names the file

### Continuous Integration

* `cargo deny check` (licences, advisories, sources)

## 0.2.3 (2026-11-27)


### Bug Fixes

* **geolith:** the library returns typed errors (`GeolithError`), not `anyhow`

### Documentation

* fix 23 broken rustdoc links and tags; gate `cargo doc` with `-D warnings`

### Miscellaneous

* **deps:** drop the dependencies that no crate imports

## 0.2.2 (2026-11-26)


### Miscellaneous

* **deps:** require `geolith-cch` and `geolith-costing` 0.1.1

## 0.2.1 (2026-11-26)


### Features

* **search:** a venue with a house number and a street also gets an address row

### Bug Fixes

* **deps:** a `cargo install` from crates.io now builds with the patched `geo` and `i_overlay` (the crates `geolith-geo` and `geolith-i-overlay`); a `[patch]` section never applied to it
* **deps:** use the published `geolith-glx`, `geolith-costing` and `geolith-cch` crates instead of git revisions

### Miscellaneous

* the workspace denies `unsafe_code` and `unsafe_op_in_unsafe_fn` unless an `#[allow]` gives a reason, and warns on `missing_docs` and `rust_2018_idioms`
* the vendored agent skills are no longer in the repository

## 0.2.0 (2026-10-15)


### ⚠ BREAKING CHANGES

* **geocoding:** runs that relied on the pg-copy default must pass --geocoding-format pg-copy.

### Features

* **3d:** drone-capture 3d terrain pipeline — terrain + splat-tiles (216aebb)
* **3d:** drone-capture 3d terrain pipeline — terrain + splat-tiles (f4fbe66)
* add MLT tile encoding support via mlt-core with --tile-format flag (47096c9)
* **config:** make --osm-pbf optional for Overture-only builds (7689832)
* **conflation:** auto-discover GERS bridge files for OSM deduplication (c6dbc30)
* **geocoding:** emit a TIN text index in the pg-copy DDL (92a6d87)
* **geocoding:** emit a TIN text index in the pg-copy DDL (24eebea)
* **geocoding:** enrich records with admin names from division_area (bfb43a1)
* **geocoding:** enrich records with admin names from division_area (eecba6e)
* **geocoding:** implement overture places/addresses/buildings output (d671d6d)
* **geocoding:** index named venue multipolygons (6a30610)
* **geocoding:** index named venue multipolygons (8619c4c)
* **geocoding:** index OSM settlements, venues and addresses with Overture (8de8ee1)
* **geocoding:** index OSM settlements, venues and addresses with Overture (0ae7e5a)
* **geocoding:** search a place by its category words (f124f5a)
* **geocoding:** search a place by its category words (ed8911a)
* **geocoding:** search other OSM names and pass every name to the glx name match (f994b84)
* **geocoding:** search other OSM names and pass every name to the glx name match (f4156e1)
* **geocoding:** weigh category words like name words (e892a42)
* **geocoding:** weigh category words like name words (d69a9bb)
* **geocoding:** write .glx index files directly (a644c30)
* **geocoding:** write a .glx file by default (8ad7170)
* geolith monolith — vector tiles, routing, geocoding, conflation, incremental updates (c8529bc)
* **metadata:** add complete TileJSON metadata with per-layer field declarations (9a1304f)
* **mlt:** migrate mlt-core 0.6 → 0.9 (82b3597)
* **node-store:** add BufferedFile backend with sharded page cache (005df50)
* **pipeline:** add tracing::info! to all silent pipeline phases (3644bf5)
* **pipeline:** reclaim Overture source files as they are read (354e724)
* **pipeline:** reclaim Overture source files as they are read (a3c5fd1)
* **progress:** add indicatif progress bars to all pipeline phases (b2e0837)
* **progress:** add indicatif progress bars to all pipeline phases (0cf2f1b)
* **raster:** xyz/wmts raster basemap archiver (abb7be4)
* **timing:** add Planetiler-style elapsed time and phase timing (#13) (a58ba5e)


### Bug Fixes

* **api:** mark the public getters and directory codecs #[must_use] (5835935)
* **bathymetry:** adapt to Overture 2026-04-15.0 nested cartography schema (1cc73ec)
* **bathymetry:** keep integer depth and paint nested levels in depth order (8dfee39)
* **boundaries:** classify overture boundaries by subtype, not admin_level (3a4d438)
* close the AGENTS.md compliance gaps (must_use, frame-cap determinism) (c87b7ca)
* **collector:** add #[must_use] to FeatureCollector::drain() (7ec71a2)
* **collector:** remove redundant #[must_use] on drain() — Iterator already must_use (2e897af)
* **config:** change landuse_source and pois_source defaults from "overture" to "both" (69460c5)
* **config:** change water_source default from "overture" to "both" (c5ab159)
* **earth,landuse:** keep only subtype=land as earth, classify landuse by class (1815900)
* **geocoding:** build in bounded memory and keep OSM nodes above 13 billion (51a4605)
* **geocoding:** build in bounded memory and keep OSM nodes above 13 billion (6dfa43b)
* **geocoding:** drop NUL bytes from pg-copy text and JSON fields (7181bda)
* **geocoding:** lower the disk peak of a glx build (98de27d)
* **geocoding:** lower the disk peak of a glx build (215b042)
* **geocoding:** make the pg-copy output load into postgres (75a8447)
* **geocoding:** make the pg-copy/TIN output load into postgres (f331a58)
* **geocoding:** rank places by Nominatim importance (ee6305b)
* **geocoding:** rank places by Nominatim importance (87fa84a)
* **geocoding:** skip osm relations the geocoding pass never reads (6c48672)
* **geocoding:** take the country from the region when no country holds the point (2eaba5d)
* **geocoding:** take the country from the region when no country holds the point (c766e33)
* **geocoding:** use ISO 3166-1 alpha-3 codes for Pelias country_a field (dd95eb9)
* **geometry:** clip polygons as a unit to stop phantom hole fills (c021e6b)
* **layers:** correct eight overture classification defects (63d7af7)
* **layers:** overture schema v2 — POIs from taxonomy, bathymetry depth (f115df2)
* **layers:** raise Overture landuse min_zoom from z4 to z8 (c8dbaac)
* **layers:** respect NE feature min_zoom for boundaries and drop admin_level &gt; 8 (7c2d2f1)
* **lint:** collapse match-on-option to ? in pois category resolution (0cb05e8)
* **node-store:** bypass macOS page cache and defer bridge loading (b141bcf)
* **node-store:** cap page cache at 4 GB to prevent VM thrashing (313295c)
* **node-store:** lower MAX_RAM_FRACTION from 1.05 to 0.95 (9fc318a)
* **node-store:** use dynamic available memory for page cache budget (bb5f1c1)
* **osm:** keep the node store at its exact size so the cache is reused (40945bc)
* **osrm:** restructure NBG node serialization to OSRM named-section tar format (1a19f4c)
* **pipeline:** add progress logging to OSM pass 2 (#11) (f3ddefd), closes #10
* **places:** keep overture macrohood and microhood, zoom localities by class (49f28d5)
* **pmtiles:** record real bounds and tile counts in the archive header (18c214f)
* **pois:** read the kind from taxonomy after overture removed categories (2d933d2)
* **pois:** reduce Overture POI density — kill catch-all, raise min_zoom (7f6b1af)
* **reader:** apply the per-feature bbox filter to float64 bbox columns (59f54d1)
* **reconstruct:** sort frames before capping so the kept set is deterministic (f692d6e)
* resolve rust-skills audit violations (closes #9) (48ccd67)
* **roads:** classify overture rail and ferries, restore bridge/tunnel/link flags (f8b84a9)
* **schema:** project taxonomy and basic_category instead of removed categories (eafd7fb)
* **source:** sort discovered files so build order is deterministic (3b875f6)
* **splat:** rust-skills audit fixes + crop/scale knobs for map-grade assets (02b43f2)
* **terrain:** replace chunks_exact with as_chunks to satisfy clippy (043ee5f)
* **test:** factor out complex tuple types to satisfy clippy::type_complexity (184297f)
* **transit:** emit only airport runway and taxiway lines as aeroway (5e6b334)
* **water:** clamp point water features to z13+, add spring/waterfall subtypes (ca85d8b)
* **water:** classify overture water by class before subtype (d2cb837)


### Performance Improvements

* **geocoding:** check OSM duplicates with an R-tree on all cores (d0126ac)
* **geocoding:** check OSM duplicates with an R-tree on all cores (bc5c275)
* **geocoding:** keep the admin polygon vertices in a mapped scratch file (e3efcb5)
* **geocoding:** keep the admin polygon vertices in a mapped scratch file (1b37002)
* **pipeline:** parallelize land + water shapefile reads (#12) (85e4365)
* **pipeline:** use per-layer simplification tolerance and landuse area filtering (6822db4)
* **shapefile:** bbox pre-filter to skip out-of-area features (1ed4211)
* **water:** area-based min_zoom for water polygon features (9e5ec9b)


### Documentation

* add AGENTS.md as source of truth and remove tautological tests (#19) (e806d2b)
* **agents:** document the 90% coverage gate, extract ddl_table_name (f958f4a)
* **osrm:** note nbg_nodes inner tar exception in module doc (29b00d9)


### Miscellaneous

* **deps:** upgrade all workspace dependencies (ed73071)
* **deps:** upgrade rayon 1.12, geo 0.33, rstar 0.13 (2dcb5e6)


### Code Refactoring

* split into cargo workspace (geolith-core, geolith-sort, geolith-output, geolith) (8c23e2b)