Sub (difference)
Geometric functions sub (difference)
syntax
- sub(polygon_data_itemA, polygon_data_itemB)
- polygon_data_itemA - polygon_data_itemB
definition
sub(polygon_data_itemA, polygon_data_itemB) or polygon_data_itemA - polygon_data_itemB results in a new Polygon Data item with the difference of the two arguments: polygon_data_itemA and polygon_data_itemB.
The resulting polygon is the original polygon (polygon_data_itemA) minus its intersection with polygon_data_itemB.
description
The sub-function can, for example, be used to create a mask polygon.
applies to
data items polygon_data_itemA and polygon_data_itemB with an ipoint or spoint Value type. A dpoint or fpoint is also allowed since version 15.6.0.
conditions
- The composition type of the argument items needs to be polygon.
- The domain of the arguments must match or be Void.
since version
- 7.112
- 15.6.0 (in case of floating point coordinates)
example
parameter<ipoint> geometry (poly) := square/geometry[0] - union_polygon/geometry;