-
Notifications
You must be signed in to change notification settings - Fork 1
split_union_polygon
Geometric functions split_union_polygon
- split_union_polygon(polygon_data_item)
split_union_polygon(polygon_data_item) results in a new uint32 domain unit with single polygons for the union of all (multi)polygon in the polygon_data_item argument.
The function is a combination of union_polygon (dissolve) and split_polygon: it first dissolves all polygons of the polygon_data_item into one geometry, in which the lines between adjacent polygons are removed, and then splits this geometry into individual single polygons.
The resulting domain unit contains one subitem:
- geometry: the geometry of the single polygons. This attribute has the same values unit as the polygon_data_item argument.
Unlike split_polygon, no relation towards the domain of the polygon_data_item argument is generated, as the source polygons are first merged into one geometry.
To dissolve per group and then split, use split_partitioned_union_polygon.
attribute polygon_data_item with an ipoint or spoint value type
- The composition type of the polygon_data_item argument needs to be polygon.
- The domain unit of the polygon_data_item argument must be of value type uint32.
- The order of points in the polygon_data_item needs to be clockwise for exterior bounds and counter clockwise for holes in polygons (right-hand-rule).
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 casted to float64 with a 53 bits mantissa (in the development/test environment of boost::polygon these were float80 values with a 64 bits mantissa). We advise to keep the size of your integer coordinates for polygons limited and for instance do not use a mm precision for country borders (meter or kilometer might be sufficient).
7.042
Since GeoDMS 20 this operator name is no longer available. Use bp_split_union_polygon for integer coordinates or geos_split_union_polygon for double precision coordinates instead.
unit<uint32> split_union := split_union_polygon(multipolygon/geometry);
GeoDMS ©Object Vision BV. Source code distributed under GNU GPL-3. Documentation distributed under CC BY-SA 4.0.