Boost polygon functions
There are many polygon operators available in the GeoDMS. You might have seen some already. However, they can also be combined following a certain grammar. There are six base operators:
These can then be combined with the following suffices, twice!
- ‘no suffix’
- _filtered = filter results on area. filter parameter, e.g., 3[meter] keeps all polygons with an area larger than 3[meter].
- _inflated = inflate with parameter value, e.g., 3[meter] which place an edge 3[meter] perpendicular to the original. This could result in very thin, pointy corners. To counteract this, use the iXy or dXy variants.
- _deflated
- _i4HV = inflate with a 4-point square-shape
- _i4D = inflate with a 4-point diamond-shape
- _i8D
- _i16D
- _iXHV
- _iXD
- _d4HV
- _d4D
- _d8D
- _d16D
- _dXHV
- _dXD
Suffix meaning: _[a][X][y]
- a = i (inflate) or d (deflate)
- X = degree of rounding = 4, 8, 16, X (x-shaped)
- y = kernel shape = D (diagonal, diamond-shaped) or HV (horizontal and vertical, square-shaped)
There are different ways of inflating polygons related to how angles are treated, i.e., differences in how the angles are rounded off. X represents a user-defined degree of roundness, which can be 4, 8, 16 or X. The suffix ‘d’ or ‘hv’ is used for the diagonal (diamond-shaped) or horizontal-vertical (square-shaped) kernel. For these inflations, the Minkowski sum method is used.
implement in script
if there is only a ‘union’ in the operator, the result is parameter. If it contains split, it will create a new unit. If it contains a ‘partitioned’ it is an attribute within an existing domain.
parameter<rdc_mm> union (poly) := union_polygon(Wegdeel/geometry[rdc_mm]);
unit<uint32> split_union := split_union_polygon(Wegdeel/top10nl_wegdeel_vlak/geometry[rdc_mm]);
This first performs a union based on province_rel, and then splits them into multipolygons.
unit<uint32> split_partitioned_union := split_partitioned_union_polygon(Wegdeel/geometry[rdc_mm], Wegdeel/province_rel);
example
partitioned_union_polygon_d16D_i16D