valh | R Documentation |
An interface between R and the Valhalla API.
Valhalla is a routing
service based on OpenStreetMap data.
See https://valhalla.github.io/valhalla/ for more
information.
This package enables the computation of routes, trips, isochrones and
travel distances matrices.
vl_matrix
: Build and send Valhalla API queries to get travel
time matrices between points. This function interfaces the matrix
Valhalla service.
vl_route
: Build and send a Valhalla API query to get the
travel geometry between two points. This function interfaces with the
route Valhalla service.
vl_optimized_route
: Build and send a Valhalla API query to get the
shortest travel geometry between multiple unordered points. This function
interfaces the optimized_route Valhalla service. Use this function to resolve the
travelling salesman problem.
vl_locate
: Build and send an Valhalla API query to get the
nearest point on the street network. This function interfaces the
locate Valhalla service.
vl_isochrone
: This function computes areas that are
reachable within a given time span (or road distance) from a point and returns the reachable
regions as polygons. These areas of equal travel time are called isochrones.
This function interfaces the isochrone & isodistance Valhalla service.
vl_elevation
: Build and send a Valhalla API query to get
the elevation at a set of input locations. This function interfaces with the
height Valhalla service.
vl_status
: Build and send a Valhalla API query to get
information on the Valhalla server (version etc.).. This function interfaces with the
status Valhalla service.
This package relies on the usage of a running Valhalla service
(tested with versions 3.4.x & 3.5.x of Valhalla).
To use a custom Valhalla instance, you just need to change the
valh.server
option to the url of the instance :
options(valh.server = "http://address.of.the.server/")
You can also set this option in your .Rprofile
file to make it permanent.
The package ships a sample dataset of 100 random pharmacies in Berlin
(© OpenStreetMap contributors - https://www.openstreetmap.org/copyright/en).
The sf dataset uses the projection WGS 84 / UTM zone 34N (EPSG:32634).
The csv dataset uses WGS 84 (EPSG:4326).
Maintainer: Timothée Giraud timothee.giraud@cnrs.fr (ORCID)
Authors:
Matthieu Viry (ORCID)
Useful links:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.