Documentation

CLI Options

Required Data Sources

OptionTypeDescription
--datapathPath to the Overture Maps data directory (hive-partitioned GeoParquet).
--osm-pbfpathPath to an OpenStreetMap PBF file (e.g., planet-latest.osm.pbf).
--natural-earthpathPath to Natural Earth SQLite file (spatialite blobs).
--water-polygonspathPath to water-polygons-split-3857 shapefile directory.
--land-polygonspathPath to land-polygons-split-3857 shapefile directory.

Optional Data Sources

OptionTypeDefaultDescription
--india-boundarypathIndia boundary GeoJSON file for correct border rendering.

Output

OptionTypeDefaultDescription
--output / -opathrequiredOutput file path (.pmtiles or .mbtiles).
--output-formatstringtilesOutput format: tiles, valhalla, osrm, or geocoding.
--schemastringprotomapsOutput schema: protomaps, openmaptiles, or path to TOML schema.

Filtering

OptionTypeDefaultDescription
--bboxstring(entire planet)Bounding box filter as min_lon,min_lat,max_lon,max_lat in WGS84 degrees.
--max-zoomu815Maximum zoom level for tile generation (0–15).

Performance

OptionTypeDefaultDescription
--threadsusize(all cores)Number of threads for parallel processing.
--chunk-size-mbusize0 (auto)Sort buffer size per thread in MB. 0 = auto-detect based on RAM.
--tmpdirpathsystem tempDirectory for temporary sort chunk files. Use a fast SSD.
--node-storepathPath to mmap file for OSM node coordinates (96+ GB for planet).
--node-cachebooltrueCache node store between runs (skip OSM pass 1 on re-runs).
--resumeboolfalseResume from existing sort chunks in --tmpdir, skipping Phase 1.

GERS Conflation

OptionTypeDefaultDescription
--bridge-dirpathDirectory of GERS bridge Parquet files. Auto-discovered from gers-bridge/ sibling of --data if not set.
--bridge-filespath (multi)Individual GERS bridge Parquet files (can be specified multiple times).
--no-conflateboolfalseDisable GERS conflation even when bridge files are found.

Layer Source Selection

Control which data source is used per layer. Values: "osm", "overture", or "both" (unless noted).

OptionDefaultValues
--buildings-sourcebothosm, overture, both
--roads-sourcebothosm, overture, both
--places-sourcebothosm, overture, both
--pois-sourceovertureosm, overture, both
--water-sourceovertureosm, overture, both
--landuse-sourceovertureosm, overture, both
--divisions-sourceovertureoverture, none
--landcover-sourceovertureoverture, none
--bathymetry-sourceovertureoverture, none

Routing Output

OptionTypeDefaultDescription
--osrm-outputpathOSRM tar archive output path (requires --output-format osrm).
--valhalla-outputpathValhalla tar archive output path (requires --output-format valhalla).

Geocoding Output

OptionTypeDefaultDescription
--geocoding-outputpathGeocoding data output path (requires --output-format geocoding).
--geocoding-formatstringpg-copyGeocoding format: pg-copy, photon, or pelias.

Incremental Updates

OptionTypeDefaultDescription
--incrementalboolfalseEnable incremental update mode (patch existing MBTiles).
--state-dirpathPersistent state directory for incremental processing.

Usage Examples

Full planet build (6 sources, auto GERS conflation):

geolith \
  --data ./data/overture \
  --osm-pbf ./data/planet.osm.pbf \
  --natural-earth ./data/natural_earth.sqlite \
  --land-polygons ./data/land-polygons \
  --water-polygons ./data/water-polygons \
  --india-boundary ./data/india-boundary.geojson \
  --output ./data/planet-vector.pmtiles \
  --max-zoom 15 \
  --threads 10 \
  --tmpdir ./data/tmp \
  --node-store ./data/node.store

Regional extract with bounding box:

geolith \
  --data ./data/overture \
  --osm-pbf ./data/planet.osm.pbf \
  --natural-earth ./data/natural_earth.sqlite \
  --land-polygons ./data/land-polygons \
  --water-polygons ./data/water-polygons \
  --output ./data/india.pmtiles \
  --bbox 68.0,6.5,97.5,37.2 \
  --max-zoom 15

Explicit GERS bridge directory:

geolith \
  --data ./data/overture \
  --osm-pbf ./data/planet.osm.pbf \
  --natural-earth ./data/natural_earth.sqlite \
  --land-polygons ./data/land-polygons \
  --water-polygons ./data/water-polygons \
  --output ./data/planet-vector.pmtiles \
  --bridge-dir ./data/gers-bridge

Disable conflation:

geolith \
  --data ./data/overture \
  --osm-pbf ./data/planet.osm.pbf \
  --natural-earth ./data/natural_earth.sqlite \
  --land-polygons ./data/land-polygons \
  --water-polygons ./data/water-polygons \
  --output ./data/planet-vector.pmtiles \
  --no-conflate

Environment Variables

VariableDescription
RUST_LOGControls log verbosity. Set to info, debug, or trace for increasing detail.
# Show progress and timing information
RUST_LOG=info geolith --data ./data/overture --osm-pbf ./data/planet.osm.pbf \
  --natural-earth ./data/natural_earth.sqlite --land-polygons ./data/land-polygons \
  --water-polygons ./data/water-polygons --output planet.pmtiles

# Trace a specific module
RUST_LOG=geolith::pipeline=trace geolith --data ./data/overture --osm-pbf ./data/planet.osm.pbf \
  --natural-earth ./data/natural_earth.sqlite --land-polygons ./data/land-polygons \
  --water-polygons ./data/water-polygons --output planet.pmtiles