-
Notifications
You must be signed in to change notification settings - Fork 1
geos_difference
Geometric functions > geos_difference
- geos_difference(polygon_data_item1, polygon_data_item2)
geos_difference(polygon_data_item1, polygon_data_item2) results in a data item with the difference of the two polygon arguments. The result contains, for each element, the area of the first argument that is not covered by the second argument (A minus B).
The operator is applied element-by-element. Both domains need to match, or one of the arguments needs to be a parameter (void domain).
The geos_ prefix of the function name indicates that the implementation of the operator uses geos.
This operator is also automatically invoked by the - operator when used with fpoint or dpoint polygon data items.
- attribute polygon_data_item1 with a polygon value type
- attribute polygon_data_item2 with a polygon value type
The value types of both arguments must be compatible (same point type).
- The composition type of both arguments needs to be polygon.
- The domains of the two arguments must match, or one argument must have a void domain (parameter).
14.0
attribute<fpoint> geometry_difference (district) := geos_difference(district/geometry, water/geometry);
// equivalent to:
attribute<fpoint> geometry_difference (district) := district/geometry - water/geometry;
GeoDMS ©Object Vision BV. Source code distributed under GNU GPL-3. Documentation distributed under CC BY-SA 4.0.