polygon_unionfind
polygon_unionfind is a disjoint-set data structure (union-find) where sets
are polygons.
The polygons are stored in an R-tree.
It stores polygons, tracks connected components with union-find, and uses
i_overlay to merge intersecting polygons into a single representative shape.
Basic usage
use ;
let mut polygon_unionfind = new;
let first = polygon_unionfind.insert;
let second = polygon_unionfind.insert;
// Overlapping polygons are now in the same set and thus have the same
// representative.
let repr_first = polygon_unionfind.find.vertices.len;
let repr_second = polygon_unionfind.find.vertices.len;
assert_eq!;
Features
std(default): enablesstdsupport.undoredo(optional): enables integration aliases intended forundoredorecorders/deltas.
License
Licensed under either:
- MIT License
- Apache License, Version 2.0