Calcuates isolines (POLYGON or MULTIPOLYGON) using the HERE 'Isoline Routing' API that connect the end points of all routes leaving from defined centers (POIs) with either a specified length, a specified travel time or consumption (only the default E-car available).

isoline(
  poi,
  datetime = Sys.time(),
  arrival = FALSE,
  range = seq(5, 30, 5) * 60,
  range_type = "time",
  routing_mode = "fast",
  transport_mode = "car",
  traffic = TRUE,
  optimize = "balanced",
  consumption_model = NULL,
  aggregate = TRUE,
  url_only = FALSE
)

Arguments

poi

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

datetime

POSIXct object, datetime for the departure (or arrival if arrival = TRUE).

arrival

boolean, are the provided Points of Interest (POIs) the origin or destination locations (default = FALSE)?

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 Wh.

range_type

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

routing_mode

character, set the routing mode: "fast" or "short".

transport_mode

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

traffic

boolean, use real-time traffic or prediction in routing (default = TRUE)? If no traffic is selected, the datetime is set to "any" and the request is processed independently from time.

optimize,

character, specifies how isoline calculation is optimized: "balanced", "quality" or "performance" (default = "balanced").

consumption_model

character, specify the consumption model of the vehicle, see consumption model for more information (default = NULL a average electric car is set).

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 Isoline Routing API

Examples

# Provide an API Key for a HERE project set_key("<YOUR API KEY>") # 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 )