OSRM (Open Source Routing Machine) is an open-source routing engine designed to calculate routes between locations using road-network data from OpenStreetMap (OSM).
OSRM can calculate a road-based route and return information such as:
Kathmandu → Lalitpur
↓
OSRM
↓
Road Route
Distance: 8.4 km
Duration: ~25 min
While working on a map-based application, I needed to calculate routes between two different locations. At first, it seemed simple: provide a starting coordinate and a destination coordinate, and get a route between them.
But in practice, several challenges appeared:
So the actual problem was:
How can we calculate reliable, road-based routes between two coordinates using real-world road data, while having control over the routing service?
This led me to OSRM (Open Source Routing Machine).