Ok, mystery solved, I think. The constraints need to be segment-unique - in
other words, there cannot be any duplicate segments in the set of
constraint edges.  So you will have to run a dissolve on your input
constraints.  The LineDissolver class will do this.

When I do this I can use a tolerance of 0 and it completes.

I've updated the Javadoc to mention this requirement.


On Wed, Dec 4, 2013 at 10:31 AM, Brian Sanjeewa Rupasinghe <
[email protected]> wrote:

> Hi,
>
> I  used the following method for the triangulation. I use polygons as
> constraints as well. Input Geometry is multipoint of all polygon vertices.
> Then polygons are used as constraints in a GeometryCollection. Was it
> because i used polygon geometry itself as constraints rather than its line
> segments?
>
> public static Geometry TriangulationBuilder (MultiPoint mp,
> ArrayList<Geometry> alg, double tolerance)
>     {
>         GeometryFactory gf = new GeometryFactory();
>         ConformingDelaunayTriangulationBuilder cdtb = new
> ConformingDelaunayTriangulationBuilder();
>         //constriant geometry
>         Geometry consegs = gf.buildGeometry(alg);
>         //GeometryCollection g_cp = (GeometryCollection)
> gf.createGeometryCollection(als);
>         //set sites for triangulation
>         cdtb.setSites(mp);
>         //set constraints
>         cdtb.setConstraints(consegs);
>         //set tolerance -0.00001
>         cdtb.setTolerance(tolerance);
>         //Retrieving triangles
>         Geometry Trigeom = cdtb.getTriangles(gf);
>         return Trigeom;
>     }
>
>
------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Jts-topo-suite-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user

Reply via email to