Expand description
Strategy for summing the length of a sequence of points.
Mirrors three pieces of Boost.Geometry that collaborate to make
boost::geometry::length(g) and boost::geometry::perimeter(g)
work for any linestring / ring / polygon in any coordinate system:
boost/geometry/strategies/length/services.hpp— theservices::default_strategy<G>metafunction that picks the per-CS length strategy.boost/geometry/strategies/length/cartesian.hpp—strategies::length::cartesian<>plus itsservices::default_strategy<Geometry, cartesian_tag>specialisation; the Cartesian implementation hands astrategy::distance::pythagoras<>to the algorithm.boost/geometry/algorithms/length.hpp:80-107—detail::length::range_lengthwalks the iterator pair and sums the per-segment distances; this file performs the same walk in Rust against theLinestring/Ringtraits.
T33 lands the Cartesian implementation only — Boost’s Spherical/Geographic length strategies arrive alongside the Haversine / Andoyer / Vincenty distance strategies in later tasks (T40+).
Structs§
- Cartesian
Length - Cartesian length: sum of Pythagorean distances between consecutive points (linestring case).
- Cartesian
Perimeter - Cartesian perimeter: sum of Pythagorean distances between consecutive points of a ring, plus the closing edge when the ring is open.
Traits§
- Default
Length - “Which length strategy do we pick by default for this CS family?”
- Default
Perimeter - “Which perimeter strategy do we pick by default for this CS family?”
- Length
Strategy - A strategy for computing the length of a sequence of points.
Type Aliases§
- Default
Length Strategy - Type alias resolving the default length strategy for geometry
Gby walkingG -> G::Point -> Cs -> Family -> DefaultLength::Strategy. - Default
Perimeter Strategy - Default perimeter strategy for the coordinate-system family of
G.