Back to Rerun

channel = "release" # disabled since the openstreetmap API is flaky

examples/python/openstreetmap_data/README.md

0.31.42.1 KB
Original Source
<!--[metadata] title = "OpenStreetMap data" tags = ["Map", "Blueprint"] thumbnail_dimensions = [480, 480] thumbnail = "https://static.rerun.io/osm_data/0be94071469c49f98326d85456ed2a3af8d1733a/480w.png" # channel = "release" # disabled since the openstreetmap API is flaky # include_in_manifest = true -->

Download OpenStreetMap data via the Overpass API and query language, and display it on a map view.

<picture> <source media="(max-width: 480px)" srcset="https://static.rerun.io/openstreetmap_data/5da23e9244d5cfead76ad484d09ba70cf62c4e57/480w.png"> <source media="(max-width: 768px)" srcset="https://static.rerun.io/openstreetmap_data/5da23e9244d5cfead76ad484d09ba70cf62c4e57/768w.png"> <source media="(max-width: 1024px)" srcset="https://static.rerun.io/openstreetmap_data/5da23e9244d5cfead76ad484d09ba70cf62c4e57/1024w.png"> <source media="(max-width: 1200px)" srcset="https://static.rerun.io/openstreetmap_data/5da23e9244d5cfead76ad484d09ba70cf62c4e57/1200w.png"> </picture>

Run the code

To run this example, make sure you have the required Python version, the Rerun repository checked out and the latest SDK installed:

bash
pip install --upgrade rerun-sdk  # install the latest Rerun SDK
git clone [email protected]:rerun-io/rerun.git  # Clone the repository
cd rerun
git checkout latest  # Check out the commit matching the latest SDK release

Install the necessary libraries specified in the requirements file:

bash
pip install -e examples/python/openstreetmap_data

To experiment with the provided example, simply execute the main Python script:

bash
python -m openstreetmap_data # run the example

If you wish to customize it, explore additional features, or save it use the CLI with the --help option for guidance:

bash
python -m openstreetmap_data --help