CLI Reference¶
Text below is a captured --help
command output.
Usage: QuackOSM [OPTIONS] PBF file path
QuackOSM CLI.
Wraps convert_pbf_to_parquet, convert_geometry_to_parquet and convert_osm_extract_to_parquet
functions and prints final path to the saved geoparquet file at the end.
╭─ Arguments ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ pbf_file PBF file path PBF file to convert into GeoParquet. Can be an URL. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --osm-tags-filter TEXT (JSON) OSM tags used to filter the data in the JSON text form. Can take the form of a flat or grouped dict (look: OsmTagsFilter and │
│ GroupedOsmTagsFilter). Cannot be used together with osm-tags-filter-file. │
│ --osm-tags-filter-file PATH OSM tags used to filter the data in the JSON file form. Can take the form of a flat or grouped dict (look: OsmTagsFilter and │
│ GroupedOsmTagsFilter). Cannot be used together with osm-tags-filter. │
│ --keep-all-tags,--all-tags Whether to keep all tags while filtering with OSM tags. Doesn't work when there is no OSM tags filter applied (osm-tags-filter or │
│ osm-tags-filter-file). Will override grouping if GroupedOsmTagsFilter has been passed as a filter. │
│ --geom-filter-bbox BBOX Geometry to use as a filter in the bounding box format - 4 floating point numbers separated by commas. Cannot be used together │
│ with other geom-filter-... parameters. │
│ --geom-filter-file PATH Geometry to use as a filter in the file format - any that can be opened by GeoPandas. Will return the unary union of the │
│ geometries in the file. Cannot be used together with other geom-filter-... parameters. │
│ --geom-filter-geocode TEXT Geometry to use as a filter in the string to geocode format - it will be geocoded to the geometry using Nominatim API (GeoPy │
│ library). Cannot be used together with other geom-filter-... parameters. │
│ --geom-filter-geojson TEXT (GEOJSON) Geometry to use as a filter in the GeoJSON format. Cannot be used together with other geom-filter-... parameters. │
│ --geom-filter-index-geohash TEXT (GEOHASH) Geometry to use as a filter in the Geohash index format. Separate multiple values with a comma. Cannot be used together with other │
│ geom-filter-... parameters. │
│ --geom-filter-index-h3 TEXT (H3) Geometry to use as a filter in the H3 index format. Separate multiple values with a comma. Cannot be used together with other │
│ geom-filter-... parameters. │
│ --geom-filter-index-s2 TEXT (S2) Geometry to use as a filter in the S2 index format. Separate multiple values with a comma. Cannot be used together with other │
│ geom-filter-... parameters. │
│ --geom-filter-wkt TEXT (WKT) Geometry to use as a filter in the WKT format. Cannot be used together with other geom-filter-... parameters. │
│ --custom-sql-filter TEXT Allows users to pass custom SQL conditions used to filter OSM features. It will be embedded into predefined queries and requires │
│ DuckDB syntax to operate on tags map object. │
│ --osm-extract-query TEXT Query to find an OpenStreetMap extract from available sources. Will automatically find and download OSM extract. Can be used │
│ instead of PBF file path argument. │
│ --osm-extract-source,--pbf-download-source [any|Geofabrik|osmfr|BBBike] Source where to download the PBF file from. Can be Geofabrik, BBBike, OSMfr (OpenStreetMap.fr) or any. [default: (any)] │
│ --explode-tags,--explode --compact-tags,--compact Whether to split tags into columns based on the OSM tag keys. If None, it will be set based on the │
│ osm-tags-filter/osm-tags-filter-file and keep-all-tags parameters. If there is a tags filter applied without keep-all-tags then │
│ it'll be set to explode-tags (True). Otherwise it'll be set to compact-tags (False). │
│ --output -o PATH Path where to save final result file. If not provided, it will be generated automatically based on the input pbf file name. Can be │
│ .parquet or .db or .duckdb extension. │
│ --duckdb Export to duckdb database. If not provided, data can still be exported if output has .db or .duckdb extension. │
│ --duckdb-table-name TEXT Table name which the data will be imported into in the DuckDB database. [default: quackosm] │
│ --ignore-cache,--no-cache Whether to ignore previously precalculated geoparquet files or not. │
│ --working-directory,--work-dir PATH Directory where to save the parsed parquet and geoparquet files. Will be created if doesn't exist. [default: files] │
│ --osm-way-polygon-config PATH Config where alternative OSM way polygon features config is defined. Will determine how to parse way features based on tags. │
│ Option is intended for experienced users. It's recommended to disable cache (no-cache) when using this option, since file names │
│ don't contain information what config file has been used for file generation. │
│ --filter-osm-ids TEXT List of OSM features IDs to read from the file. Have to be in the form of 'node/<id>', 'way/<id>' or 'relation/<id>'. Separate │
│ multiple values with a comma. │
│ --wkt-result,--wkt Whether to save the geometry as a WKT string instead of WKB blob. │
│ --silent Whether to disable progress reporting. │
│ --transient Whether to make more transient (concise) progress reporting. │
│ --iou-threshold FLOAT RANGE [0<=x<=1] Minimal value of the Intersection over Union metric for selecting the matching OSM extracts. Is best matching extract has value │
│ lower than the threshold, it is discarded (except the first one). Has to be in range between 0 and 1. Value of 0 will allow every │
│ intersected extract, value of 1 will only allow extracts that match the geometry exactly. Works only when PbfFileReader is asked │
│ to download OSM extracts automatically. │
│ [default: 0.01] │
│ --allow-uncovered-geometry Suppresses an error if some geometry parts aren't covered by any OSM extract. Works only when PbfFileReader is asked to download │
│ OSM extracts automatically. │
│ --show-extracts,--show-osm-extracts Show available OSM extracts and exit. │
│ --version -v Show the application's version and exit. │
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to copy it or customize the installation. │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯