I use R to read in a shape file to analyse with the sp package polygons of oilfields (longitude-latitude with WGS84) and their respective areas. Unfortunately I do not know the unit of the area output. E.g. the area output is on average 0.85 units (max 4.34) which probably is not in square kilometers since this would be much too small for oilfields.
Does anyone know the unit of the area output of Polygons in the sp package? Many thanks!
When using
sf
, you actually get the resulting units:For longlat data, as here, it uses
geosphere
behind the scenes.To get a correct area computation for a polygon in lat-lon coordinates, it would be better to convert them to a metric equal-area projection using "spTransform" beforehand. Alternatively, you could use package
geosphere
which allows to doFor example, this:
(with mypoly being a
spatialPolygons
object) will give you its area in square kilometers.HTH.