Obtain areas of reachability from given locations.

ors_isochrones(
  locations,
  profile = ors_profile(),
  range = 60,
  ...,
  api_key = ors_api_key(),
  output = c("parsed", "text", "sf")
)

Arguments

locations

List of longitude, latitude coordinate pairs, alternatively a two column matrix or data.frame.

profile

Route profile, defaults to "driving-car".

range

Maximum range value of the analysis in seconds for time and meters for distance. Alternatively a comma separated list of specific single range values.

...

Optional parameters as described here

api_key

Character scalar containing openrouteservice API key

output

Output format. By default the response is being parsed to a list-based R object

Value

A GeoJSON object containing a FeatureCollection of Polygons

  • for "text", a character vector of length 1 re-encoded to UTF-8.

  • for "parsed", a parsed R object.

  • for "sf", a simple features sf object.

Details

The Isochrone Service supports time and distance analyses for one single or multiple locations. You may also specify the isochrone interval or provide multiple exact isochrone range values.

Author

Andrzej Oleś andrzej@openrouteservice.org

Examples

ors_isochrones(c(8.34234, 48.23424), interval=20)
#> <ors_isochrones> #> List of 4 #> $ type : chr "FeatureCollection" #> $ features:List of 3 #> ..$ :List of 3 #> .. ..$ type : chr "Feature" #> .. ..$ properties:List of 3 #> .. .. ..$ group_index: int 0 #> .. .. ..$ value : num 20 #> .. .. ..$ center : num [1:2] 8.34 48.23 #> .. ..$ geometry :List of 2 #> .. .. ..$ coordinates:List of 1 #> .. .. .. ..$ :List of 12 #> .. .. .. .. ..$ : num [1:2] 8.34 48.23 #> .. .. .. .. ..$ : num [1:2] 8.34 48.23 #> .. .. .. .. ..$ : num [1:2] 8.34 48.23 #> .. .. .. .. ..$ : num [1:2] 8.34 48.23 #> .. .. .. .. ..$ : num [1:2] 8.34 48.23 #> .. .. .. .. ..$ : num [1:2] 8.34 48.23 #> .. .. .. .. .. [list output truncated] #> .. .. ..$ type : chr "Polygon" #> ..$ :List of 3 #> .. ..$ type : chr "Feature" #> .. ..$ properties:List of 3 #> .. .. ..$ group_index: int 0 #> .. .. ..$ value : num 40 #> .. .. ..$ center : num [1:2] 8.34 48.23 #> .. ..$ geometry :List of 2 #> .. .. ..$ coordinates:List of 1 #> .. .. .. ..$ :List of 12 #> .. .. .. .. ..$ : num [1:2] 8.34 48.23 #> .. .. .. .. ..$ : num [1:2] 8.34 48.23 #> .. .. .. .. ..$ : num [1:2] 8.34 48.23 #> .. .. .. .. ..$ : num [1:2] 8.34 48.23 #> .. .. .. .. ..$ : num [1:2] 8.34 48.23 #> .. .. .. .. ..$ : num [1:2] 8.35 48.23 #> .. .. .. .. .. [list output truncated] #> .. .. ..$ type : chr "Polygon" #> ..$ :List of 3 #> .. ..$ type : chr "Feature" #> .. ..$ properties:List of 3 #> .. .. ..$ group_index: int 0 #> .. .. ..$ value : num 60 #> .. .. ..$ center : num [1:2] 8.34 48.23 #> .. ..$ geometry :List of 2 #> .. .. ..$ coordinates:List of 1 #> .. .. .. ..$ :List of 12 #> .. .. .. .. ..$ : num [1:2] 8.34 48.23 #> .. .. .. .. ..$ : num [1:2] 8.34 48.23 #> .. .. .. .. ..$ : num [1:2] 8.34 48.23 #> .. .. .. .. ..$ : num [1:2] 8.34 48.23 #> .. .. .. .. ..$ : num [1:2] 8.34 48.23 #> .. .. .. .. ..$ : num [1:2] 8.35 48.23 #> .. .. .. .. .. [list output truncated] #> .. .. ..$ type : chr "Polygon" #> $ bbox : num [1:4] 8.34 48.23 8.35 48.23 #> $ metadata:List of 5 #> ..$ attribution: chr "openrouteservice.org | OpenStreetMap contributors" #> ..$ service : chr "isochrones" #> ..$ timestamp : num 1.63e+12 #> ..$ query :List of 3 #> .. ..$ locations:List of 1 #> .. .. ..$ : num [1:2] 8.34 48.23 #> .. ..$ range : num 60 #> .. ..$ interval : num 20 #> ..$ engine :List of 3 #> .. ..$ version : chr "6.6.1" #> .. ..$ build_date: chr "2021-07-05T10:57:48Z" #> .. ..$ graph_date: chr "2021-10-03T10:50:45Z"
locations <- list(c(8.681495, 49.41461), c(8.686507,49.41943)) ors_isochrones(locations, range=c(300, 200))
#> <ors_isochrones> #> List of 4 #> $ type : chr "FeatureCollection" #> $ features:List of 4 #> ..$ :List of 3 #> .. ..$ type : chr "Feature" #> .. ..$ properties:List of 3 #> .. .. ..$ group_index: int 0 #> .. .. ..$ value : num 200 #> .. .. ..$ center : num [1:2] 8.68 49.41 #> .. ..$ geometry :List of 2 #> .. .. ..$ coordinates:List of 1 #> .. .. .. ..$ :List of 18 #> .. .. .. .. ..$ : num [1:2] 8.67 49.42 #> .. .. .. .. ..$ : num [1:2] 8.67 49.41 #> .. .. .. .. ..$ : num [1:2] 8.68 49.41 #> .. .. .. .. ..$ : num [1:2] 8.68 49.41 #> .. .. .. .. ..$ : num [1:2] 8.69 49.41 #> .. .. .. .. ..$ : num [1:2] 8.69 49.41 #> .. .. .. .. .. [list output truncated] #> .. .. ..$ type : chr "Polygon" #> ..$ :List of 3 #> .. ..$ type : chr "Feature" #> .. ..$ properties:List of 3 #> .. .. ..$ group_index: int 0 #> .. .. ..$ value : num 300 #> .. .. ..$ center : num [1:2] 8.68 49.41 #> .. ..$ geometry :List of 2 #> .. .. ..$ coordinates:List of 1 #> .. .. .. ..$ :List of 21 #> .. .. .. .. ..$ : num [1:2] 8.66 49.42 #> .. .. .. .. ..$ : num [1:2] 8.66 49.42 #> .. .. .. .. ..$ : num [1:2] 8.67 49.41 #> .. .. .. .. ..$ : num [1:2] 8.67 49.41 #> .. .. .. .. ..$ : num [1:2] 8.68 49.4 #> .. .. .. .. ..$ : num [1:2] 8.68 49.4 #> .. .. .. .. .. [list output truncated] #> .. .. ..$ type : chr "Polygon" #> ..$ :List of 3 #> .. ..$ type : chr "Feature" #> .. ..$ properties:List of 3 #> .. .. ..$ group_index: int 1 #> .. .. ..$ value : num 200 #> .. .. ..$ center : num [1:2] 8.69 49.42 #> .. ..$ geometry :List of 2 #> .. .. ..$ coordinates:List of 1 #> .. .. .. ..$ :List of 21 #> .. .. .. .. ..$ : num [1:2] 8.68 49.42 #> .. .. .. .. ..$ : num [1:2] 8.68 49.42 #> .. .. .. .. ..$ : num [1:2] 8.68 49.42 #> .. .. .. .. ..$ : num [1:2] 8.68 49.42 #> .. .. .. .. ..$ : num [1:2] 8.69 49.41 #> .. .. .. .. ..$ : num [1:2] 8.69 49.41 #> .. .. .. .. .. [list output truncated] #> .. .. ..$ type : chr "Polygon" #> ..$ :List of 3 #> .. ..$ type : chr "Feature" #> .. ..$ properties:List of 3 #> .. .. ..$ group_index: int 1 #> .. .. ..$ value : num 300 #> .. .. ..$ center : num [1:2] 8.69 49.42 #> .. ..$ geometry :List of 2 #> .. .. ..$ coordinates:List of 1 #> .. .. .. ..$ :List of 20 #> .. .. .. .. ..$ : num [1:2] 8.67 49.42 #> .. .. .. .. ..$ : num [1:2] 8.67 49.42 #> .. .. .. .. ..$ : num [1:2] 8.67 49.41 #> .. .. .. .. ..$ : num [1:2] 8.68 49.41 #> .. .. .. .. ..$ : num [1:2] 8.68 49.41 #> .. .. .. .. ..$ : num [1:2] 8.68 49.41 #> .. .. .. .. .. [list output truncated] #> .. .. ..$ type : chr "Polygon" #> $ bbox : num [1:4] 8.66 49.4 8.7 49.44 #> $ metadata:List of 5 #> ..$ attribution: chr "openrouteservice.org | OpenStreetMap contributors" #> ..$ service : chr "isochrones" #> ..$ timestamp : num 1.63e+12 #> ..$ query :List of 2 #> .. ..$ locations:List of 2 #> .. .. ..$ : num [1:2] 8.68 49.41 #> .. .. ..$ : num [1:2] 8.69 49.42 #> .. ..$ range : num [1:2] 300 200 #> ..$ engine :List of 3 #> .. ..$ version : chr "6.6.1" #> .. ..$ build_date: chr "2021-07-05T10:57:48Z" #> .. ..$ graph_date: chr "2021-10-03T10:50:45Z"