dms_split_polygon

Geometric functions dms_split_polygon

syntax

  • dms_split_polygon(polygon_data_item)

description

dms_split_polygon(polygon_data_item) splits every multi-polygon of the argument into its single polygons and results in a new uint32 Domain unit with one entry per part. Each element is first read under the even-odd rule of the dms polygon operators family, so the argument does not have to be a valid polygon.

The result carries two subitems:

  • geometry: the single polygon of that part, with its holes
  • polygon_rel: a relation towards the domain of polygon_data_item, the element the part came from

A part is one shell with the holes that lie in it. A polygon with a hole stays one part; two shells that touch in a single point are two.

applies to

  • Attribute polygon_data_item with a polygon Value type: spoint, ipoint, wpoint, upoint, fpoint or dpoint

conditions

The composition type of the argument needs to be polygon.

since version

20.20.0

example

unit<uint32> parts := dms_split_polygon(district/geometry)
{
    attribute<ipoint>   geometry;
    attribute<district> polygon_rel;
}

see also