Area measured in the layer's own projection, which is what sf::st_area()
returns and what ArcGIS reports as Shape_Area.
expanse_planar(x, unit = "m")A SpatVector, or an object coercible to one via terra::vect().
Character. Output unit, passed to terra::expanse(): one of
"m" (the default), "km", "ha".
A numeric vector of areas in unit, one per feature.
terra::expanse() defaults to transform = TRUE, which reprojects to
lon/lat and returns geodesic area instead. The two agree in an equal-area
projection (e.g. BC Albers) and disagree everywhere else: in Canada Atlas
Lambert at BC latitudes geodesic area runs about 2.8% high, which is enough
to move features across an area threshold and to shift every reported total.
Prefer this wherever an area has to line up with sf, with ArcGIS, or with a
fixed cutoff.
For a layer in a geographic (lon/lat) CRS, planar area is meaningless and
terra returns geodesic area regardless; this warns in that case.
Other SpatVector helpers:
dissolve_by(),
drop_values(),
nn_distance()