[R-sig-Geo] [FORGED] Create a Spatial Weight Matrix based on road distance
Timothée Giraud
t|mothee@g|r@ud @end|ng |rom cnr@@|r
Mon Jun 24 10:15:21 CEST 2019
Dear Rolando,
OSRM (Open Source Routing Machine) is a routing engine designed to run
on OpenStreetMap data.
There is a public instance of the engine, a demo server. This server
has limitations
(https://github.com/Project-OSRM/osrm-backend/wiki/Demo-server) like
the number of requests/minute, or in your case the maximum size of a
requested distance matrix (10000, meaning 100 origines x 100
destinations). As they say :"he demo server usage is restricted to
reasonable, non-commercial use-cases. We provide no guarantees wrt.
uptime, latency, or data updates."
A solution is to run your own instance of the server to get rid of
these limitations. The prefered and simplest way to run an instance is
to use a Docker container
(https://github.com/Project-OSRM/osrm-backend#quick-start).
When launching the Docker you'll have to set a large value for the
--max-table-size parameter. Something like:
docker run -t -i -p 5000:5000 -v "${PWD}:/data" osrm/osrm-backend
osrm-routed --algorithm mld --max-table-size 9000000
/data/berlin-latest.osrm
The osrm R package is an interface between R and OSRM. The default
server used by the package is the OSRM demo server. But you can change
the default server with :
options(osrm.server = "http://0.0.0.0:5000/", osrm.profile = "driving")
Cheers,
Timothée
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list