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

conditions

  1. The composition type of the arguments items needs to be polygon.
  2. The domain of the arguments must match of be void.

since version

7.112

example

parameter<ipoint> geometry (poly) := square/geometry[0] - union_polygon/geometry;

see also

  • sub
  • [[mul (overlap)]]