A browser-based tool to visualize GTFS transit trip shapes on a map, define a detour segment between two stops, and compute an alternative road route via the Geoportail routing API. Compare the original segment distance vs. the detour distance.
- GTFS feed selection — import a ZIP file, paste a URL, or search online catalogs (transport.data.gouv.fr, MobilityData)
- Trip search — autocomplete search by trip short name with direction/headsign disambiguation
- Shape visualization — display the full trip shape on a MapLibre map (IGN or OSM Liberty style)
- Detour segment — select start and end stops to highlight the segment to reroute
- Waypoint placement — click on the map to add draggable intermediate waypoints
- Route computation — compute the shortest car route via the Geoportail Navigation API (bdtopo-osrm)
- Distance comparison — view original segment distance, detour distance, and net difference
- Vite + React + TypeScript
- react-gtfs-selector — GTFS source picker
- gtfs-sqljs — in-browser GTFS querying via sql.js (Web Worker)
- MapLibre GL JS — map display
- @turf/turf — geometry operations
- Geoportail Navigation API — road routing
npm install
npm run devOpen http://localhost:5173 and:
- Select a GTFS feed (file, URL, or online search)
- Search for a trip by short name
- Select start and end stops for the detour segment
- Click on the map to add waypoints
- Click "Compute detour route" to see the alternative path and distance comparison
npm run build # outputs to dist/
npm run preview # preview the production build locallyThe app is automatically deployed to GitHub Pages on push to main.
MIT