Street routing
Calculate a time-distance matrix
Calculate a time-distance matrix from multiple source locations to multiple target locations. Useful for solving optimization problems.
post/valhalla/sources_to_targets
Request
- Base URL: https://transit.land/api/v2/routing
- URL: https://transit.land/api/v2/routing/valhalla/sources_to_targets
- Auth: one of:
- API key in header apikey
- API key in query parameter apikey
Request body
Example request
{
"costing": "auto",
"exclude_locations": [
{
"preferred_side": "opposite",
"search_filter": {
"max_road_class": "primary",
"min_road_class": "primary"
},
"street_side_cutoff": "primary",
"type": "break"
}
],
"format": "json",
"shape_format": "polyline6",
"sources": [
{
"preferred_side": "opposite",
"search_filter": {
"max_road_class": "primary",
"min_road_class": "primary"
},
"street_side_cutoff": "primary",
"type": "break"
}
],
"targets": [
{
"preferred_side": "opposite",
"search_filter": {
"max_road_class": "primary",
"min_road_class": "primary"
},
"street_side_cutoff": "primary",
"type": "break"
}
]
}Response
Successful response
Example response
{
"algorithm": "costmatrix"
}Changes
No recorded changes to this operation across all 1 revision of this API.