use of org.opengis.geometry.primitive.SurfaceBoundary in project geotoolkit by Geomatys.
the class GeometryUtils method createSurfaceBoundary.
private static SurfaceBoundary createSurfaceBoundary(final PrimitiveFactory primitiveFactory, final DirectPosition[] exteriorRingPoints, final DirectPosition[][] interiorRingsPoints) {
final Ring exteriorRing = createRing(primitiveFactory, exteriorRingPoints);
final List interiorRingList = interiorRingsPoints.length == 0 ? Collections.EMPTY_LIST : new ArrayList();
for (int i = 0; i < interiorRingsPoints.length; i++) {
interiorRingList.add(createRing(primitiveFactory, interiorRingsPoints[i]));
}
final SurfaceBoundary surfaceBoundary = primitiveFactory.createSurfaceBoundary(exteriorRing, interiorRingList);
return surfaceBoundary;
}
use of org.opengis.geometry.primitive.SurfaceBoundary in project geotoolkit by Geomatys.
the class GeometryUtils method getExteriorDirectPositions.
public static DirectPosition[] getExteriorDirectPositions(final Polygon polygon) {
final SurfaceBoundary surfaceBoundary = polygon.getBoundary();
final Ring exteriorRing = surfaceBoundary.getExterior();
return GeometryUtils.getDirectPositions(exteriorRing);
}
Aggregations