Learn R Programming

openrouteservice (version 0.6.2)

ors_isochrones: Openrouteservice Isochrones

Description

Obtain areas of reachability from given locations.

Usage

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

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.

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

Author

Andrzej Oleś andrzej.oles@gmail.com

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.

Examples

Run this code
# These examples might require interaction to query the local keyring, or
# might fail due to network issues, so they are not run by default
if (FALSE) {
ors_isochrones(c(8.34234, 48.23424), interval=20)

locations <- list(c(8.681495, 49.41461), c(8.686507,49.41943))
ors_isochrones(locations, range=c(300, 200))
}

Run the code above in your browser using DataLab