-
Notifications
You must be signed in to change notification settings - Fork 1
bp_polygon_connectivity
Geometric functions > bp_polygon_connectivity
- bp_polygon_connectivity(polygon_data_item)
bp_polygon_connectivity(polygon_data_item) finds all pairs of adjacent (touching or overlapping) polygons in the polygon_data_item and returns them as a new domain.
The result is a new domain unit (uint32) where each entry represents one adjacency relationship between two polygons. Two sub-attributes relate each entry back to the first and second polygon in the pair.
The bp_ prefix of the function name indicates that the implementation of the operator uses the Boost Polygon library.
- attribute polygon_data_item with a polygon value type with integer coordinates (ipoint or spoint)
- The composition type of the polygon_data_item needs to be polygon.
- The polygon data item must have a point value type with integer coordinates (ipoint or spoint).
This function results in problems for (integer) coordinates larger than 2^25 (after translation where the first point is moved to (0, 0)). If your integer coordinates, for instance, represent mm, 2^25[mm] = about 33 [km]. The reason is that for calculating intersections, products of coordinates are calculated and cast to float64 with a 53-bit mantissa. We advise you to keep the size of your integer coordinates for polygons limited.
The result is a container (new domain unit of type uint32) with:
-
F1: relation to the domain of polygon_data_item for the first polygon in each adjacent pair -
F2: relation to the domain of polygon_data_item for the second polygon in each adjacent pair
15.6.0
unit<uint32> adjacency := bp_polygon_connectivity(district/geometry)
{
attribute<district> F1;
attribute<district> F2;
}
GeoDMS ©Object Vision BV. Source code distributed under GNU GPL-3. Documentation distributed under CC BY-SA 4.0.