Use JTS topology in JavaFx

Posted by borovsky on Stack Overflow See other posts from Stack Overflow or by borovsky
Published on 2013-06-28T16:20:06Z Indexed on 2013/06/28 16:21 UTC
Read the original article Hit count: 506

Filed under:
|
|
|
|

I have some polygon in jts topology library. if I want to draw on javafx pane I do:

 Polygon poly=new Polygon();//javafx
 //g is geometry of jts
    for (Coordinate coord : g.getCoordinates())
    {
        poly.getPoints().addAll(coord.x, coord.y);
    }

and got extra four edges that are not expected: enter image description here

but the same data look good in test builder: enter image description here

what is wrong? order of traversing the geometry? any ideas?

© Stack Overflow or respective owner

Related posts about java

Related posts about order