Overture Maps Downloader simplifies geospatial data manipulation
Project description
Overture Maps Downloader
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!
Overview
OvertureMapsDownloader is a monorepo that contains two main projects aimed at simplifying the process of working with Overture Maps data in Parquet format.
DuckDB-WASM with Map
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.
Data Manipulation/Downloading and Conversion
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.
Table of Contents
- Overture Maps Downloader
DuckDB-WASM in Browser (Developers)
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.
Getting Started
-
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
Visual Demo
Data Manipulation/Downloading and Conversion
Prerequisites
- 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
Installation
To get started, you'll need to pull the Docker image from the GitHub Container Registry:
docker pull ghcr.io/youssef-harby/overturemapsdownloader:latest
the docker image manily contains the following tools:
- GDAL/OGR v3.8.4
- Python v3.10 (and GDAL/OGR Python bindings + duckdb python bindings)
- DuckDB v0.10.0
- Jupyter.. and more
Usage
Download Geospatial Data
-
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
Commands
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.
Examples of downloading data CLI:
With Docker:
# 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
Without Docker you can use the following commands with (pip install overturemapsdownloader
):
# 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
Convert Parquet to GeoPackage
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
Convert Parquet to MBTiles (will support tippecanoe in the future)
docker run -v $(pwd):/examples ghcr.io/youssef-harby/overturemapsdownloader:latest ogr2ogr -dsco MAXZOOM=14 /examples/output.mbtiles /examples/places.parquet
Convert Parquet to ESRI File Geodatabase vector (OpenFileGDB)
docker run -v $(pwd):/examples ghcr.io/youssef-harby/overturemapsdownloader:latest ogr2ogr /examples/output.gdb /examples/places.parquet
Using Jupyter Notebooks (Data Scientists/GIS Analysts)
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.
Configuration
For advanced configurations, please refer to the config.yml
file.
Roadmap
DuckDB-WASM in Browser (Developers) (ReactJS)
- 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 ...
Data Manipulation/Downloading and Conversion (Python)
- Resolve JSON values to be parsed to the correct data type OSGeo/gdal#8227
Contributing
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file overturemapsdownloader-0.1.9.tar.gz
.
File metadata
- Download URL: overturemapsdownloader-0.1.9.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/6.5.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b95a6e8784d5f819f6c5db2b5286a4b537c888169ab997c4ae478a7b5f4a7cc6 |
|
MD5 | fe6ee1ea4cbd6fa06d3294238cf9b854 |
|
BLAKE2b-256 | f88f1181847fb1ed49b36fe40dabc370e617d36c1dee94e3291a923a72fc1853 |
File details
Details for the file overturemapsdownloader-0.1.9-py3-none-any.whl
.
File metadata
- Download URL: overturemapsdownloader-0.1.9-py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/6.5.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d17c3a49acedb4b8e8960ab29333bab6b1e168e9bd28c0e2164b35fa5dcf93fd |
|
MD5 | c11ff2997f480a66fcaa96f15cf040b5 |
|
BLAKE2b-256 | 7a581a9a5ced3b4bc18bc78935345df846457170918558224695351dfc2a3266 |