-
Notifications
You must be signed in to change notification settings - Fork 1
outer_single_polygon
Maarten Hilferink edited this page Apr 8, 2026
·
1 revision
Geometric functions outer_single_polygon
The outer_single_polygon function extracts only the outer ring from single polygons, removing any holes.
outer_single_polygon(polygons: E->Polygon<Point>) -> E->Polygon<Point>
Alias: This is also available as bg_outer_single_polygon for boost geometry coordinates.
Removes holes from each single polygon, keeping only the outer boundary ring. The result is a simple polygon without any interior rings.
For polygons without holes, the output is identical to the input.
| argument | description | type |
|---|---|---|
| polygons | Single polygon geometries | E->Polygon |
Time complexity: O(n × v) where n is the number of polygons and v is the average number of vertices per polygon.
Memory efficient as it typically reduces geometry size by removing hole vertices.
- Input must be single polygons (not multi-polygons)
- For multi-polygons, use outer_multi_polygon
unit<uint32> Buildings: nrofrows = 100;
attribute<DPoint> building_footprint (poly, Buildings); // may have courtyards (holes)
// Remove courtyards, keep only outer boundary
attribute<DPoint> outer_boundary (poly, Buildings) := outer_single_polygon(building_footprint);
// Useful for simplified visualization or area calculations including holes
attribute<Float64> gross_area (Buildings) := area(outer_boundary);
attribute<Float64> net_area (Buildings) := area(building_footprint);
attribute<Float64> courtyard_area (Buildings) := gross_area - net_area;
- outer_multi_polygon - for multi-polygon geometries
- bg_outer_single_polygon - boost geometry variant
- bg_outer_multi_polygon - boost geometry multi-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.