Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration

Shared options

Every command accepts the same input, output, and pipeline options:

OptionDefaultMeaning
-o, --output <FILE><stem>.<command>.<input format>Output file (beside the input)
--in-format <FMT>inferred, else parquetparquet, csv, tsv, csv.gz, tsv.gz, auto
--out-format <FMT>inferred, else parquetsame set
--overwriteoffReplace clashing output columns instead of failing
--lon-col <NAME>longitudeLongitude column
--lat-col <NAME>latitudeLatitude column
--decimals <N>3Rounding applied before de-duplicating
-t, --threads <N>all coresWorker threads
-c, --config <TOML>noneConfig file (CLI flags override it)

The coast, sea, and place commands also take the region options.

Formats

Input and output can be Parquet (default), CSV, TSV, and the gzip variants csv.gz and tsv.gz. The format is inferred from the file extension; an unrecognized extension falls back to Parquet. Gzip is handled directly (not via a Polars feature), so it behaves the same across Polars versions.

Config file

A TOML config file supplies the region box and projection center, sitting between the built-in default and the CLI flags (see precedence). Every field is optional:

# region.toml
region    = "baltic"   # a named preset
min_lon   = 8.0        # or explicit bounds, overriding the preset
max_lon   = 31.0
min_lat   = 53.0
max_lat   = 66.0
proj_lon0 = 19.5       # LAEA projection center (default: region center)
proj_lat0 = 59.5
geoenrich coast cores.parquet --data ./data/gshhg/... -c region.toml

Rounding and de-duplication

Coordinates are rounded to --decimals places (3 by default) before the input is reduced to unique locations. Only the unique locations are looked up, then the results are joined back onto every row. Raising --decimals distinguishes closer points at the cost of more unique lookups; lowering it collapses more rows together.