Skip to main content

Module measures

Module measures 

Source
Expand description

Geodesic measures over geometry: area and centroid.

Area uses the spherical-excess formula rather than a projected shoelace, so it stays correct for polygons spanning arbitrary extents — the same basis as crate::st_distance, which is haversine. Centroid follows OGC semantics: the result is the centroid of the highest-dimension components present, so a GeometryCollection of a polygon and a stray point returns the polygon’s centroid, not a blend of the two.

Functions§

st_area
Geodesic area of a geometry in square meters.
st_centroid
Centroid of a geometry, as a Point.