The osrm
package is an interface between R and the OSRM API. OSRM is a routing service based on OpenStreetMap data.
This package allows computing shortest paths, travel time and travel distance matrices between points.
The osrm
package functions are:
osrmTable()
: travel time and travel distance matrices between points.osrmRoute()
: shortest path between two points.osrmTrip()
: shortest trip between multiple unordered points.osrmIsochrone()
: polygons of isochrones
This package relies on the use of an OSRM server (tested with version 5.22.0 of OSRM).
By default the package uses the OSRM demo server (API usage policy). It is possible to use a different server if you want to make intensive use of the API. You can run your own instance of OSRM following guidelines provided on the OSRM GitHub repository. The simplest solution is the one based on docker containers.
The main change introduced by this update is the support of sf
objects as input and output in all functions: using the argument returnclass = "sf"
in osrmRoute()
, osrmIsochrone()
and osrmTrip()
allows to output sf
objects.
The algorithm for isochrones has been changed to a more robust one that uses isoband
package.
In the following example more than 800 shortest paths to the useR2019 conference in Toulouse are displayed:
In the next example isochrones around Toulouse are displayed:
Code for the figures is in this gist.
OpenEdition vous propose de citer ce billet de la manière suivante :
Timothée Giraud (30 avril 2019). New version of osrm. R Géomatique. Consulté le 7 septembre 2024 à l’adresse https://doi.org/10.58079/tp4j