route_osrm
Compute a route between waypoints using OSRM. Specify profile (car, bike, foot) or custom OSRM instance. Returns distance and duration, optionally adds route geometry as a line layer to the QGIS project.
Instructions
Compute a route between waypoints via OSRM.
waypoints is a list of [lat, lon] pairs (>= 2). profile is one of
"car" (default, the public router.project-osrm.org demo), "bike",
"foot" (community-run routing.openstreetmap.de demo - best-effort, no
SLA, see routing_client.py). Pass base_url for a self-hosted OSRM
instance instead. Returns distance (m) and duration (s); pass
add_to_project=True to also add the route geometry as a line layer
(EPSG:4326) rather than returning raw coordinates.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profile | No | car | |
| base_url | No | ||
| waypoints | Yes | ||
| layer_name | No | ||
| add_to_project | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||