osrm: Shortest Paths and Travel Time from OpenStreetMap via an OSRM...

osrmR Documentation

Shortest Paths and Travel Time from OpenStreetMap via an OSRM API

Description

An interface between R and the OSRM API.
OSRM is a routing service based on OpenStreetMap data. See <http://project-osrm.org/> for more information. This package enables the computation of routes, trips, isochrones and travel distances matrices (travel time and kilometric distance).

  • osrmTable: Build and send OSRM API queries to get travel time matrices between points. This function interfaces the table OSRM service.

  • osrmRoute: Build and send an OSRM API query to get the travel geometry between two points. This function interfaces with the route OSRM service.

  • osrmTrip: Build and send an OSRM API query to get the shortest travel geometry between multiple unordered points. This function interfaces the trip OSRM service. Use this function to resolve the travelling salesman problem.

  • osrmNearest: Build and send an OSRM API query to get the nearest point on the street network. This function interfaces the nearest OSRM service.

  • osrmIsochrone: This function computes areas that are reachable within a given time span from a point and returns the reachable regions as polygons. These areas of equal travel time are called isochrones.

  • osrmIsodistance: This function computes areas that are reachable within a given road distance from a point and returns the reachable regions as polygons. These areas of equal travel distance are called isodistances.

Note

This package relies on the usage of a running OSRM service (tested with version 5.27.0 of the OSRM API).

To set the OSRM server, change the osrm.server option:
options(osrm.server = "http://address.of.the.server/")

To set the profile, use the osrm.profile option:
options(osrm.profile = "name.of.the.profile")
The "car" profile is set by default. Other possible profiles are "foot" and "bike".

A typical setup, corresponding to the Docker example, would be:
options(osrm.server = "http://0.0.0.0:5000/", osrm.profile = "car")

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

Author(s)

Maintainer: Timothée Giraud timothee.giraud@cnrs.fr (ORCID)

Other contributors:

  • Robin Cura (ORCID) [contributor]

  • Matthieu Viry (ORCID) [contributor]

  • Robin Lovelace (ORCID) [contributor]

See Also

Useful links:


osrm documentation built on May 29, 2024, 9:29 a.m.

Related to osrm in osrm...