java - How to create a polygon in JTS when we have list of coordinate? -
we can create linestring using coordinates list this:
geometry g1 = new geometryfactory().createlinestring(coordinates); how can create polygon using coordinates list?
thanks in advance.
the accepted answer might have still been valid (still awkward) in 2012 nowadays should this:
// create geometryfactory if don't have 1 geometryfactory geometryfactory = new geometryfactory(); // pass array of coordinate or coordinatesequence method polygon polygonfromcoordinates = geometryfactory.createpolygon(coordinates);
Comments
Post a Comment