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 left part of the figure illustrates the arguments: polygon_data_itemA and polygon_data_itemB.
The resulting polygon (right side of the image) is the original square (polygon_data_itemA) minus the district 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;