-1

We have a set of points, each with (x,y) coordinates and a category C. We have built the Voronoi diagram based on these points and would now like to "cluster" adjacent polygons when they are of a particular category. Is there a ready-made algorithm / R package for doing this ?

If not, our current thinking is to go back to the Delaunay triangulation and brute-force our way to the solution : consider each vertix V, find the vertix v of each edge going into V and see if they are the same category, if so aggregate the polygons. Is there a better way to do that ? Is there an R package that could do that ? If not, which R package implementing Delaunay would have the best result data-structure to do this ?

Philippe Girolami
  • 1,876
  • 1
  • 13
  • 15

2 Answers2

0

Note: I wouldn't call this cluster analysis. If you stick to this keyword, you will not find anything useful to you. What you apparently want to do is merge adjacent Voronoi cells, but that's about it.

Your Voronoi cell / Delaunay triangulation algorithm should give you information of all the edges. What you probably want to do is iterate over all edges, and when both cells have the same category, merge them.

Trivial code; and heavily application dependant (what is "same category"?), so you probably won't find a "libary" for it.

Has QUIT--Anony-Mousse
  • 76,138
  • 12
  • 138
  • 194
0

You can use a convex hull on the points and remove all points inside a same category. Then repeat the voronoi diagram. BTW. I know nothing about R.

Micromega
  • 12,486
  • 7
  • 35
  • 72