OVERTUREMAPS-PY
Command-line tool of the Overture Maps Foundation open geospatial map data
URL: https://github.com/overturemaps/overturemaps-py
Example
This wrapper can be used in the following way:
rule download:
output:
# Overture maps datafile
path="results/division_boundary.parquet",
params:
# file format to request
format="geoparquet",
# Data type to request
type="division_boundary",
# bounding box in "west,south,east,north" format
bbox=[15.87, -19.02, 28.88, -9.66], # optional
threads: 1
log:
"logs/overturemaps/download.log"
wrapper:
"v7.6.1/geo/overturemaps/download"
Note that input, output and log file paths can be chosen freely.
When running with
snakemake --use-conda
the software dependencies will be automatically deployed into an isolated environment before execution.
Notes
Read https://docs.overturemaps.org/ for data schema information of the downloaded datasets.
Software dependencies
overturemaps=0.17.0
Params
format: format of the output file. See overture maps website for avialable formats.type: data type to download. See overture maps website for available data types.bbox: Optional. West, south, east, north longitude and latitude coordinates. When omitted the entire dataset will be downloaded.extra: Optional. Additional program arguments for future-proofing.
Code
__author__ = "Ivan Ruiz Manuel"
__copyright__ = "Copyright 2025, Ivan Ruiz Manuel"
__email__ = "i.ruizmanuel@tudelft.nl"
__license__ = "MIT"
from snakemake.shell import shell
log = snakemake.log_fmt_shell(stdout=True, stderr=True)
extra = snakemake.params.get("extra", "")
bbox = snakemake.params.get("bbox", "")
if bbox:
if isinstance(bbox, list):
bbox = ",".join(map(str, bbox))
bbox = f"--bbox {bbox}"
shell(
"overturemaps download"
f" -f {snakemake.params.format}"
f" --type {snakemake.params.type}"
f" {bbox}"
f" {extra}"
f" --output {snakemake.output.path}"
f" {log}"
)