Skip to main content

fix_self_intersection

Function fix_self_intersection 

Source
pub fn fix_self_intersection(polygon: &Polygon) -> Result<Polygon>
Expand description

Attempts to fix self-intersecting polygons using a buffer of 0

This is a simple approach that may not work for all cases. For complex self-intersections, use more sophisticated repair algorithms.

§Arguments

  • polygon - Self-intersecting polygon

§Returns

Repaired polygon (or original if repair not possible)

§Errors

Returns error if repair fails