views:

58

answers:

1

I have a few 1000s triangles connected in a 2D mesh grid. It represents water flow. This grid is a delaunay triangulation. I need to merge the triangles back into a minimal amount of simple polygons such that each polygon is constraint not to have interior holes. The output polygons should be the same shape.

Is there a known algorithm for accomplishing this?

A: 

answering my own question :)

I found the best way to do this is to use polygon union methods similar to disjoint subset merging. Here's a blog post on a fast implementation by taking advantage of spatial indices

http://lin-ear-th-inking.blogspot.com/2007/11/fast-polygon-merging-in-jts-using.html

tommy chheng