use of com.revolsys.geometry.model.GeometryCollection in project com.revolsys.open by revolsys.
the class GeometryCollectionImpl method forEachPolygon.
@Override
public void forEachPolygon(final Consumer<Polygon> action) {
if (this.geometries != null) {
for (final Geometry geometry : this.geometries) {
if (geometry instanceof Polygon) {
final Polygon polygon = (Polygon) geometry;
action.accept(polygon);
} else if (geometry instanceof GeometryCollection) {
geometry.forEachPolygon(action);
}
}
}
}
Aggregations