dodgr_isochrones: Calculate isochrone contours from specified points.

dodgr_isochronesR Documentation

Calculate isochrone contours from specified points.

Description

Function is fully vectorized to calculate accept vectors of central points and vectors defining multiple isochrone thresholds.

Usage

dodgr_isochrones(graph, from = NULL, tlim = NULL, heap = "BHeap")

Arguments

graph

data.frame or equivalent object representing the network graph (see Notes)

from

Vector or matrix of points from which isochrones are to be calculated.

tlim

Vector of desired limits of isochrones in seconds

heap

Type of heap to use in priority queue. Options include Fibonacci Heap (default; FHeap), Binary Heap (BHeap), Trinomial Heap (TriHeap), Extended Trinomial Heap (TriHeapExt, and 2-3 Heap (Heap23).

Value

A single data.frame of isochrones as points sorted anticlockwise around each origin (from) point, with columns denoting the from points and tlim value(s). The isochrones are given as id values and associated coordinates of the series of points from each from point at the specified isochrone times.

Isochrones are calculated by default using parallel computation with the maximal number of available cores or threads. This number can be reduced by specifying a value via ⁠RcppParallel::setThreadOptions (numThreads = <desired_number>)⁠.

Note

Isodists are calculated by default using parallel computation with the maximal number of available cores or threads. This number can be reduced by specifying a value via ⁠RcppParallel::setThreadOptions (numThreads = <desired_number>)⁠.

See Also

Other distances: dodgr_distances(), dodgr_dists_categorical(), dodgr_dists_nearest(), dodgr_dists(), dodgr_flows_aggregate(), dodgr_flows_disperse(), dodgr_flows_si(), dodgr_isodists(), dodgr_isoverts(), dodgr_paths(), dodgr_times()

Examples

## Not run: 
# Use osmdata package to extract 'SC'-format data:
library (osmdata)
dat <- opq ("hampi india") %>%
    add_osm_feature (key = "highway") %>%
    osmdata_sc ()
graph <- weight_streetnet (dat)
from <- sample (graph$.vx0, size = 100)
tlim <- c (5, 10, 20, 30, 60) * 60 # times in seconds
x <- dodgr_isochrones (graph, from = from, tlim)

## End(Not run)

dodgr documentation built on June 7, 2023, 5:44 p.m.