Compute area of polygons or and the surfacer area or raster cells.
Computing the surface area of raster cells is only relevant for longitude/latitude rasters. For planar data, the cell area is constant, can be computed with prod(res(x)). For polygons, the area of each geometry is returned.
The length method works only on SpatVector objects, and computes the length of lines or the circumference of polygons.