[R-sig-Geo] searching a Delaunay triangulation for nearest neighbor

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Fri Nov 2 20:38:27 CET 2012


On Fri, Nov 2, 2012 at 6:39 PM, CARTIER, ADRIAN AW (AG/1000)
<adrian.aw.cartier at monsanto.com> wrote:
> All,
>
> I am looking for a solution to search a triangulation for the point closest to a centroid of a collection of polygons. MATLAB has functionality called dsearch. I was wondering if there was a similar.
>
> Here is the set up vector xcoord of x-coordinates, ycoord of y coordinates, Tri, the Delaunay triangulation of those (3X3 matrix), cent_x,vector of x coordinates of the centroid of polygons, cent_y vector of y coordinates of polygons.
>
> I want a list of the nearest neighbors (x,y) to (cent_x,cent_y) but I want to search the triangulation to find this.
>
> I hope this makes sense. Thanks in advance.

 Doesn't make any sense to me... Let's try again...

 You have one set of points, (xcoord,ycoord), and another set of
points (cent_x, cent_y). Yes? It seems irrelevant that cent_x and
cent_y are polygon centroids. Yes?

 You want the nearest neighbours to each of cent_x, cent_y, but you
don't say what set of points the neighbours are from. From
xcoord,ycoord? From cent_x, cent_y? You don't say. You also don't say
how many nearest neighbours you want or if there's any other
threshold.

 And then you say 'search the triangulation' which is pretty
meaningless. Do you want the nearest points on the lines of the
triangulation? Are we talking about nearest point-to-line distance? So
that would be just one distance per cent_x,cent_y?

 Care to clarify?

Barry



More information about the R-sig-Geo mailing list