bg_polygon - ObjectVision/GeoDMS GitHub Wiki

Geometric functions > bg_polygon

syntax

  • bg_polygon(polygon_data_item)

description

bg_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 geometry library. It can be used to repair or normalize polygon geometries (e.g. fix ring orientation and remove self-intersections).

The bg_ prefix of the function name indicates that the implementation of the operator uses boost geometry. Unlike geos_polygon it also supports fpoint (single precision) coordinates.

applies to

conditions

  1. The composition type of the polygon_data_item needs to be polygon.

since version

15.6.0

example

attribute<fpoint> geometry_clean (district) := bg_polygon(district/geometry);

see also

⚠️ **GitHub.com Fallback** ⚠️