private static Geometry polygonize(Geometry g, bool extractOnlyPolygonal) { var lines = LinearComponentExtracter.GetLines(g); var polygonizer = new Polygonizer(extractOnlyPolygonal); polygonizer.Add(lines); return(polygonizer.GetGeometry()); }
private static IGeometry Polygonize(IGeometry g, bool extractOnlyPolygonal) { var lines = LineStringExtracter.GetLines(g); var polygonizer = new Polygonizer(extractOnlyPolygonal); polygonizer.Add(lines); return(polygonizer.GetGeometry()); /* * Collection polys = polygonizer.getPolygons(); * Polygon[] polyArray = GeometryFactory.toPolygonArray(polys); * return g.getFactory().createGeometryCollection(polyArray); */ }