Isochrone
Last updated
Available inBetaPlans and pricing
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
Request
The request object, url-encoded. Identical to the POST body. Encode spaces as %20, or send the JSON without spaces. The API does not decode + as a space and rejects the request as unparseable.
contoursarray of objectsrequiredAt least one of time or distance must be specified. You can only specify one metric per contour, i.e. time or distance.
denoiseoptional number- 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.
Default:
1 locationsarray of objectsrequiredlocations.date_optional stringtime - Per-location ISO 8601 datetime override, in the format
YYYY-MM-DDTHH:MM, e.g.2016-07-03T08:06. locations.display_optional numberlat - Latitude of the map location in degrees. If provided the
latandlonparameters will be treated as the routing location and thedisplay_latanddisplay_lonwill be used to determine the side of street. Bothdisplay_latanddisplay_lonmust be provided and valid to achieve the desired effect. locations.display_optional numberlon - Latitude of the map location in degrees. If provided the
latandlonparameters will be treated as the routing location and thedisplay_latanddisplay_lonwill be used to determine the side of street. Bothdisplay_latanddisplay_lonmust be provided and valid to achieve the desired effect. locations.heading_optional integertolerance - 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
headingparameter. The default value is service configuration dependent (60 by default). locations.minimum_optional integerreachability - Minimum number of reachable edges for a snap candidate. The default and max values are service configuration dependent (50 and 100 by default, respectively).
Default:
50 locations.node_optional numbersnap_ tolerance - Snap-to-node distance tolerance in meters. The default value is service dependent (5 by default).
locations.preferred_optional integerlayer - 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.
locations.preferred_optional stringside - Preferred side of road to snap to.
Default:
eitherAllowed:same,opposite,eitherExample:opposite locations.radiusoptional integer- 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).
locations.search_optional integercutoff - Hard cutoff for candidate search in meters. Default is service configuration dependent (35000 by default).
locations.search_optional objectfilter - Optional filters to exclude candidate edges based on their attribution.
locations.street_optional stringside_ cutoff Allowed:
motorway,trunk,primary,secondary,tertiary,unclassified,residential,service_otherExample:primarylocations.street_optional integerside_ max_ distance - The 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).
locations.street_optional integerside_ tolerance - If 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).
locations.typeoptional string- First and last location are always forced to
break.Default:
breakExample:breakValues breakStop here; starts or ends a route leg. Allows U-turns. throughPass through without stopping. No U-turn; keeps direction of travel. viaWaypoint with a maneuver instruction but no leg-break. Allows U-turns. break_throughLike `break` but does not allow U-turns at the location.
show_optional booleanlocations - 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.
Default:
false costingstringrequiredmultimodalis not available. The street graph has no transit; use transit routing at /otp/plan.Allowed:
auto,bicycle,pedestrian,truck,bus,taxi,motor_scooter,motorcycle,bikeshare,auto_pedestrianExample:autocosting_optional objectoptions - Costing options keyed by costing model name.
costing_options.autooptional object- Options shared by all costing models. Parsed in src/sif/dynamiccost.cc.
costing_options.bicycleoptional object- Options shared by all costing models. Parsed in src/sif/dynamiccost.cc.
costing_options.busoptional object- Options shared by all costing models. Parsed in src/sif/dynamiccost.cc.
costing_options.motor_optional objectscooter - Options shared by all costing models. Parsed in src/sif/dynamiccost.cc.
costing_options.motorcycleoptional object- Options shared by all costing models. Parsed in src/sif/dynamiccost.cc.
costing_options.pedestrianoptional object- Options shared by all costing models. Parsed in src/sif/dynamiccost.cc.
exclude_optional array of objectslocations - A set of locations to exclude or avoid within a route.
exclude_locations.date_optional stringtime - Per-location ISO 8601 datetime override, in the format
YYYY-MM-DDTHH:MM, e.g.2016-07-03T08:06. exclude_locations.display_optional numberlat - Latitude of the map location in degrees. If provided the
latandlonparameters will be treated as the routing location and thedisplay_latanddisplay_lonwill be used to determine the side of street. Bothdisplay_latanddisplay_lonmust be provided and valid to achieve the desired effect. exclude_locations.display_optional numberlon - Latitude of the map location in degrees. If provided the
latandlonparameters will be treated as the routing location and thedisplay_latanddisplay_lonwill be used to determine the side of street. Bothdisplay_latanddisplay_lonmust be provided and valid to achieve the desired effect. exclude_locations.heading_optional integertolerance - 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
headingparameter. The default value is service configuration dependent (60 by default). exclude_locations.minimum_optional integerreachability - Minimum number of reachable edges for a snap candidate. The default and max values are service configuration dependent (50 and 100 by default, respectively).
Default:
50 exclude_locations.node_optional numbersnap_ tolerance - Snap-to-node distance tolerance in meters. The default value is service dependent (5 by default).
exclude_locations.preferred_optional integerlayer - 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.
exclude_locations.preferred_optional stringside - Preferred side of road to snap to.
Default:
eitherAllowed:same,opposite,eitherExample:opposite exclude_locations.radiusoptional integer- 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).
exclude_locations.rank_optional booleancandidates - Rank snap candidates by distance to input.
Default:
true exclude_locations.search_optional integercutoff - Hard cutoff for candidate search in meters. Default is service configuration dependent (35000 by default).
exclude_locations.search_optional objectfilter - Optional filters to exclude candidate edges based on their attribution.
exclude_locations.street_optional stringside_ cutoff Allowed:
motorway,trunk,primary,secondary,tertiary,unclassified,residential,service_otherExample:primaryexclude_locations.street_optional integerside_ max_ distance - The 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).
exclude_locations.street_optional integerside_ tolerance - If 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).
exclude_locations.typeoptional string- First and last location are always forced to
break.Default:
breakExample:breakValues breakStop here; starts or ends a route leg. Allows U-turns. throughPass through without stopping. No U-turn; keeps direction of travel. viaWaypoint with a maneuver instruction but no leg-break. Allows U-turns. break_throughLike `break` but does not allow U-turns at the location.
exclude_optional array or objectpolygons - Array 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. formatoptional string- Not all formats are supported by all endpoints, e.g.
geotiffis isochrone-only.Default:
jsonAllowed:json,gpx,osrm,pbf,geotiff,mvtExample:json languageoptional string- BCP47 locale for narrative output. See locales/ for supported values.
Default:
en-US linear_optional array of objectscost_ factors - Customized 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.
Response
See the Routing Platform overview for API access, travel modes, and the machine-readable schema.
Reference: Valhalla isochrone API reference