[R-sig-Geo] Highway Distance matrix
jeremy.raw at dot.gov
jeremy.raw at dot.gov
Thu Aug 4 16:37:40 CEST 2011
There is certainly no need to go anywhere near ArcGIS for this type of
operation.
The simplest approach would be to look at one of the packages that does
shortest path evaluations on a network. On CRAN, the igraph package
lets you can do this pretty straightforwardly. Alternatively, the
travelr package on R-Forge (not actively maintained, but functional for
this purpose) is also available. Igraph is easier if you are
comfortable with basic graph theory (and translating to and from the
0-based indexing that the current version of igraph uses for node/vertex
numbering), whereas travelr may be easier if you are already comfortable
with transport modeling.
The basic steps are to convert your base map into a suitable
graph/network format (e.g. via what igraph calls an edgelist) and then
to use shortest.paths in igraph, or build.paths and skim.paths in
travelr, to compute the matrix of distances.
Igraph also has a help list where some of the set-up questions for this
type of problem have already been addressed:
https://lists.nongnu.org/mailman/listinfo/igraph-help
I hope that helps!
Jeremy Raw, P.E.
FHWA Office of Planning
jeremy.raw at dot.gov
(202) 366-0986
-----Original Message-----
From: r-sig-geo-bounces at r-project.org
[mailto:r-sig-geo-bounces at r-project.org] On Behalf Of Raphael Saldanha
Sent: Thursday, August 04, 2011 7:32 AM
To: r-sig-geo
Subject: [R-sig-Geo] Highway Distance matrix
Hi,
How can I compute a distance matrix of points (citys) based on a highway
base map?
Regards in advance,
Raphael Saldanha
saldanha.plangeo at gmail.com
[[alternative HTML version deleted]]
_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
More information about the R-sig-Geo
mailing list