Skip to content

Commit

Permalink
chore: modify cli example
Browse files Browse the repository at this point in the history
  • Loading branch information
RaczeQ committed Apr 2, 2024
1 parent e428cff commit 4c5ebba
Showing 1 changed file with 53 additions and 4 deletions.
57 changes: 53 additions & 4 deletions examples/command_line_interface.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,13 @@
"During first execution, QuackOSM will cache three PBF files sources locally. This operation takes some time."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Geocoding"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -243,6 +250,13 @@
"! QuackOSM --geom-filter-geocode 'Monaco-Ville, Monaco'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### GeoJSON"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -256,6 +270,13 @@
"! QuackOSM --geom-filter-geojson '{\"type\":\"Feature\",\"geometry\":{\"coordinates\":[[[7.416,43.734],[7.416,43.731],[7.421,43.731],[7.421,43.734],[7.416,43.734]]],\"type\":\"Polygon\"}}'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Geohash"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -269,6 +290,13 @@
"! QuackOSM --geom-filter-index-geohash spv2bcs"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### H3"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -282,6 +310,13 @@
"! QuackOSM --geom-filter-index-h3 893969a4037ffff"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### S2"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -295,6 +330,13 @@
"! QuackOSM --geom-filter-index-s2 12cdc28d"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### WKT"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -396,6 +438,13 @@
"- `--compact-tags` (or `--compact`): will always keep tags together as a single column."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Separated tags (`explode`)"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -419,14 +468,14 @@
},
"outputs": [],
"source": [
"! QuackOSM andorra.osm.pbf --osm-tags-filter '{ \"amenity\": \"parking\", \"building\": \"office\" }' --compact --output files/andorra_filtered_compact.geoparquet"
"! ./duckdb :memory: \"FROM read_parquet('files/andorra_filtered_exploded.geoparquet')\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's see the difference in the files structure."
"### Compact tags (`compact`)"
]
},
{
Expand All @@ -439,7 +488,7 @@
},
"outputs": [],
"source": [
"! ./duckdb :memory: \"FROM read_parquet('files/andorra_filtered_exploded.geoparquet')\""
"! QuackOSM andorra.osm.pbf --osm-tags-filter '{ \"amenity\": \"parking\", \"building\": \"office\" }' --compact --output files/andorra_filtered_compact.geoparquet"
]
},
{
Expand Down Expand Up @@ -509,7 +558,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.7"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 4c5ebba

Please sign in to comment.