Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

roubikon-0.2.2.tar.gz (2.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

roubikon-0.2.2-py3-none-any.whl (2.3 MB view details)

Uploaded Python 3

File details

Details for the file roubikon-0.2.2.tar.gz.

File metadata

  • Download URL: roubikon-0.2.2.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

Hashes for roubikon-0.2.2.tar.gz
Algorithm Hash digest
SHA256 16d391e5c27cfc9d8e2d6ff2d9d39ee3e31af8794e8fed1dd00044b854cca9e2
MD5 36688d7c03cfd2c427b9df2d43997b67
BLAKE2b-256 ab86a753344035d61a1ae4315e21c257d92c6da2eed988d6281f4efbe42729f2

See more details on using hashes here.

File details

Details for the file roubikon-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: roubikon-0.2.2-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

Hashes for roubikon-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 be9686ea5fa8dbee3a861586f59ceb51bed1a7d1481977cf9ba1dad6b8b40e60
MD5 9322248787542b650b1b2a62d0a9bf9f
BLAKE2b-256 607b91a32084f702b2d4b517864665291cf93f13c6ca0e253bc8fdd60365b3a5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page