[R-sig-Geo] Creating neighbors base on the distance between different regions' nearest edge

Ariel Ortiz-Bobea ortiz-bobea at rff.org
Sun Dec 28 16:46:01 CET 2014


I don't think there's a built-in function that allows you to do that. What I
would do is to:

1- convert each polygon into a set of points

2- loop over pair of polygons (set of points): A- compute all the distances
between points across the 2 sets using a distance function like spDistsN1,
B- get the minimum .

This might take a long time to compute with a very large number of points
because you need to compute all distance pairs… I don't see how you can
avoid that.



-----
Ariel Ortiz-Bobea
Assistant Profesor in Applied Economics and Management
Cornell University
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Creating-neighbors-base-on-the-distance-between-different-regions-nearest-edge-tp7587545p7587584.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list