This repository is still under heavy development. Features may change, and documentation will be updated accordingly. Use at your own risk and feel free to contribute!
OvertureMapsDownloader is a monorepo that contains two main projects aimed at simplifying the process of working with Overture Maps data in Parquet format.
The first project is a browser-based application that leverages DuckDB-WASM and mapping functionalities. This allows you to query Overture Maps data in Parquet format directly within your web browser. It offers a seamless and interactive way to work with geospatial data without the need for any backend services. The codebase for this project is located in the /app
folder.
The second project focuses on data manipulation, downloading, and conversion of Overture Maps data. It utilizes technologies like DuckDB, Python, and IPython Notebooks, along with GDAL/OGR for data conversion. This project is containerized using Docker, making it easy to integrate into existing pipelines and ETL workflows. For hands-on examples, check out the Jupyter notebooks available in the examples
folder.
Whether you're a data scientist, a geospatial analyst, or a developer, OvertureMapsDownloader offers comprehensive solutions for your geospatial data needs.
- Overture Maps Downloader
For developers interested in running DuckDB-WASM in the browser, the relevant codebase is located in the /app
folder at the root of the repository. This setup allows you to develop, run, and build the DuckDB-WASM component seamlessly.
-
Navigate to the
/app
folder:cd /app
-
Install the required packages:
yarn install
Note: Make sure you have npm version 18 or above for compatibility.
-
Start the development server:
yarn dev
then open http://localhost:5173/OvertureMapsDownloader in your browser
- Docker and Docker Compose
- GeoJSON file containing the bounding box polygon (e.g.,
bbox.geojson
) you can make yours easly on https://geojson.io or useexamples/bbox.json
for testing
To get started, you'll need to pull the Docker image from the GitHub Container Registry:
docker pull ghcr.io/youssef-harby/overturemapsdownloader:latest
- GDAL/OGR v3.8.4
- Python v3.10 (and GDAL/OGR Python bindings + duckdb python bindings)
- DuckDB v0.10.0
- Jupyter.. and more
-
Create a folder and place your bounding box polygon in GeoJSON format inside it (e.g.,
bbox.geojson
). -
Navigate to the folder:
cd /examples # e.g., cd /path/to/your/folder contains bbox.geojson and will contain the output file
-
Run the following command to download geospatial data:
docker run -v $(pwd):/examples ghcr.io/youssef-harby/overturemapsdownloader:latest OMDownloader omaps --theme places --ptype place --bbox /examples/bbox.geojson --output /examples/places.parquet
The omaps Command
OMDownloader omaps [OPTIONS]
options:
--theme [admins|buildings|buildings|places|transportation]
Theme of the data to download--ptype [locality|administrativeBoundary|building|place|water|connector|segment]
Type of the data to download--bbox PATH
Bounding box polygon in GeoJSON format as a path to a file--output PATH
Output file path (e.g.,places.parquet
)--help
Show this message and exit.
# admins/locality
docker run -v $(pwd):/examples ghcr.io/youssef-harby/overturemapsdownloader:latest OMDownloader omaps --theme admins --ptype locality --bbox /examples/bbox.geojson --output /examples/locality.parquet
# admins/administrativeBoundary
docker run -v $(pwd):/examples ghcr.io/youssef-harby/overturemapsdownloader:latest OMDownloader omaps --theme admins --ptype administrativeBoundary --bbox /examples/bbox.geojson --output /examples/admins.parquet
# buildings/building
docker run -v $(pwd):/examples ghcr.io/youssef-harby/overturemapsdownloader:latest OMDownloader omaps --theme buildings --ptype building --bbox /examples/bbox.geojson --output /examples/building.parquet
# places/place
docker run -v $(pwd):/examples ghcr.io/youssef-harby/overturemapsdownloader:latest OMDownloader omaps --theme places --ptype place --bbox /examples/bbox.geojson --output /examples/place.parquet
# transportation/connector
docker run -v $(pwd):/examples ghcr.io/youssef-harby/overturemapsdownloader:latest OMDownloader omaps --theme transportation --ptype connector --bbox /examples/bbox.geojson --output /examples/connector.parquet
# transportation/segment
docker run -v $(pwd):/examples ghcr.io/youssef-harby/overturemapsdownloader:latest OMDownloader omaps --theme transportation --ptype segment --bbox /examples/bbox.geojson --output /examples/segment.parquet
# admins/locality
OMDownloader omaps --theme admins --ptype locality --bbox examples/bbox.geojson --output examples/locality.parquet
# admins/administrativeBoundary
OMDownloader omaps --theme admins --ptype administrativeBoundary --bbox examples/bbox.geojson --output examples/admins.parquet
# buildings/building
OMDownloader omaps --theme buildings --ptype building --bbox examples/bbox.geojson --output examples/building.parquet
# places/place
OMDownloader omaps --theme places --ptype place --bbox examples/bbox.geojson --output examples/place.parquet
# transportation/connector
OMDownloader omaps --theme transportation --ptype connector --bbox examples/bbox.geojson --output examples/connector.parquet
# transportation/segment
OMDownloader omaps --theme transportation --ptype segment --bbox examples/bbox.geojson --output examples/segment.parquet
To convert the downloaded data to GeoPackage format, run the following command:
docker run -v $(pwd):/examples ghcr.io/youssef-harby/overturemapsdownloader:latest ogr2ogr /examples/output.gpkg /examples/places.parquet
docker run -v $(pwd):/examples ghcr.io/youssef-harby/overturemapsdownloader:latest ogr2ogr -dsco MAXZOOM=14 /examples/output.mbtiles /examples/places.parquet
docker run -v $(pwd):/examples ghcr.io/youssef-harby/overturemapsdownloader:latest ogr2ogr /examples/output.gdb /examples/places.parquet
If you prefer to use Jupyter notebooks for your geospatial data manipulation tasks, you can easily set up a Jupyter environment using Docker Compose.
-
Clone the repository:
git clone https://github.com/Youssef-Harby/OvertureMapsDownloader.git
-
Navigate to the repository folder:
cd OvertureMapsDownloader
-
Run the following Docker Compose command:
docker compose up
This will start a Jupyter notebook server accessible at http://localhost:8888/lab.
For advanced configurations, please refer to the config.yml
file.
- Add Popup on click of the feautre to show the result of the query
- Add a button to use local parquet url instead of the remote one
- Add a button to download the result of the query as GeoJSON..etc
- Add a loading spinner while the query is running
- Query by bbox drawn on the map
- feel free to add more ...
- Resolve JSON values to be parsed to the correct data type OSGeo/gdal#8227
Everyone is invited to contribute to this project. Whether you're a beginner or experienced, your help is valuable. Don't worry about not getting it right the first time; the idea is to grow and learn together.
You can contribute by:
- Commenting on or adding to existing issues
- Starting or participating in discussions
If you're new and have questions or need guidance, the discussions page is a great place to start.