OvertureMaestro Command Line Interface¶
OvertureMaestro contains a CLI for users convenience. It is not installed by default when installed using pip install overturemaestro
.
To include the CLI, OvertureMaestro has to be installed with additional group called cli
: pip install overturemaestro[cli]
.
CLI is based on the typer
library and exposes almost all of the features implemented in the Python API.
After installation, the OvertureMaestro
(or overturemaestro
) command will be available in the shell.
Each command error returns a verbose description what went wrong.
# Extend the default console width from 80 characters
import os
os.environ["COLUMNS"] = "160"
Basic usage¶
By default, the overturemaestro requires just the path to the PBF
file. Without it, there will be an error.
! OvertureMaestro
Usage: OvertureMaestro [OPTIONS] theme type Try 'OvertureMaestro -h' for help. ╭─ Error ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ OvertureMaestro requires theme, type and a geometry filter (one of --geom-filter-bbox --geom-filter-file, --geom-filter-geocode, --geom-filter-geojson, │ │ --geom-filter-index-geohash, --geom-filter-index-h3, --geom-filter-index-s2, --geom-filter-wkt) to download the data. │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Let's download a small extract of buildings in Monaco
! OvertureMaestro buildings building --geom-filter-bbox 7.416486,43.730886,7.421931,43.733507
Downloading release indexes 100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 15/15 • 0:00:03 < 0:00:00 • 3.91 it/s
Downloading parquet files (buildings/building) 100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1/1 • 0:00:03 < 0:00:00 • 0 it/s
⠋ Saving final geoparquet file • 0:00:00 Finished operation in 0:00:07 files/2024-12-18.0/theme=buildings/type=building/784274db_nofilter.parquet
Second execution of this command will immediately return a path to the previously generated file.
! OvertureMaestro buildings building --geom-filter-bbox 7.416486,43.730886,7.421931,43.733507
Finished operation in 0:00:00 files/2024-12-18.0/theme=buildings/type=building/784274db_nofilter.parquet
To force the regeneration of the GeoParquet file, add the --ignore-cache
flag (or --no-cache
) to the command.
! OvertureMaestro buildings building --geom-filter-bbox 7.416486,43.730886,7.421931,43.733507 --ignore-cache
Downloading parquet files (buildings/building) 100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1/1 • 0:00:02 < 0:00:00 • 0 it/s
⠋ Saving final geoparquet file • 0:00:00 Finished operation in 0:00:02 files/2024-12-18.0/theme=buildings/type=building/784274db_nofilter.parquet
You can also set the output file path using -o
(or --output
) option.
! OvertureMaestro buildings building --geom-filter-bbox 7.416486,43.730886,7.421931,43.733507 -o monaco_buildings.parquet
Downloading parquet files (buildings/building) 100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1/1 • 0:00:02 < 0:00:00 • 0 it/s
⠋ Saving final geoparquet file • 0:00:00 Finished operation in 0:00:02 monaco_buildings.parquet
You can quickly inspect the data using pixel-map
tool that displays the geo data in the terminal.
! pixel-map monaco_buildings.parquet --width 82 --height 23 --renderer ascii-bw
┏━━━━━━━━━━━━━━━━━━━━━━━━━━ monaco_buildings.parquet ━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ ┃ ┃ , @L yr ][ __, ,_ ,, _s@@[ `┃ ┃ `QP_/Q@ P" J@ j[]UE jL,Z[ ^@y QS[JDDR __ ┃ ┃ __RDP"\, @@ JBJ[@ JE,J@JL8B """__,uq@Q[L"` ┃ ┃ ]QQP,Jj @QQL @ @]L P^"" _,u @DDRPP^^""" _yL ┃ ┃ ^@)PjG@" `98@F,ZL8JB s@QQDP^[,yLqq@@QQQQ@ ]QQh_ ┃ ┃ jFj\@` @by_ ` ^RQL^0L`[yp0P^"\p[J@QQQQQQ@L "0QD ┃ ┃ ,"9`_@QF9Q@ ,_ "^= "` ` @@ "__"""""`,@D`__ ┃ ┃ aQQP "^F @@F ,@QQ@pu * JQ[`@PFD8G8L]@ `Y" ┃ ┃ ,q_"" @@r "` _"9QQQP" "^ 38QQQQQLJ@L yD~ ┃ ┃ ^0QQh_@Q[_@B 0@@y"` Jqy `""` "P^" ┃ ┃ `"]`"9QQD` P^` ┃ ┃ y@@L_F` `@P _ _ ┃ ┃ _@Qup"" _, p@QQpu__^]F" ` ┃ ┃ .@QDD` " = ` _@Q@"`"9Qpq/^h@ ┃ ┃ """ = `9Q@y_ _dQP ` -uu,,_____,__ ┃ ┃ ,q~ __ "0@bdQP` jR0qGQ"^^PP^^ ┃ ┃ yP" _y ,/`` @@` /[jR0qpy ┃ ┃ 9" ` <P" @F" ` ┃ ┃ ┃ ┗━━━━━━━━━━━ BBOX: 7.41481,43.73052,7.42429,43.73394 | MAP W:80 H:20 ━━━━━━━━━━━┛
Help command¶
To get the full description of all arguments of the OvertureMaestro command, you can use the --help
(or -h
) parameter.
! OvertureMaestro --help
Usage: OvertureMaestro [OPTIONS] theme type OvertureMaestro CLI. Wraps public functions and prints final path to the saved geoparquet file at the end.
╭─ Arguments ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ theme_value theme Data theme value │ │ type_value type Feature type within theme │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ --release-version,--release TEXT OvertureMaps dataset release version. If not provided, will automatically select the newest │ │ available version. │ │ --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. │ │ --filter,--pyarrow-filter FILTER Filters to apply on a pyarrow dataset. Required format: <column(s)> <operator> <value>. Nested │ │ column names should be passed separated by a dot. Can pass multiple filters. │ │ --output -o PATH Path where to save final geoparquet file. If not provided, it will be generated automatically based │ │ on the input pbf file name. │ │ --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] │ │ --silent Whether to disable progress reporting. │ │ --transient Whether to make more transient (concise) progress reporting. │ │ --show-release-versions Show available OvertureMaps release versions and exit. │ │ --show-theme-type-pairs Show available OvertureMaps theme type pairs for the release 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 -h Show this message and exit. │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Geometry filters¶
OvertureMaestro
will automatically download required data based on multiple geometry filters:
- Text to geocode using Nominatim
- WKT geometry
- GeoJSON geometry
- Geometry file path
- H3 spatial index
- Geohash spatial index
- S2 spatial index
OvertureMaestro
will raise an error if provided geometry has parts without area (such as Points, LineStrings or empty geometry).
Let's see the example based on Monaco region.
First, we will visualise multiple filters on the map.
import geopandas as gpd
from overturemaestro.cli import (
BboxGeometryParser,
GeocodeGeometryParser,
GeohashGeometryParser,
GeoJsonGeometryParser,
H3GeometryParser,
S2GeometryParser,
WktGeometryParser,
)
bbox_string = "7.416486,43.730886,7.421931,43.733507"
geocode_string = "Monaco-Ville, Monaco"
geojson_string = """{"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"}}"""
wkt_string = "POLYGON ((7.414 43.735, 7.414 43.732, 7.419 43.732, 7.419 43.735, 7.414 43.735))"
h3_string = "893969a4037ffff"
geohash_string = "spv2bcs"
s2_string = "12cdc28dc"
geometry_types = ["BBox", "Geocode", "GeoJSON", "WKT", "H3", "GeoHash", "S2"]
geometries = [
BboxGeometryParser().convert(bbox_string),
GeocodeGeometryParser().convert(geocode_string),
GeoJsonGeometryParser().convert(geojson_string),
WktGeometryParser().convert(wkt_string),
H3GeometryParser().convert(h3_string),
GeohashGeometryParser().convert(geohash_string),
S2GeometryParser().convert(s2_string),
]
gpd.GeoDataFrame(
data=dict(type=geometry_types),
geometry=geometries,
crs=4326,
).explore(column="type", tiles="CartoDB positron")
Now we will execute each filter and let OvertureMaestro find required region on its own.
During first execution, OvertureMaestro will cache three PBF files sources locally. This operation takes some time.
The --silent
flag will disable the progress output to the terminal.
! OvertureMaestro buildings building --geom-filter-bbox 7.416486,43.730886,7.421931,43.733507 --silent --output files/bbox_example.parquet
files/bbox_example.parquet
Geocoding¶
! OvertureMaestro buildings building --geom-filter-geocode 'Monaco-Ville, Monaco' --silent --output files/geocode_example.parquet
files/geocode_example.parquet
GeoJSON¶
! OvertureMaestro buildings building \
--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"}}' \
--silent --output files/geojson_example.parquet
files/geojson_example.parquet
Geohash¶
! OvertureMaestro buildings building --geom-filter-index-geohash spv2bcs --silent --output files/geohash_example.parquet
files/geohash_example.parquet
H3¶
! OvertureMaestro buildings building --geom-filter-index-h3 893969a4037ffff --silent --output files/h3_example.parquet
files/h3_example.parquet
S2¶
! OvertureMaestro buildings building --geom-filter-index-s2 12cdc28dc --silent --output files/s2_example.parquet
files/s2_example.parquet
WKT¶
! OvertureMaestro buildings building --geom-filter-wkt 'POLYGON ((7.414 43.735, 7.414 43.732, 7.419 43.732, 7.419 43.735, 7.414 43.735))' \
--silent --output files/wkt_example.parquet
files/wkt_example.parquet
Plot all results for comparison
import matplotlib.patches as mpatches
import matplotlib.pyplot as plt
fig, axs = plt.subplots(2, 4, sharex=True, sharey=True, figsize=(10, 5))
for idx, (geometry_type, geometry) in enumerate(zip(geometry_types, geometries)):
ax = axs[idx // 4, idx % 4]
gdf = gpd.read_parquet(f"files/{geometry_type.lower()}_example.parquet")
gdf.plot(ax=ax, markersize=1, zorder=1, alpha=0.8)
gdf.boundary.plot(ax=ax, markersize=0, zorder=1, alpha=0.8)
gpd.GeoSeries([geometry], crs=4326).plot(
ax=ax,
color=(0, 0, 0, 0),
zorder=2,
hatch="///",
edgecolor="orange",
linewidth=1.5,
)
ax.set_title(geometry_type)
axs[1, 3].set_axis_off()
blue_patch = mpatches.Patch(color="C0", alpha=0.8, label="OSM features")
orange_patch = mpatches.Patch(
facecolor=(0, 0, 0, 0), edgecolor="orange", hatch="///", linewidth=1.5, label="Geometry filter"
)
fig.legend(handles=[blue_patch, orange_patch], bbox_to_anchor=(0.98, 0.35))
fig.tight_layout()
Theme and type¶
Overture Maps data uses themes
and types
to partition the dataset by function. User can retrieve this list for any available release version supported by OvertureMaestro
.
Full definition is explained in the official schema documentation.
Displaying available extracts¶
CLI exposes a dedicated flag --show-extracts
(or --show-osm-extracts
) for display a list of available extracts.
You can read more about it in a dedicated OSM extracts example.
Without providing an OSM extract source (--osm-extract-source
), all sources will be displayed at once.
! OvertureMaestro --show-theme-type-pairs
2024-12-18.0 release ┏━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┓ ┃ Theme ┃ Type ┃ ┡━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━┩ │ addresses │ address │ │ base │ bathymetry │ │ base │ infrastructure │ │ base │ land │ │ base │ land_cover │ │ base │ land_use │ │ base │ water │ │ buildings │ building │ │ buildings │ building_part │ │ divisions │ division │ │ divisions │ division_area │ │ divisions │ division_boundary │ │ places │ place │ │ transportation │ connector │ │ transportation │ segment │ └────────────────┴───────────────────┘
Let's see the example based on the London region.
Buildings¶
! OvertureMaestro buildings building --geom-filter-geocode "City of London" --silent --output files/london_buildings_example.parquet
files/london_buildings_example.parquet
Places¶
! OvertureMaestro places place --geom-filter-geocode "City of London" --silent --output files/london_places_example.parquet
files/london_places_example.parquet
Water¶
! OvertureMaestro base water --geom-filter-geocode "City of London" --silent --output files/london_water_example.parquet
files/london_water_example.parquet
Roads¶
! OvertureMaestro transportation segment --geom-filter-geocode "City of London" \
--filter "subtype == road" --silent --output files/london_roads_example.parquet
files/london_roads_example.parquet
Plot all different types of features for comparison
import matplotlib.pyplot as plt
from overturemaestro import geocode_to_geometry
geometry_filter = gpd.GeoSeries([geocode_to_geometry("City of London")], crs=4326)
bounds = geometry_filter.total_bounds
geometry_types = ["water", "roads", "buildings", "places"]
colors = ["#118AB2", "#073B4C", "#06D6A0", "#FFD166"]
fig, axs = plt.subplot_mosaic(
"""
aa
aa
bp
rw
""",
figsize=(10, 12),
layout="constrained",
)
main_ax = axs["a"]
main_ax.set_title("City of London")
for geometry_type, color in zip(geometry_types, colors):
filename = f"files/london_{geometry_type}_example.parquet"
gdf = gpd.read_parquet(filename, columns=["geometry"])
for ax in (main_ax, axs[geometry_type[0]]):
gdf.plot(ax=ax, markersize=1, zorder=1, alpha=0.8, color=color)
for geometry_type in geometry_types:
axs[geometry_type[0]].set_title(geometry_type.capitalize())
for key, ax in axs.items():
ax.set_xlim([bounds[0] - 0.001, bounds[2] + 0.001])
ax.set_ylim([bounds[1] - 0.001, bounds[3] + 0.001])
if key == "a":
continue
geometry_filter.plot(
ax=ax,
color=(0, 0, 0, 0),
zorder=2,
edgecolor="#EF476F",
linewidth=1.5,
)
ax.set_axis_off()
PyArrow filters¶
By default, OvertureMaestro
loads all of the features intersecting given geometry.
Hovewer, there is also an option to pass filters (--filter
or --pyarrow-filter
) used by PyArrow during downloading step.
Filters are expected to be strings in this format: <column name(s)> <operator> <value>
.
Examples: confidence > 0.95
, subtype == road
, categories,primary = museum
.
Passed strings are parsed to pyarrow.Expression
. Multiple filters can be passed to the CLI.
You can read abaout every dataset type schema and available fields here.
Note: Overture Maps schema can change between release versions.
Load only rivers¶
! OvertureMaestro base water --filter "subtype = river" \
--geom-filter-bbox "17.010921,51.093406,17.054266,51.122229" \
--output files/wroclaw_rivers_example.parquet
Downloading parquet files (base/water) 100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1/1 • 0:00:03 < 0:00:00 • 0 it/s
⠋ Saving final geoparquet file • 0:00:00 Finished operation in 0:00:03 files/wroclaw_rivers_example.parquet
! pixel-map files/wroclaw_rivers_example.parquet --width 82 --height 23 --renderer ascii-bw
┏━━━━━━━━━━━━━━━━━━━━━━━ wroclaw_rivers_example.parquet ━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ ` ┃ ┃ `` ` ` ┃ ┃ `` ┃ ┃ ` ` ┃ ┃ ` ┃ ┃ j~_ ` ┃ ┃ /` `L ┃ ┃ _ ] _~_ ┃ ┃ "=__ **=yhn~`. ┃ ┃ ``"^" " 9u,_ ┃ ┃ "^q ┃ ┃ `k ┃ ┃ /`^==L__ ┃ ┃ -, "^ ┃ ┃ ] ` ┃ ┃ | ` ┃ ┃ ` ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┗━━━━━━━━━━ BBOX: 16.97224,51.08913,17.11833,51.13499 | MAP W:80 H:20 ━━━━━━━━━━┛
Load railroads¶
! OvertureMaestro transportation segment --filter "subtype = rail" \
--geom-filter-bbox "17.010921,51.093406,17.054266,51.122229" \
--output files/wroclaw_rail_example.parquet
Downloading parquet files (transportation/segment) 100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2/2 • 0:00:03 < 0:00:00 • 1.12 it/s
⠋ Saving final geoparquet file • 0:00:00 Finished operation in 0:00:03 files/wroclaw_rail_example.parquet
! ./duckdb :memory: ".mode line" "FROM 'files/wroclaw_rail_example.parquet' LIMIT 1";
id = 0861e2040fffffff047f6bfc2d9d1cc6 geometry = LINESTRING (16.9805225 51.0946538, 16.9806066 51.0946694, 16.9810524 51.094753, 16.9812938 51.0947976, 16.9815377 51.094843, 16.9817702 51.0948879, 16.9819023 51.0949164, 16.9821902 51.0949912, 16.9824008 51.0950477, 16.9825763 51.0950923, 16.9828211 51.0951568, 16.9833693 51.0953009, 16.9840491 51.0954796, 16.9845511 51.0956103, 16.9848796 51.0957022, 16.9852762 51.0958176, 16.985764 51.0959626, 16.9861205 51.0960643, 16.9865681 51.096187, 16.9867597 51.0962403, 16.9872093 51.0963634, 16.9877446 51.096511, 16.9878806 51.0965487, 16.9888711 51.0968202, 16.9894597 51.0969822, 16.9898885 51.0970992, 16.990043 51.097138, 16.990238 51.0971823, 16.9904232 51.0972189, 16.9907457 51.0972796, 16.9916337 51.0974459, 16.9917751 51.0974725, 16.992051 51.0975308, 16.9922243 51.0975702, 16.9931056 51.0977699, 16.9932882 51.0978116, 16.9935232 51.0978652, 16.9938215 51.097933, 16.9943495 51.0980524, 16.9948968 51.0981734, 16.9953327 51.0982573, 16.9956757 51.0983228, 16.9958883 51.098366, 16.9960238 51.0983964, 16.996534 51.0985123, 16.9969145 51.098599, 16.9971026 51.0986439, 16.9973415 51.0987025, 16.9977477 51.0987942, 16.9984186 51.0989469, 16.9990252 51.0990848, 16.9994639 51.0991837, 16.9997758 51.0992471, 16.9999515 51.0992838, 17.000222 51.0993507, 17.0004175 51.0993995, 17.0008773 51.0995156, 17.0011291 51.0995763, 17.0013715 51.0996318, 17.0018662 51.0997438, 17.0023598 51.0998559, 17.0026205 51.0999256, 17.0029076 51.0999947, 17.003692 51.1001695, 17.003884 51.100213, 17.0041066 51.1002641, 17.0047305 51.1004033, 17.0050573 51.1004769, 17.0057109 51.1006237, 17.0059856 51.1006859, 17.0063408 51.1007649, 17.0065164 51.1008042, 17.006881 51.1008907, 17.0071054 51.1009432, 17.0077727 51.1010931, 17.0079536 51.1011336, 17.0083232 51.1012182, 17.0085152 51.1012578, 17.0088091 51.1013128, 17.0090171 51.1013535, 17.0093686 51.1014209, 17.0096357 51.1014791, 17.0101137 51.101585, 17.0102739 51.101623, 17.0103889 51.1016513, 17.0105496 51.1016952, 17.0107135 51.1017389, 17.0108305 51.1017683, 17.0109077 51.1017861, 17.0111645 51.1018441, 17.0116483 51.1019523, 17.0123552 51.10211, 17.0126905 51.102185, 17.0128872 51.1022259, 17.0130134 51.1022478, 17.0133403 51.1022964, 17.0134621 51.1023165, 17.0135727 51.1023391, 17.0136989 51.102368, 17.0142255 51.1024979, 17.0144635 51.1025577, 17.0148204 51.1026487, 17.015143 51.1027308, 17.015777 51.1028929, 17.0165064 51.1030788, 17.0166972 51.1031269, 17.0167724 51.1031457, 17.0169195 51.1031797, 17.0175883 51.1033308, 17.0180948 51.1034455, 17.0184392 51.1035286, 17.0187161 51.1035991, 17.0190241 51.1036779, 17.0197514 51.1038647, 17.0203774 51.1040255, 17.0206977 51.1041078, 17.0210131 51.1041892, 17.0211781 51.1042328, 17.0213387 51.1042827, 17.0214775 51.104331, 17.021636 51.1043874, 17.0217216 51.1044176) bbox = {'xmin': 16.980522, 'xmax': 17.021723, 'ymin': 51.094646, 'ymax': 51.104424} version = 0 sources = [{'property': , 'dataset': OpenStreetMap, 'record_id': w180241078@11, 'update_time': 2018-11-28T17:39:42Z, 'confidence': NULL}, {'property': , 'dataset': OpenStreetMap, 'record_id': w650242652@8, 'update_time': 2024-10-28T00:13:58Z, 'confidence': NULL}] subtype = rail class = names = connectors = [{'connector_id': 08f1e2040e58524a047fead7a9c164f4, 'at': 0.0}, {'connector_id': 08f1e20408c046f2047fef6574625d7e, 'at': 0.882123959}, {'connector_id': 08f1e20408c609aa047d7f210013a305, 'at': 1.0}] routes = subclass = subclass_rules = access_restrictions = level_rules = destinations = prohibited_transitions = road_surface = road_flags = speed_limits = width_rules =
Load museums with a high confidence score¶
Here, the nested field categories.primary
have to be accessed using comma delimited syntax.
! OvertureMaestro places place --filter "categories,primary = museum" --filter "confidence > 0.9" \
--geom-filter-bbox "17.010921,51.093406,17.054266,51.122229" \
--output files/wroclaw_museums_example.parquet
Downloading parquet files (places/place) 100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1/1 • 0:00:03 < 0:00:00 • 0 it/s
⠋ Saving final geoparquet file • 0:00:00 Finished operation in 0:00:03 files/wroclaw_museums_example.parquet
! ./duckdb :memory: "SELECT names['primary'], ROUND(confidence, 4) confidence FROM 'files/wroclaw_museums_example.parquet'";
┌────────────────────────────────────────────────────────────┬────────────┐ │ "names"['primary'] │ confidence │ │ varchar │ double │ ├────────────────────────────────────────────────────────────┼────────────┤ │ Niewidzialny Dom we Wrocławiu - Invisible House in Wroclaw │ 0.9285 │ │ Muzeum Książąt Lubomirskich │ 0.9285 │ │ Muzeum Iluzji Wroclaw / Museum of illusions Wroclaw │ 0.9398 │ │ Panorama Racławicka │ 0.9119 │ │ Muzeum Narodowe we Wrocławiu │ 0.9398 │ └────────────────────────────────────────────────────────────┴────────────┘