pub fn union_polygon(poly1: &Polygon, poly2: &Polygon) -> Result<Vec<Polygon>>Expand description
Computes union of two polygons
Returns a simplified union polygon. This implementation handles:
- Disjoint polygons (returns both)
- One polygon containing the other
- Overlapping polygons (simplified boundary merge)
§Arguments
poly1- First polygonpoly2- Second polygon
§Returns
Vector of polygons representing the union
§Errors
Returns error if polygons are invalid