geos_polygon - ObjectVision/GeoDMS GitHub Wiki

Geometric functions > geos_polygon

syntax

  • geos_polygon(polygon_data_item)

description

geos_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 geos library. It can be used to repair or normalize polygon geometries.

The geos_ prefix of the function name indicates that the implementation of the operator uses geos.

Only dpoint (double precision) coordinates are fully supported for GEOS-based polygon operations. For fpoint coordinates a deprecation warning is issued; use bg_polygon or convert to dpoint.

applies to

conditions

  1. The composition type of the polygon_data_item needs to be polygon.
  2. The order of points in the polygon_data_item needs to be clockwise for exterior bounds and counterclockwise for holes (right-hand-rule).

since version

14.0

example

attribute<dpoint> geometry_clean (district) := geos_polygon(district/geometry);

see also

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