cgal_polygon - ObjectVision/GeoDMS GitHub Wiki
Geometric functions > cgal_polygon
- cgal_polygon(polygon_data_item)
cgal_polygon(polygon_data_item) results in a data item with the same domain as the polygon_data_item, with the geometry cleaned and validated using the CGAL library. It can be used to repair or normalize polygon geometries.
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. CGAL's polygon repair functionality is particularly robust for handling self-intersecting polygons and other geometric anomalies.
- attribute polygon_data_item with a polygon value type
- The composition type of the polygon_data_item needs to be polygon.
- The order of points in the polygon_data_item needs to be clockwise for exterior bounds and counterclockwise for holes (right-hand-rule).
14.0
attribute<dpoint> geometry_clean (district) := cgal_polygon(district/geometry);