Expand description
area(&g) — see boost/geometry/algorithms/area.hpp.
Cartesian-only in v1; spherical / geographic area strategies arrive alongside the Haversine / Andoyer / Vincenty work in later tasks.
§Why four entry points
Boost overloads on the same name area and resolves the right
per-tag dispatch::area arm at the call site
(algorithms/area.hpp:149-187). Rust has no overloading, and the
Cartesian strategy in geometry-strategy::area is intentionally
split into four sibling unit-structs (one per geometry kind) to
sidestep coherence — see that module’s docs. The split is
reflected here as four entry points keyed on the input geometry’s
kind; the names follow the same <kind>_area shape that
length / perimeter already use for the same reason
(crates/geometry-algorithm/src/length.rs).
Functions§
- area
- Signed area of a
Polygon: exterior-ring area plus the sum of interior-ring areas (interior rings are conventionally wound opposite the exterior, so their signed area already cancels). - area_
with - Area of a polygon using an explicitly supplied strategy.
- box_
area - Area of an axis-aligned
Box:(xmax - xmin) * (ymax - ymin). - multi_
polygon_ area - Signed area of a
MultiPolygon: sum of the signed areas of its member polygons. - ring_
area - Signed area of a
Ringvia the Cartesian shoelace formula.