bp_polygon
Geometric functions > bp_polygon
syntax
- bp_polygon(polygon_data_item)
description
bp_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 Boost Polygon library. It can be used to repair or normalize polygon geometries.
The bp_ prefix of the function name indicates that the implementation of the operator uses the Boost Polygon library, which requires integer coordinates (ipoint or spoint).
applies to
- attribute polygon_data_item with a polygon value type with integer coordinates (ipoint or spoint)
conditions
- The composition type of the polygon_data_item needs to be polygon.
- The data item must have a point value type with integer coordinates (ipoint or spoint).
since version
15.6.0
example
attribute<ipoint> geometry_clean (district) := bp_polygon(district/geometry);