I want to tessellate country shape from GeoTools to display it in 3D on Earth surface. GeoTools use JTS topology suite inside which looks feature rich.
Does it contain utility to tessellate some shape? I see there is triangulation package, but can't figure out, how to use it for shapes with holes.
Also I with it not just connect existing vertices like here
it should fill shape with multiple vertices inside.
UPDATE
I found, that JTS contains class ConformingDelaunayTriangulationBuilder
which allows to make wished tessellations somehow, but it works bad. First of all it allows only constraining, which means additional code is needed to remove triangles from concaved regions. And also it tries to conserve Delaunay nature of tessellation, which leads to creating many additional sections.
Finally it causes ConstraintEnforcementException
for complex shapes like countries and unusable.
Also I found "triangle" package, which is written in C and implementing Chew's second algorithm and works well
Now I wonder, was it ported to Java or wrapped into it?
Ruppert
class from www3.math.tu-berlin.de/jtem/numericalMethods , but it does not treat holes. I consider the "triangle" package that you mentioned as THE solution for triangulations (it's really good). But - it's implemented in a horrible, horrible "C"ish way, and can not even remotely be ported to java (never-ever ... horrible). Once I wrote a small wrapper for this lib with JNI, but it is not published yet and might still need some cleanups. – Twentytriangle
lib did not respond to my request to publish the Java bindings for his lib... – Twenty