Posts
read more
Route search
The python script route-search.py is a command-line utility to query and find optimal transit connections in Oslo using the Entur national transit database. It is optimized to help you find the best bus, metro, and rail combinations from a starting coordinate to a destination, matching specific arrival constraints and jogging capabilities.
Features
- Automated Geocoding: Translates text destinations (e.g.,
"Oslo S") directly into Entur’s National Stop Register IDs. - Radial Location Scan: Scans all transit stops within a custom radius (default 1.5 km) around your coordinates.
- Jog Off Calculator: Computes the exact time you need to leave your coordinates (JOG OFF time), factoring in distance, jogging speed, and a pre-boarding buffer.
- Optimal Ordering: Orders connections in descending order of the jog off time (so the latest departure is shown first).
- Flexible Modes: Supports filtering by Metro (
metro), Bus (bus), and Train (rail).
Installation & Dependencies
The script is written in standard Python 3 and requires no
external dependencies. It uses built-in libraries (urllib, json,
datetime, argparse, etc.) out of the box.