geos_overlay_polygon - ObjectVision/GeoDMS GitHub Wiki

Geometric functions > geos_overlay_polygon

syntax

  • geos_overlay_polygon(polygon_data_item)
  • geos_overlay_polygon(polygon_data_item1, polygon_data_item2)

description

geos_overlay_polygon computes the spatial overlay between polygon sets, resulting in a new domain containing all intersecting polygon pairs with their combined geometry.

With one argument, geos_overlay_polygon(polygon_data_item) computes a self-overlay: all pairs of polygons within the dataset that spatially overlap are found and their intersection geometries are computed.

With two arguments, geos_overlay_polygon(polygon_data_item1, polygon_data_item2) computes an overlay between two polygon datasets. All pairs of polygons from the two datasets that spatially overlap are found and their intersection geometries are computed.

The geos_ prefix of the function name indicates that the implementation of the operator uses geos.

applies to

conditions

  1. The composition type of the arguments needs to be polygon.
  2. The value types of both arguments must be compatible (same point type).

result

The result is a container (new domain unit of type uint32) with:

  • geometry: the intersection polygon geometry for each overlapping pair
  • first_rel: relation to the domain of polygon_data_item1 (absent if domain is void)
  • second_rel: relation to the domain of polygon_data_item2 (absent if domain is void, or in 1-argument form)

since version

14.0

example

unit<uint32> overlay := geos_overlay_polygon(land_use/geometry, district/geometry)
{
    attribute<fpoint>    geometry;
    attribute<land_use>  first_rel;
    attribute<district>  second_rel;
}

see also

⚠️ **GitHub.com Fallback** ⚠️