pub struct Config {Show 43 fields
pub data: Option<PathBuf>,
pub osm_pbf: Option<PathBuf>,
pub natural_earth: Option<PathBuf>,
pub water_polygons: Option<PathBuf>,
pub land_polygons: Option<PathBuf>,
pub india_boundary: Option<PathBuf>,
pub india_outline: Option<PathBuf>,
pub output: Option<PathBuf>,
pub bbox: Option<String>,
pub max_zoom: u8,
pub threads: Option<usize>,
pub chunk_size_mb: usize,
pub tmpdir: Option<PathBuf>,
pub node_store: Option<PathBuf>,
pub buildings_source: String,
pub places_source: String,
pub divisions_source: String,
pub landcover_source: String,
pub bathymetry_source: String,
pub roads_source: String,
pub pois_source: String,
pub water_source: String,
pub landuse_source: String,
pub reuse: RunReuse,
pub output_format: String,
pub tile_format: String,
pub bridge_dir: Option<PathBuf>,
pub no_conflate: bool,
pub bridge_files: Vec<PathBuf>,
pub geocoding_format: String,
pub pg_index_flavor: PgIndexFlavor,
pub geocoding_output: Option<PathBuf>,
pub wikimedia_importance: Option<PathBuf>,
pub routing_output: Option<PathBuf>,
pub routing_metric_out: Option<PathBuf>,
pub routing_cch: Vec<String>,
pub routing_predicted_speeds: Option<PathBuf>,
pub routing_default_speeds: Option<PathBuf>,
pub routing_admins: Option<PathBuf>,
pub routing_timezones: Option<PathBuf>,
pub reclaim_source_after_read: bool,
pub reclaim_chunks: bool,
pub no_disk_check: bool,
}Expand description
Rust vector tile generator — OSM + Overture Maps → protomaps PMTiles.
Fields§
§data: Option<PathBuf>Path to Overture Maps data directory (hive-partitioned Parquet).
Required by the tiles and geocoding formats.
osm_pbf: Option<PathBuf>Path to planet.osm.pbf file (optional — omit for Overture-only builds).
natural_earth: Option<PathBuf>Path to Natural Earth SQLite file.
Required by the tiles format.
water_polygons: Option<PathBuf>Path to water-polygons-split-3857 shapefile directory.
Required by the tiles format.
land_polygons: Option<PathBuf>Path to land-polygons-split-3857 shapefile directory.
Required by the tiles format.
india_boundary: Option<PathBuf>Path to India boundary GeoJSON file (optional).
india_outline: Option<PathBuf>India’s outline on the Survey of India map (GeoJSON polygons, e.g.
DataMeet’s india-composite.geojson). Geocoding draws and resolves
India, Ladakh, Jammu and Kashmir, Pakistan and China with it;
required when the geocoding build covers India, and when the
–routing-admins source holds India (routing nodes inside it are in
India).
output: Option<PathBuf>Output PMTiles file path.
Required by the tiles format, and by geocoding without –geocoding-output.
bbox: Option<String>Bounding box filter: min_lon,min_lat,max_lon,max_lat
max_zoom: u8Maximum zoom level (default: 15).
threads: Option<usize>Number of threads (default: available parallelism).
chunk_size_mb: usizeSort buffer size per thread in megabytes (0 = auto-detect).
When set to 0 (the default), the chunk size is computed as
min(2 GB, total_RAM / (3 × threads)). Larger chunks produce
fewer files, speeding up the k-way merge phase.
tmpdir: Option<PathBuf>Directory for sort chunks and scratch files (default: the system temporary directory). Point it at a volume with room: a planet build writes about 200 GiB of chunks here.
node_store: Option<PathBuf>Path to node coordinate store (mmap file for OSM processing).
buildings_source: StringBuildings data source: “osm”, “overture”, or “both”.
places_source: StringPlaces data source: “osm”, “overture”, or “both”.
divisions_source: StringDivisions data source: “overture” or “none”.
landcover_source: StringLandcover data source: “overture” or “none”.
bathymetry_source: StringBathymetry data source: “overture” or “none”.
roads_source: StringRoads data source: “osm”, “overture”, or “both”.
pois_source: StringPOIs data source: “osm”, “overture”, or “both”.
water_source: StringWater data source: “osm”, “overture”, or “both”.
landuse_source: StringLanduse data source: “osm”, “overture”, or “both”.
reuse: RunReuseEnable node store caching between runs.
When enabled (default), a sidecar .meta.json file is written
alongside the node store. On re-runs with the same PBF file,
the node collection pass is skipped entirely — reducing from
2 PBF reads to 1.
output_format: StringOutput format: “tiles” (default), “geocoding” or “routing”.
“routing” builds the routing graph from –osm-pbf and writes a
.glx file with one routing part to –routing-output. Any other
value fails with an error.
tile_format: StringTile encoding format: “mlt” (default) or “mvt”.
MLT (MapLibre Tiles) uses columnar encoding with built-in compression,
producing 50–80% smaller tiles. MVT uses protobuf + gzip.
bridge_dir: Option<PathBuf>Directory containing GERS bridge Parquet files for OSM deduplication.
When provided, all .parquet files in this directory (recursively) are
loaded into the deduplication index. If not set, geolith automatically
looks for a gers-bridge/ sibling directory next to --data.
Expected structure:
gers-bridge/
├── buildings/*.zstd.parquet
├── transportation/*.zstd.parquet
└── divisions/*.zstd.parquetno_conflate: boolDisable GERS conflation even when bridge files are found.
By default, conflation is enabled automatically when bridge files are discovered. Set this flag to skip deduplication.
bridge_files: Vec<PathBuf>Paths to individual GERS bridge Parquet files (can be specified multiple times).
Alternative to --bridge-dir for specifying individual bridge files.
These are loaded in addition to any files found via --bridge-dir.
geocoding_format: StringGeocoding output format: “glx” (default: one .glx index file that
geolith search serves), “pg-copy” (rows and schema for your own
Postgres), “photon”, or “pelias”.
Only used when –output-format geocoding.
pg_index_flavor: PgIndexFlavorText index emitted in the companion DDL for the pg-copy format.
tin (default) needs the tin extension, available on PlanetScale
Postgres and Neki. gin needs no extension and runs anywhere.
geocoding_output: Option<PathBuf>Output path for geocoding data.
Only used when –output-format geocoding. Defaults to
wikimedia_importance: Option<PathBuf>Nominatim’s Wikipedia importance file, wikimedia-importance.csv.gz
from https://nominatim.org/data/. An OSM place with a wikidata
tag takes the importance of its Wikipedia article, so “London” finds
the city before a shop named after it. Without the file, a place
takes a default from its type.
Only used when –output-format geocoding.
routing_output: Option<PathBuf>Output path for the routing .glx file.
Only used when –output-format routing.
routing_metric_out: Option<PathBuf>Directory to write the auto metric to as a turn-expanded graph
(RoutingKit vectors: first_out, head, travel_time, latitude,
longitude and the vertex_* mapping), the input of the
customizable contraction hierarchy.
Only used when –output-format routing.
routing_cch: Vec<String>Costing profiles to build a customizable contraction hierarchy for,
comma-separated (auto, pedestrian, bicycle). Each becomes its
own set of sections in the routing part (glx spec v1, 10.5).
Only used when –output-format routing.
routing_predicted_speeds: Option<PathBuf>Directory of historical speeds in the reference CSV format: one file
per graph tile named by tile path (2/000/753/554.csv), rows
edge_graph_id,free_flow_kph,constrained_kph,encoded_dct. Fills the
tiles’ predicted-speeds section and flow speeds exactly as
valhalla_add_predicted_traffic does.
Only used when –output-format routing.
routing_default_speeds: Option<PathBuf>Default speed table in the reference default_speeds_config format
(OpenStreetMapSpeeds default_speeds.json): km/h per region,
rural/suburban/urban density band, road class, link, roundabout and
service use. A configured speed replaces the heuristic speed of every
vehicular non-ferry edge, a tagged maxspeed included, exactly as
the reference SpeedAssigner does.
Only used when –output-format routing.
routing_admins: Option<PathBuf>OSM PBF whose admin boundary relations give each routing node its
country and state, side of the road and country access rules, and
each edge its row of –routing-default-speeds: the reference’s admin
database (valhalla_build_admins), read from relations with
type=boundary at admin_level 2 and 4 (3 and 6 in a few countries)
and their member ways and nodes. May be the –osm-pbf itself or a
file of boundaries only. Nodes inside India take India as drawn by
the Survey of India: –india-outline is required when the source
holds India.
Only used when –output-format routing.
routing_timezones: Option<PathBuf>Time zone areas for the routing nodes: the .shp of a
timezone-boundary-builder shapefile release
(combined-shapefile-with-oceans-1970.shp, attribute tzid), as
the reference’s valhalla_build_timezones imports it. Each node
takes the index of the zone that holds it, which the router uses for
local time. Without it every node has no time zone and routes at a
date_time run in UTC.
Only used when –output-format routing.
reclaim_source_after_read: boolDelete each Overture Parquet file once its features are safely in the sort chunks.
Phase 1 streams every source exactly once and Phases 2-4 read only the
chunks, so the source tree can be released progressively rather than
held alongside it. That keeps the peak footprint near the release size
instead of release + chunks, which is the difference between fitting
on a disk-constrained machine and hitting ENOSPC mid-read.
Only Overture inputs are affected, and only after both the read and the chunk flush for a file succeed. Re-download the release to restore.
reclaim_chunks: boolGive the disk space of each sort chunk back while the merge reads it.
The merge reads every chunk once, front to back. With this flag it
frees each block of a chunk as soon as the block is read and deletes
the chunk at its end, so the chunks shrink while the archive grows and
the two do not peak together. On a planet build that is the difference
between chunks + archive and the larger of the two.
A build that stops during the merge cannot --resume from its chunks
afterwards: they are gone as far as they were read. The merge writes a
merge.reclaiming marker into –tmpdir before it reads the first
chunk, and --resume stops with an error that names the folder when it
finds the marker. Delete the folder and build again from phase 1.
no_disk_check: boolSkip the check of free disk space before phase 1.
Without this flag the tile build estimates the disk it needs from the size of the inputs and stops at once, naming the GiB, when the volume of –tmpdir, –output or –node-store is short.
Implementations§
Source§impl Config
impl Config
Sourcepub fn parse_args() -> Self
pub fn parse_args() -> Self
Parse CLI arguments, exiting with a usage error when a flag the output format reads is missing.
Sourcepub fn required_flags(&self) -> Vec<PathFlag>
pub fn required_flags(&self) -> Vec<PathFlag>
The path flags the output format reads, in usage order: all five
for tiles (and an unknown format, which fails later), --data and
--output for geocoding (--output only without
--geocoding-output), none for routing.
Sourcepub fn check_required(&self) -> Result<(), Error>
pub fn check_required(&self) -> Result<(), Error>
Check that every path flag the output format reads is present.
§Errors
A usage error naming each missing flag.
Sourcepub fn required_path(&self, flag: PathFlag) -> Result<&Path, Error>
pub fn required_path(&self, flag: PathFlag) -> Result<&Path, Error>
The value of a path flag the running format needs.
§Errors
The usage error for a missing required flag.
Sourcepub const fn has_india_boundary(&self) -> bool
pub const fn has_india_boundary(&self) -> bool
Check if India boundary fix is enabled.
Sourcepub fn uses_overture(&self, source: &str) -> bool
pub fn uses_overture(&self, source: &str) -> bool
Check if a source should include Overture data.
Sourcepub fn overture_enabled(&self, layer: Layer) -> bool
pub fn overture_enabled(&self, layer: Layer) -> bool
Whether Overture data should be included for a given layer.
Layers without a dedicated source flag always include Overture data.
Sourcepub fn osm_enabled(&self, layer: Layer) -> bool
pub fn osm_enabled(&self, layer: Layer) -> bool
Whether OSM data should be included for a given layer.
Returns false for all layers when --osm-pbf is not provided.
Sourcepub fn effective_chunk_bytes(&self) -> usize
pub fn effective_chunk_bytes(&self) -> usize
Compute the effective sort-buffer size in bytes per thread.
Sourcepub fn discover_bridge_files(&self) -> Vec<PathBuf>
pub fn discover_bridge_files(&self) -> Vec<PathBuf>
Discover all GERS bridge Parquet files for OSM deduplication.
Resolution order: explicit --bridge-files, then --bridge-dir,
then the gers-bridge/ sibling of --data.
Trait Implementations§
Source§impl Args for Config
impl Args for Config
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for Config
impl CommandFactory for Config
Source§impl FromArgMatches for Config
impl FromArgMatches for Config
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for Config
impl Parser for Config
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Forget for Config
impl Freeze for Configwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<PathBuf>: Freeze,
PhantomData<String>: Freeze,
impl Move for Config
impl RefUnwindSafe for Config
impl Send for Configwhere
RawVecInner: Send,
impl Sync for Configwhere
RawVecInner: Sync,
impl Unpin for Config
impl UnsafeUnpin for Configwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<PathBuf>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for Configwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.