Hello

I'm building the Voronoi diagram just for three sites (forming a triangle) 
using the VoronoiDiagramBuilder. It works well. Printing the diagram looks good.

Then I get a QuadEdgeSubdivision of the VoronoiDiagramBuilder. I would assume 
that the subdivision contains exactly one vertex inside my triangle 
(representing the face) but it doesn't, even the Voronoi diagram includes such 
a vertex. What's wrong?

Chris

Here is my code:

          Geometry points = new WKTReader().read("MULTIPOINT ((0 0), (2 0), (1 
2))");

            // build Voronoi diagram
            VoronoiDiagramBuilder voronoiBuilder = new VoronoiDiagramBuilder();
            voronoiBuilder.setSites(points);

            //System.out.println(voronoiBuilder.getDiagram(new 
GeometryFactory()));
            QuadEdgeSubdivision subdivision = voronoiBuilder.getSubdivision();

            QuadEdge qe = subdivision.locate(new Coordinate(1, 1));
            System.out.println("centroid of the triangle shouldn't be null: " + 
qe.invRot().orig());

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Jts-topo-suite-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user

Reply via email to