Message-ID: <CAFWQgOkTVsRoYeymPjs3=-_FtuhRqpBBhB-ybgbR0NTckhSDAA@mail.gmail.com>
Date: 2016-05-19T20:41:57Z
From: Nick Eubank
Subject: For each point, distance to nearest point in second dataset
Hi All,
Trying to an equivalent to the "nearest" tool in ArcGIS for two
SpatialPointDataFrames. I can do the naive implementation by calculating
all pairwise distances using gDistance and taking the min, but I have some
huge datasets and was looking for something more efficient. (For example,
here's a trick with knearneigh for points in same dataset (
http://gis.stackexchange.com/questions/132384/distance-to-nearest-point-for-every-point-same-spatialpointsdataframe-in-r
)).
Any suggestions?
Thanks!
Nick
[[alternative HTML version deleted]]