Skip to main content

ring_area

Function ring_area 

Source
pub fn ring_area<R>(r: &R) -> <ShoelaceArea as AreaStrategy<R>>::Out
Expand description

Signed area of a Ring via the Cartesian shoelace formula.

Mirrors boost::geometry::area(ring) from boost/geometry/algorithms/area.hpp resolved through the dispatch::area<Ring, ring_tag> arm at algorithms/area.hpp:154-157.

§Sign convention

Follows Boost: rings traversed in their declared geometry_trait::PointOrder produce a positive area, rings traversed in the opposite direction produce a negative area (test/algorithms/area/area.cpp:63-64).