Skip to main content

Module length

Module length 

Source
Expand description

length(&g) and perimeter(&p) — see boost/geometry/algorithms/{length,perimeter}.hpp.

length dispatches to the per-CS-family default strategy via geometry_strategy::DefaultLength — Cartesian linestrings resolve to geometry_strategy::CartesianLength, spherical to geometry_strategy::SphericalLength, geographic to geometry_strategy::GeographicLength. perimeter and ring_perimeter use the parallel geometry_strategy::DefaultPerimeter family dispatch.

Functions§

length
Sum the per-segment distance along a linestring using the default strategy for its coordinate-system family.
length_with
Length of a linestring using an explicitly supplied strategy.
perimeter
Perimeter of a polygon: length of the exterior ring plus the sum of the lengths of the interior rings.
perimeter_with
Perimeter of a polygon using an explicitly supplied ring-length strategy.
ring_perimeter
Standalone helper to compute the perimeter of a Ring directly, without wrapping it in a polygon. Mirrors Boost’s perimeter(ring) overload which dispatches via the ring_tag arm of algorithms/perimeter.hpp:66-73.
ring_perimeter_with
Perimeter of a ring using an explicitly supplied strategy.