Skip to main content

correct_closure

Function correct_closure 

Source
pub fn correct_closure<G: CorrectClosure>(g: &mut G)
Expand description

Fix only ring closure, leaving orientation unchanged.

Mirrors boost::geometry::correct_closure(g) from boost/geometry/algorithms/correct_closure.hpp:211-224. Closed rings gain a copy of their first point when needed; open rings lose a duplicated closing point. Polygons apply the same rule to their exterior and interior rings, and multi-polygons apply it to every member.