-
Notifications
You must be signed in to change notification settings - Fork 1
outer_multi_polygon
Maarten Hilferink edited this page Apr 8, 2026
·
1 revision
Geometric functions outer_multi_polygon
The outer_multi_polygon function extracts only the outer rings from multi-polygons, removing any holes.
outer_multi_polygon(multi_polygons: E->MultiPolygon<Point>) -> E->MultiPolygon<Point>
Alias: This is also available as bg_outer_multi_polygon for boost geometry coordinates.
Removes holes from each polygon part in a multi-polygon, keeping only the outer boundary rings. The result has the same number of polygon parts, but each part is a simple polygon without any interior rings.
For multi-polygons without holes, the output is identical to the input.
| argument | description | type |
|---|---|---|
| multi_polygons | Multi-polygon geometries | E->MultiPolygon |
Time complexity: O(n × p × v) where:
- n = number of multi-polygons
- p = average number of polygon parts per multi-polygon
- v = average number of vertices per polygon part
Memory efficient as it typically reduces geometry size by removing hole vertices.
- Input should be multi-polygon geometries
- For single polygons, use outer_single_polygon
unit<uint32> Parcels: nrofrows = 500;
attribute<DPoint> parcel_geometry (poly, Parcels); // multi-polygons with possible holes
// Remove all holes (ponds, excluded areas, etc.)
attribute<DPoint> filled_parcels (poly, Parcels) := outer_multi_polygon(parcel_geometry);
// Compare areas
attribute<Float64> original_area (Parcels) := area(parcel_geometry);
attribute<Float64> filled_area (Parcels) := area(filled_parcels);
attribute<Float64> hole_area (Parcels) := filled_area - original_area;
- Simplifying geometries for visualization
- Computing gross area (including holes)
- Preparing geometries for operations that don't handle holes well
- Data cleaning where holes are artifacts
- outer_single_polygon - for single polygon geometries
- bg_outer_multi_polygon - boost geometry variant
- bg_outer_single_polygon - boost geometry single polygon variant
- polygon operators
- Geometric functions
7.0
GeoDMS ©Object Vision BV. Source code distributed under GNU GPL-3. Documentation distributed under CC BY-SA 4.0.