Skip to content

geos_split_polygon

Jip Claassens edited this page Mar 31, 2026 · 2 revisions

Geometric functions > geos_split_polygon

syntax

  • geos_split_polygon(polygon_data_item)

description

geos_split_polygon(polygon_data_item) splits each multi-polygon element in the polygon_data_item into its individual single-polygon parts. The result is a new domain unit containing one entry per single polygon, with a geometry sub-item holding the polygon geometries and a polygon_rel sub-item that relates each result polygon back to its source element in polygon_data_item.

This operator is useful when polygon data contains multi-part features (multi-polygons) and individual parts are needed as separate entities.

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 bp_split_polygon instead.

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).

result

The result is a container with:

  • geometry: polygon attribute with the individual single polygons
  • polygon_rel: relation back to the domain of polygon_data_item

since version

14.0

example

unit<uint32> single_parts := geos_split_polygon(district/geometry)
{
    attribute<dpoint>   geometry;
    attribute<district> polygon_rel;
}

see also

Clone this wiki locally