osrm_matrixby100: Generate a distance matrix for dataframes of more than 100...

Description Usage Arguments Value Author(s) References Examples

Description

Generate a distance matrix for dataframes of more than 100 rows, using osrm functions by nrow(dataframe)/100 of rows. Its use the osrmRoute and osrmTable functions of osrm library, that build and send an OSRM API query to get the travel geometry between two points. This function interfaces the route OSRM service. The principal contribution to this function it´s to consider avoiding the record limit of the original osrm function.

Usage

1

Arguments

src

Dataframe with three variables: id, and a pair of coordinates, or only the pair of coordinates with the "wid" parameter setted FALSE

dst

Dataframe with three variables: and a pair of coordinates, or only the pair of coordinates with the "wid" parameter setted FALSE

crs

Specific coordinates sistem to transform to the CRS("+init=epsg:4326") needed by osrm library

wid

If TRUE keeping the "id" of the first column, if FALSE generate an "id" using the nrow function.

Value

Return a DataFrame with:

matriz

The distance matrix of all the rows of tha dataframe

Author(s)

Detomasi, Richard

References

Timothée Giraud [cre, aut], Robin Cura [ctb], Matthieu Viry [ctb] 2017 osrm: Interface Between R and the OpenStreetMap-Based Routing Service OSRM. https://CRAN.R-project.org/package=osrm

Examples

1
2
3
4
## The function is currently defined as
osrm_matrixby100(src, dst, crs, wid = T)
{
  }

RichDeto/EPP documentation built on Aug. 25, 2018, 3:18 p.m.