Compute the area reachable within given time or distance limits from a location, as GeoJSON. Contours come back as linestrings by default, or polygons when polygons is true.
GETPOSThttps://transit.land/api/v2/routing/valhalla/isochrone
Calculate areas reachable within given time or distance limits from a location, as GeoJSON linestrings or polygons.
Request
The request object, url-encoded. Identical to the POST body. Encode spaces as %20 rather than +, or send the JSON without spaces; a + is not decoded as a space here and the request will be rejected as unparseable.
At least one of time or distance must be specified. You can only specify one metric per contour, i.e. time or distance.
Hex color without '#' (e.g. "ff0000").
Contour limit in kilometers.
Contour limit in minutes.
Hex color without '#' (e.g. "ff0000").
Contour limit in kilometers.
Contour limit in minutes.
Factor to remove smaller contours, e.g. a value of 0.5 drops any contours that are less than half the area of the largest contour. Douglas-Peucker polyline generalization tolerance in meters.
Per-location ISO 8601 datetime override, in the format YYYY-MM-DDTHH:MM, e.g. 2016-07-03T08:06.
Latitude of the map location in degrees. If provided the lat and lon parameters will be treated as the routing location and the display_lat and display_lon will be used to determine the side of street. Both display_lat and display_lon must be provided and valid to achieve the desired effect.
Latitude of the map location in degrees. If provided the lat and lon parameters will be treated as the routing location and the display_lat and display_lon will be used to determine the side of street. Both display_lat and display_lon must be provided and valid to achieve the desired effect.
Preferred approach heading in degrees.
How close in degrees a given street's angle must be in order for it to be considered as in the same direction of the heading parameter. The default value is service configuration dependent (60 by default).
minimum_reachability
integerMinimum number of reachable edges for a snap candidate. The default and max values are service configuration dependent (50 and 100 by default, respectively). Label echoed in the response.
node_snap_tolerance
numberSnap-to-node distance tolerance in meters. The default value is service dependent (5 by default).
If set, edges whose layer does not match this value are discarded from candidate search. Note that this is a "soft" filter, meaning if no other candidates are found, Valhalla will fall back to including edges that did not match this filter.
Preferred side of road to snap to.Exampleopposite
Candidate search radius in meters: all viable edge candidates within the radius are correlated. If none are found, the best one outside the radius is correlated. The default is service dependent, and defaults to 0 (only the closest edge is considered as candidate). The max value is service configuration dependent (200 by default).
Rank snap candidates by distance to input. Hard cutoff for candidate search in meters. Default is service configuration dependent (35000 by default).
Optional filters to exclude candidate edges based on their attribution.
Street address hint for snapping.
Enummotorwaytrunkprimarysecondarytertiaryunclassifiedresidentialservice_other
Exampleprimary
street_side_max_distance
integerThe max distance in meters that the input coordinates or display ll can be from the edge centerline for them to be used for determining the side of street. Beyond this distance the side of street is set to none. The default value is service configuration dependent (1000 by default).
street_side_tolerance
integerIf your input coordinate is less than this tolerance away from the edge centerline then we set your side of street to none otherwise your side of street will be left or right depending on direction of travel. The default value is service configuration dependent (5 by default).
First and last location are always forced to break.Enumbreakthroughviabreak_through
Examplebreak
Waiting time in seconds at this stop (break/break_through only, not origin/destination).
Per-location ISO 8601 datetime override, in the format YYYY-MM-DDTHH:MM, e.g. 2016-07-03T08:06.
Latitude of the map location in degrees. If provided the lat and lon parameters will be treated as the routing location and the display_lat and display_lon will be used to determine the side of street. Both display_lat and display_lon must be provided and valid to achieve the desired effect.
Latitude of the map location in degrees. If provided the lat and lon parameters will be treated as the routing location and the display_lat and display_lon will be used to determine the side of street. Both display_lat and display_lon must be provided and valid to achieve the desired effect.
Preferred approach heading in degrees.
How close in degrees a given street's angle must be in order for it to be considered as in the same direction of the heading parameter. The default value is service configuration dependent (60 by default).
minimum_reachability
integerMinimum number of reachable edges for a snap candidate. The default and max values are service configuration dependent (50 and 100 by default, respectively). Label echoed in the response.
node_snap_tolerance
numberSnap-to-node distance tolerance in meters. The default value is service dependent (5 by default).
If set, edges whose layer does not match this value are discarded from candidate search. Note that this is a "soft" filter, meaning if no other candidates are found, Valhalla will fall back to including edges that did not match this filter.
Preferred side of road to snap to.Exampleopposite
Candidate search radius in meters: all viable edge candidates within the radius are correlated. If none are found, the best one outside the radius is correlated. The default is service dependent, and defaults to 0 (only the closest edge is considered as candidate). The max value is service configuration dependent (200 by default).
Rank snap candidates by distance to input. Hard cutoff for candidate search in meters. Default is service configuration dependent (35000 by default).
Optional filters to exclude candidate edges based on their attribution.
Street address hint for snapping.
Enummotorwaytrunkprimarysecondarytertiaryunclassifiedresidentialservice_other
Exampleprimary
street_side_max_distance
integerThe max distance in meters that the input coordinates or display ll can be from the edge centerline for them to be used for determining the side of street. Beyond this distance the side of street is set to none. The default value is service configuration dependent (1000 by default).
street_side_tolerance
integerIf your input coordinate is less than this tolerance away from the edge centerline then we set your side of street to none otherwise your side of street will be left or right depending on direction of travel. The default value is service configuration dependent (5 by default).
First and last location are always forced to break.Enumbreakthroughviabreak_through
Examplebreak
Waiting time in seconds at this stop (break/break_through only, not origin/destination).
Return polygons instead of linestrings. Compute inbound (reverse) isochrone. A boolean indicating whether the input locations should be returned as MultiPoint features: one feature for the exact input coordinates and one feature for the coordinates of the network node it snapped to. Not available here: multimodal — transit routing is served by the Transitland Routing API at /otp/plan, not by this engine.Enumautobicyclepedestriantruckbustaximotor_scootermotorcyclebikeshareauto_pedestrian
Exampleauto
Costing options keyed by costing model name.
Options shared by all costing models. Parsed in src/sif/dynamiccost.cc.
Options shared by all costing models. Parsed in src/sif/dynamiccost.cc.
Options shared by all costing models. Parsed in src/sif/dynamiccost.cc.
Options shared by all costing models. Parsed in src/sif/dynamiccost.cc.
Options shared by all costing models. Parsed in src/sif/dynamiccost.cc.
Options shared by all costing models. Parsed in src/sif/dynamiccost.cc.
Options shared by all costing models. Parsed in src/sif/dynamiccost.cc.
Options shared by all costing models. Parsed in src/sif/dynamiccost.cc.
Options shared by all costing models. Parsed in src/sif/dynamiccost.cc.
0=current, 1=depart_at, 2=arrive_by, 3=invariant ISO 8601 local datetime string in the format YYYY-MM-DDTHH:MM, e.g. 2016-07-03T08:06. Required for types 1, 2, 3.
exclude_locations
array: objectA set of locations to exclude or avoid within a route.
Per-location ISO 8601 datetime override, in the format YYYY-MM-DDTHH:MM, e.g. 2016-07-03T08:06.
Latitude of the map location in degrees. If provided the lat and lon parameters will be treated as the routing location and the display_lat and display_lon will be used to determine the side of street. Both display_lat and display_lon must be provided and valid to achieve the desired effect.
Latitude of the map location in degrees. If provided the lat and lon parameters will be treated as the routing location and the display_lat and display_lon will be used to determine the side of street. Both display_lat and display_lon must be provided and valid to achieve the desired effect.
Preferred approach heading in degrees.
How close in degrees a given street's angle must be in order for it to be considered as in the same direction of the heading parameter. The default value is service configuration dependent (60 by default).
minimum_reachability
integerMinimum number of reachable edges for a snap candidate. The default and max values are service configuration dependent (50 and 100 by default, respectively). Label echoed in the response.
node_snap_tolerance
numberSnap-to-node distance tolerance in meters. The default value is service dependent (5 by default).
If set, edges whose layer does not match this value are discarded from candidate search. Note that this is a "soft" filter, meaning if no other candidates are found, Valhalla will fall back to including edges that did not match this filter.
Preferred side of road to snap to.Exampleopposite
Candidate search radius in meters: all viable edge candidates within the radius are correlated. If none are found, the best one outside the radius is correlated. The default is service dependent, and defaults to 0 (only the closest edge is considered as candidate). The max value is service configuration dependent (200 by default).
Rank snap candidates by distance to input. Hard cutoff for candidate search in meters. Default is service configuration dependent (35000 by default).
Optional filters to exclude candidate edges based on their attribution.
Street address hint for snapping.
Enummotorwaytrunkprimarysecondarytertiaryunclassifiedresidentialservice_other
Exampleprimary
street_side_max_distance
integerThe max distance in meters that the input coordinates or display ll can be from the edge centerline for them to be used for determining the side of street. Beyond this distance the side of street is set to none. The default value is service configuration dependent (1000 by default).
street_side_tolerance
integerIf your input coordinate is less than this tolerance away from the edge centerline then we set your side of street to none otherwise your side of street will be left or right depending on direction of travel. The default value is service configuration dependent (5 by default).
First and last location are always forced to break.Enumbreakthroughviabreak_through
Examplebreak
Waiting time in seconds at this stop (break/break_through only, not origin/destination).
Per-location ISO 8601 datetime override, in the format YYYY-MM-DDTHH:MM, e.g. 2016-07-03T08:06.
Latitude of the map location in degrees. If provided the lat and lon parameters will be treated as the routing location and the display_lat and display_lon will be used to determine the side of street. Both display_lat and display_lon must be provided and valid to achieve the desired effect.
Latitude of the map location in degrees. If provided the lat and lon parameters will be treated as the routing location and the display_lat and display_lon will be used to determine the side of street. Both display_lat and display_lon must be provided and valid to achieve the desired effect.
Preferred approach heading in degrees.
How close in degrees a given street's angle must be in order for it to be considered as in the same direction of the heading parameter. The default value is service configuration dependent (60 by default).
minimum_reachability
integerMinimum number of reachable edges for a snap candidate. The default and max values are service configuration dependent (50 and 100 by default, respectively). Label echoed in the response.
node_snap_tolerance
numberSnap-to-node distance tolerance in meters. The default value is service dependent (5 by default).
If set, edges whose layer does not match this value are discarded from candidate search. Note that this is a "soft" filter, meaning if no other candidates are found, Valhalla will fall back to including edges that did not match this filter.
Preferred side of road to snap to.Exampleopposite
Candidate search radius in meters: all viable edge candidates within the radius are correlated. If none are found, the best one outside the radius is correlated. The default is service dependent, and defaults to 0 (only the closest edge is considered as candidate). The max value is service configuration dependent (200 by default).
Rank snap candidates by distance to input. Hard cutoff for candidate search in meters. Default is service configuration dependent (35000 by default).
Optional filters to exclude candidate edges based on their attribution.
Street address hint for snapping.
Enummotorwaytrunkprimarysecondarytertiaryunclassifiedresidentialservice_other
Exampleprimary
street_side_max_distance
integerThe max distance in meters that the input coordinates or display ll can be from the edge centerline for them to be used for determining the side of street. Beyond this distance the side of street is set to none. The default value is service configuration dependent (1000 by default).
street_side_tolerance
integerIf your input coordinate is less than this tolerance away from the edge centerline then we set your side of street to none otherwise your side of street will be left or right depending on direction of travel. The default value is service configuration dependent (5 by default).
First and last location are always forced to break.Enumbreakthroughviabreak_through
Examplebreak
Waiting time in seconds at this stop (break/break_through only, not origin/destination).
exclude_polygons
array or objectArray of coordinate rings [[lon,lat],…] or a GeoJSON FeatureCollection. Roads intersecting these rings will be avoided during path finding. Takes one of the 2 forms listed below.
Array of closed coordinate rings. All edges intersecting any ring are excluded.
GeoJSON FeatureCollection. Each Feature may carry a properties.levels array to restrict exclusion to specific building/indoor levels in pedestrian routing.
Not all formats are supported by all endpoints, e.g. geotiff is isochrone-only.Enumjsongpxosrmpbfgeotiffmvt
Examplejson
Arbitrary request identifier echoed in the response.
BCP47 locale for narrative output. See locales/ for supported values. linear_cost_factors
array: objectCustomized cost factors that influence path finding, specified as an array of JSON objects. Objects can be either a GeoJSON linestring feature and a "factor" property or a plain object with a "shape" key, whose value needs to be an encoded polyline (with 6 digit precision), and a "factor" key whose value needs to be float. Valhalla will perform an edge walk (see the map matching documentation for more info) to match the geometry onto edges and use those factors in costing. Edges with factors larger than 1 will be increasingly avoided, while edges with factors smaller than 1 increasingly favored.
Example request
curl --get "https://transit.land/api/v2/routing/valhalla/isochrone" \
-H "apikey: YOUR_API_KEY" \
--data-urlencode 'json={"contours":[{"time":5}],"costing":"pedestrian","locations":[{"lat":37.7793,"lon":-122.4193}],"polygons":true,"show_locations":true}'
Response
One feature per contour, plus located points when show_locations is set.
A GeoJSON geometry, per RFC 7946.
Contour metadata, and styling keys that render directly in most GeoJSON viewers.
A GeoJSON geometry, per RFC 7946.
Contour metadata, and styling keys that render directly in most GeoJSON viewers.
Example response
Show response
{
"features": [
{
"geometry": {
"coordinates": [
[
[
-122.419299,
37.782365
],
[
-122.420299,
37.78285
],
[
-122.421299,
37.782717
],
[
-122.423353,
37.780353
],
[
-122.423658,
37.7793
],
[
-122.422944,
37.7773
],
[
-122.419299,
37.775145
],
[
-122.415877,
37.7783
],
[
-122.416318,
37.7803
],
[
-122.417238,
37.7813
],
[
-122.419299,
37.782365
]
]
],
"type": "Polygon"
},
"properties": {
"color": "#bf4040",
"contour": 5,
"fill": "#bf4040",
"fill-opacity": 0.33,
"fillColor": "#bf4040",
"fillOpacity": 0.33,
"metric": "time",
"opacity": 0.33
},
"type": "Feature"
},
{
"geometry": {
"coordinates": [
[
-122.419314,
37.779264
],
[
-122.419804,
37.779203
]
],
"type": "MultiPoint"
},
"properties": {
"location_index": 0,
"type": "snapped"
},
"type": "Feature"
},
{
"geometry": {
"coordinates": [
-122.4193,
37.7793
],
"type": "Point"
},
"properties": {
"location_index": 0,
"type": "input"
},
"type": "Feature"
}
],
"type": "FeatureCollection"
}