getBoundary method
Computes the boundary of this geometry
@return a lineal geometry (which may be empty) @see Geometry#getBoundary
Implementation
Geometry getBoundary() {
if (isEmpty()) {
return getFactory().createMultiLineStringEmpty();
}
List allRings = [];
for (int i = 0; i < geometries.length; i++) {
Polygon polygon = geometries[i] as Polygon;
Geometry rings = polygon.getBoundary();
for (int j = 0; j < rings.getNumGeometries(); j++) {
allRings.add(rings.getGeometryN(j));
}
}
return getFactory().createMultiLineString(allRings as List<LineString>);
}