mz_isochrone {rmapzen} | R Documentation |
Retrieve isochrones
Description
From https://valhalla.readthedocs.io/en/latest/: "An isochrone is a line that connects points of equal travel time about a given location, from the Greek roots of 'iso' for equal and 'chrone' for time. The Mapzen Isochrone service computes areas that are reachable within specified time intervals from a location, and returns the reachable regions as contours of polygons or lines that you can display on a map."
Usage
mz_isochrone(
locations,
costing_model,
contours,
date_time = NULL,
polygons = NULL,
denoise = NULL,
generalize = NULL,
id = "my-iso",
api_key = NULL
)
Arguments
locations |
An |
costing_model |
The costing model, see |
contours |
Up to 4 contours, see |
date_time |
The local date and time at the location, and whether it is
the departure or arrival time. See |
polygons |
Whether to return polygons (TRUE) or linestrings (FALSE, default) |
denoise |
A value between 0 and 1 (default 1) to remove smaller contours. A value of 1 will only return the largest contour for a given time value. A value of 0.5 drops any contours that are less than half the area of the largest contour. |
generalize |
Tolerance in meters for the Douglas-Peucker generalization. |
id |
A descriptive identifier, the response will contain the id as an element. |
api_key |
Your Mapzen API key. The default is to look for the key within the provider information that was set up with 'mz_set_host'. |
Value
A mapzen_isochrone_list
, which can be converted to sf
using as_sf
.
See Also
Examples
## Not run:
mz_isochrone(
mz_location(lat = 37.87416, lon = -122.2544),
costing_model = mz_costing$auto(),
contours = mz_contours(c(10, 20, 30))
)
# departure point can be specified as a geocode result
mz_isochrone(
mz_geocode("UC Berkeley"),
costing_model = mz_costing$pedestrian(),
contours = mz_contours(c(10, 20, 30))
)
## End(Not run)