Stanisław Góra
2016-01-23 13:37:44 UTC
Hi,
I am looking for a best way to triangulate polygons using JTS. Since it
does not have Constrained Delaunay implementation (which would really help
me) i looked at using Conforming Delaunay and setting constraints. Then i
needed to get rid of the triangles that lie outside (concave) polygons and
inside their holes. Testing each triangle with disjoint() and covers()
functions takes much longer than triangulation itself and doesn't even
produce reliable results because of some robustness issue. (triangles
around added Steiner points lying on constrained segments return incorrect
inside/outside polygon result).
Then I found this thread
http://sourceforge.net/p/jts-topo-suite/mailman/jts-topo-suite-user/thread/***@telus.net/
and
tried Michael's Ear Clipping code. It does great job at triangulating
polygons but is a lot slower (92% time is spent on covers() function) and
is killing performance on a android device even more than delaunay.
In this article
http://lin-ear-th-inking.blogspot.com/2011/04/polygon-triangulation-via-ear-clipping.html
Martin
Davis said that the Ear Clipping code will get added to JTS in the next
release, and while it didn't maybe it was further optimized.
Also, are there any plans to implement Constrained Delaunay? I realized I
can't use Conforming Delaunay for yet another reason: I have some very long
rectangle-like polygons to triangulate, which forces delaunay property to
generate countless small triangles and produces "Too many splitting
iterations" error.
Otherwise can You point me to a fastest (runtime) way of triangulating
polygons using either Conforming Delaunay or Ear Clipping given my problems?
Thank You very much,
StanisÅaw Góra
PS. It seems I'm unable to subscribe jts user list - getting "Bug in
Mailman version 2.1.9"
I am looking for a best way to triangulate polygons using JTS. Since it
does not have Constrained Delaunay implementation (which would really help
me) i looked at using Conforming Delaunay and setting constraints. Then i
needed to get rid of the triangles that lie outside (concave) polygons and
inside their holes. Testing each triangle with disjoint() and covers()
functions takes much longer than triangulation itself and doesn't even
produce reliable results because of some robustness issue. (triangles
around added Steiner points lying on constrained segments return incorrect
inside/outside polygon result).
Then I found this thread
http://sourceforge.net/p/jts-topo-suite/mailman/jts-topo-suite-user/thread/***@telus.net/
and
tried Michael's Ear Clipping code. It does great job at triangulating
polygons but is a lot slower (92% time is spent on covers() function) and
is killing performance on a android device even more than delaunay.
In this article
http://lin-ear-th-inking.blogspot.com/2011/04/polygon-triangulation-via-ear-clipping.html
Martin
Davis said that the Ear Clipping code will get added to JTS in the next
release, and while it didn't maybe it was further optimized.
Also, are there any plans to implement Constrained Delaunay? I realized I
can't use Conforming Delaunay for yet another reason: I have some very long
rectangle-like polygons to triangulate, which forces delaunay property to
generate countless small triangles and produces "Too many splitting
iterations" error.
Otherwise can You point me to a fastest (runtime) way of triangulating
polygons using either Conforming Delaunay or Ear Clipping given my problems?
Thank You very much,
StanisÅaw Góra
PS. It seems I'm unable to subscribe jts user list - getting "Bug in
Mailman version 2.1.9"