cgal_overlay_polygon - ObjectVision/GeoDMS GitHub Wiki
Geometric functions > cgal_overlay_polygon
- cgal_overlay_polygon(polygon_data_item)
- cgal_overlay_polygon(polygon_data_item1, polygon_data_item2)
cgal_overlay_polygon computes the spatial overlay between polygon sets, resulting in a new domain containing all intersecting polygon pairs with their combined geometry.
With one argument, cgal_overlay_polygon(polygon_data_item) computes a self-overlay: all pairs of polygons within the dataset that spatially overlap are found and their intersection geometries are computed.
With two arguments, cgal_overlay_polygon(polygon_data_item1, polygon_data_item2) computes an overlay between two polygon datasets. All pairs of polygons from the two datasets that spatially overlap are found and their intersection geometries are computed.
The cgal_ prefix of the function name indicates that the implementation of the operator uses CGAL, which provides exact predicates and exact constructions for maximum numerical precision.
- attribute polygon_data_item1 with a polygon value type
- attribute polygon_data_item2 (optional) with a polygon value type, compatible with polygon_data_item1
- The composition type of the arguments needs to be polygon.
- The value types of both arguments must be compatible (same point type).
The result is a container (new domain unit of type uint32) with:
-
geometry: the intersection polygon geometry for each overlapping pair -
first_rel: relation to the domain of polygon_data_item1 (absent if domain is void) -
second_rel: relation to the domain of polygon_data_item2 (absent if domain is void, or in 1-argument form)
14.0
unit<uint32> overlay := cgal_overlay_polygon(land_use/geometry, district/geometry)
{
attribute<dpoint> geometry;
attribute<land_use> first_rel;
attribute<district> second_rel;
}