Learn R Programming

hereR (version 0.9.1)

isoline: HERE Isoline Routing API: Calculate Isoline

Description

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

Usage

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 = FALSE,
  url_only = FALSE
)

Value

An sf object containing the requested isolines.

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 (default = NULL an average electric car is set).

aggregate

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

url_only

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

References

HERE Isoline Routing API

Examples

Run this code
# Provide an API Key for a HERE project
set_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
)

Run the code above in your browser using DataLab