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, for which bp_difference is applied, or an fpoint or dpoint value type, for which geos_difference is applied. For other point types, or for the reading of the dms polygon operators, call a difference operator by its name; see polygon operators.

conditions

  1. The composition type of the argument items needs to be polygon.
  2. 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;

see also