Hello
I'm building a Voronoi diagram for six sites in form of a triangle subdivided
into 4 triangles. I'm using the VoronoiDiagramBuilder and it works well. The
diagram looks correct.
The I get the subdivision from the VoronoiDiagramBuilder.
First observation: the subdivision is different depending on a previous call of
VoronoiDiagramBuilder.getDiagram(). I wouldn't expect such a behavior because
it isn't documented.
Second observation: The origin of the QuadEdge rot seems to be swapped with its
destination.
Am I wrong?
Chris
Here is my code:
Geometry points = new WKTReader().read("MULTIPOINT ((0 0), (2 0), (1
2), (4 0), (3 2), (2 4))");
// build Voronoi diagram
VoronoiDiagramBuilder voronoiBuilder = new VoronoiDiagramBuilder();
voronoiBuilder.setSites(points);
// following line influences further output
System.out.println(voronoiBuilder.getDiagram(new
GeometryFactory()));
QuadEdgeSubdivision subdivision = voronoiBuilder.getSubdivision();
QuadEdge qe = subdivision.locate(new Coordinate(2, 1));
// in the source code of QuadEdge rot has been defined as:
// the dual of this edge, directed from right to left
System.out.println("this edge: " + qe);
System.out.println("origin of rot: " + qe.rot().orig());
System.out.println("destination of rot: " + qe.dest());
------------------------------------------------------------------------------
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