Learn R Programming

hereR (version 0.2.1)

isoline: HERE Routing API: Isoline

Description

Calcuates isolines (POLYGON or MULTIPOLYGON) that connect the end points of all routes leaving from defined centers (POIs) with either a specified length, a specified travel time or consumption.

Usage

isoline(poi, range = seq(5, 30, 5) * 60, rangetype = "time",
  type = "fastest", mode = "car", traffic = FALSE,
  departure = NULL, start = TRUE, aggregate = TRUE,
  url_only = FALSE)

Arguments

poi

sf object, Points of Interest (POIs) of geometry type POINT.

range

numeric, a vector of type integer containing the breaks for the generation of the isolines: (1) time in seconds; (2) distance in meters; (3) consumption in costfactor.

rangetype

character, unit of the isolines: "distance", "time" or "consumption".

type

character, set the routing type: "fastest" or "shortest".

mode

character, set the transport mode: "car", "pedestrian" or "truck".

traffic

boolean, use real-time traffic or prediction in routing (default = FALSE)? If no departure date and time is set, the current timestamp at the moment of the request is used for departure.

departure

datetime, timestamp of type POSIXct, POSIXt for the departure.

start

boolean, are the provided Points of Interest (POIs) the start or destination (default = TRUE)?

aggregate

boolean, aggregate (with function min) and intersect the isolines from geometry type POLYGON to geometry type MULTIPOLYGON (default = TRUE)?

url_only

boolean, only return the generated URLs (default = FALSE)?

Value

An sf object containing the requested isolines.

References

HERE Routing API: Calculate Isoline

Examples

Run this code
# NOT RUN {
# Authentication
set_auth(
  app_id = "<YOUR APP ID>",
  app_code = "<YOUR APP CODE>"
)

# Isochrone for 5, 10, 15, 20, 25 and 30 minutes driving time
isolines <- isoline(
  poi = poi,
  range = seq(5, 30, 5) * 60,
  url_only = TRUE
)
# }

Run the code above in your browser using DataLab