cgal_polygon_connectivity
Geometric functions > cgal_polygon_connectivity
syntax
- cgal_polygon_connectivity(polygon_data_item)
description
cgal_polygon_connectivity(polygon_data_item) finds all pairs of adjacent (touching or overlapping) polygons in the polygon_data_item and returns them as a new domain.
The result is a new domain unit (uint32) where each entry represents one adjacency relationship between two polygons. Two sub-attributes relate each entry back to the first and second polygon in the pair.
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.
applies to
- attribute polygon_data_item with a polygon value type
conditions
- The composition type of the polygon_data_item needs to be polygon.
result
The result is a container (new domain unit of type uint32) with:
F1: relation to the domain of polygon_data_item for the first polygon in each adjacent pairF2: relation to the domain of polygon_data_item for the second polygon in each adjacent pair
since version
14.0
example
unit<uint32> adjacency := cgal_polygon_connectivity(district/geometry)
{
attribute<district> F1;
attribute<district> F2;
}