[R-sig-Geo] Calculate matrix of distances from points to multiple polygons

jfeighery jfeighery at gmail.com
Thu Jan 3 22:54:38 CET 2013


Dear all,I am trying to create a matrix of distances between wells and all
nearby ponds that will be used to calculate a contamination risk variable
(the equivalent of Generate Near Table in ArcGIS). The wells locations and
pond polygons were imported from shapefiles as SpatialPointsDataFrame and
SpatialPolygonsDataFrame, respectively. Through searching this forum, I
found solutions that work for two sets of points (e.g. crossdist in
{spatstat}) or two sets of polygons. The function dist2Line {geosphere}
works but appears to only find the distance to the nearest polygon. I am
hoping that there is a way to do this for each polygon without resorting to
writing a function with a for loop. Thanks in advance for any help or
advice!John



--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Calculate-matrix-of-distances-from-points-to-multiple-polygons-tp7582204.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list