double[] ordinates = geometry.getOrdinatesArray();
return PointCollectionFactory.create(ordinates, flag, crs);
}
private static Polygon convertPolygon(JGeometry geometry) {
CrsId crs = CrsId.valueOf(geometry.getSRID());
int dimensions = geometry.getDimensions();
boolean measured = geometry.isLRSGeometry();
DimensionalFlag flag = DimensionalFlag.valueOf(dimensions > (measured ? 3 : 2), measured);
Object[] elements = geometry.getOrdinatesOfElements();
LinearRing[] rings = new LinearRing[elements.length];