Flask web app for OSM road-network shortest-path navigation and street-view visualization
Project description
roubikon
A Flask-based package for shortest-path route visualization on road networks with street-level imagery.
Features
- Serves a Flask web app with an interactive map interface
- Generates a side-by-side route video combining a 2D map view and street-level photos
- Supports pre-processed street view images or live Google Street View API fetching
- Barrier-free routing with configurable surface and elevation penalties
- Optional LLM-based routing adjustments via Claude API
Installation
pip install roubikon
Usage
1. Extract a road network graph
from roubikon import extract_graph, print_graph_stats
extract_graph("Konstanz, Germany")
print_graph_stats("graph_export.txt")
This downloads the road network for the given city from OpenStreetMap and saves it as graph_export.txt.
2. Start the web app
from roubikon import create_app
app = create_app(
data_file="graph_export.txt",
preprocessed_images_folder="augmented_konstanz_rn_small_preprocessed_rough",
)
app.run(debug=True, port=5000)
Then open http://localhost:5000 in your browser.
3. Optional: enable LLM-based routing adjustments
Pass a Claude API key to let users describe their mobility needs in natural language:
app = create_app(
data_file="graph_export.txt",
preprocessed_images_folder="augmented_konstanz_rn_small_preprocessed_rough",
anthropic_api_key="sk-ant-...",
)
Or set it as an environment variable:
export ANTHROPIC_API_KEY="sk-ant-..."
Get an API key at console.anthropic.com.
Road network file format
The graph_export.txt file follows this structure:
<number of vertices>
<number of edges>
<id> <lat> <lon> <elevation>
...
<node_a> <node_b> <length> <surface_type> <wheelchair>
...
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file roubikon-0.1.9.tar.gz.
File metadata
- Download URL: roubikon-0.1.9.tar.gz
- Upload date:
- Size: 2.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
922214dc2b0b8f6c7f7b1d2eadd26f56456f730835df980070d404055176d3f8
|
|
| MD5 |
fa0c82f664f2457bc5090b6c62842541
|
|
| BLAKE2b-256 |
ef6713b175b0b54ecefd92eab49cade16b89a37ece90e2a2e9f4853b24fc6bd7
|
File details
Details for the file roubikon-0.1.9-py3-none-any.whl.
File metadata
- Download URL: roubikon-0.1.9-py3-none-any.whl
- Upload date:
- Size: 2.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
692ceaa2d2e3f30b8f8b673cc4a294a5ec71286614b9016d900fdd3c0b703997
|
|
| MD5 |
b14fda2b7653a2f9b490f0c5ddfca851
|
|
| BLAKE2b-256 |
039aac900d143395b39ed635c160fcc3d6c13285c5fe88d609e5be011ca32032
|