Skip to main content

OSRM road graph

Vaazhvu routes on the Geofabrik South India extract (asia/india/southern-zone, ODbL), which covers all of Tamil Nadu. It is built with the MLD pipeline (OSRM v6).

make osrm-data # downloads infra/osrm/southern-zone-latest.osm.pbf, then osrm-extract (car), osrm-partition, osrm-customize
docker compose up -d # starts the osrm container with the rest of the stack
  • Region: the extract is config/region.yaml osm_extract. The Makefile and docker-compose.yml take it as OSRM_REGION (default southern-zone-latest; the Makefile exports it to compose), and tests/test_region.py keeps the three equal. For another region: change osm_extract, then run make osrm-data OSRM_REGION=<name> and make gis.

  • Port: the container listens on 5000 and is published on host 5001, because the macOS AirPlay Receiver owns port 5000 and answers 403. Inside Compose the api reaches it as http://osrm:5000 (set in docker-compose.yml); host tooling (make fleet-plan, make eval) uses http://127.0.0.1:5001.

  • Table size: the service runs with --max-table-size 3000. The fleet planner's 4,189 × 656 matrix is fetched in blocks of at most 2,000 coordinates per request (routing/provider.py::TABLE_MAX_POINTS), because the coordinates travel in the URL and httpx caps a URL at 65,536 characters. A table that still fails logs a warning and falls back to Haversine; the fleet plan records which one it used in coverage_matrix.

  • Check it: curl "http://127.0.0.1:5001/route/v1/driving/80.27,13.03;80.21,13.01?overview=false".

  • Without OSRM: the backend falls back to Haversine distance at urban speed. Everything still works, with straight-line routes and rough ETAs.

  • Uses: routing/provider.py (route geometry, duration table) and routing/traffic.py (alternatives around closures).