geo-registry

Measure Area

The area of each polygon, as a number or a new attribute.

Pitfall. In a geographic CRS, planar engines return square degrees; geodesic ones (Turf, terra, PostGIS geography) return square metres.
Pitfall. Projected areas carry the projection's scale error; use an equal-area projection for large areas.
About this operation
Also called Calculate Geometry (area), Add Geometry Attributes, polygon area, shape area
Group vector/measure
Checks crs.measure
Pitfalls 2 listed above
Columbus tool Not stated
Notes Not stated
Status active
Broader Not stated
Narrower Not stated
Related

Parameters

Name Type Required Default Values Note
unit enum no m2 m2, ha, km2, ft2, acre Not stated

Inputs and outputs

Direction Name Type Geometry Note
Input layer vector polygon Not stated
Output output any Not stated The areas, or the layer with an area attribute.

In each engine

Engine Tool Parameters Differences
apache-sedona sedona.sql.ST_Area
  • unit always crs-units. Square CRS units (square metres in a metric CRS); convert afterwards for other units.
  • layer → geometry
  • A Spark SQL function: arguments are columns or column names, run over a Spark DataFrame.
geopandas geopandas.GeoSeries.area
  • unit always crs-units. Square CRS units (square metres in a metric CRS); convert afterwards for other units.
  • A property of the GeoSeries; warns when the CRS is geographic.
grass v.to.db
  • unit → units : m2 = meters; km2 = kilometers; ha = hectares; acre = acres; ft2 = feet
  • layer → map
  • Writes into the map's own attribute table (the column must exist; this mapping names it area); option also gives length, perimeter, coordinates and more.
Preset: {"option":"area","columns":"area"}
postgis st_area
  • unit always crs-units. Square CRS units (square metres in a metric CRS); convert afterwards for other units.
  • layer → #1
  • On geography, square metres on the spheroid (use_spheroid).
qgis native:exportaddgeometrycolumns
  • unit always crs-units. Square CRS units (square metres in a metric CRS); convert afterwards for other units.
  • layer → INPUT
  • output → OUTPUT
  • Adds area and perimeter fields to polygons (length to lines, coordinates to points); METHOD 2 measures on the ellipsoid.
sf sf::st_area
  • unit always crs-units. Square CRS units (square metres in a metric CRS); convert afterwards for other units.
  • layer → x
  • Returns a units object; on longitude/latitude data, square metres on the sphere or ellipsoid.
shapely shapely.area
  • unit always crs-units. Square CRS units (square metres in a metric CRS); convert afterwards for other units.
  • layer → geometry
None noted
terra terra::expanse
  • unit → unit : m2 = m; km2 = km; ha = ha. not supported: ft2, acre
  • layer → x
  • Square metres even for longitude/latitude data (geodesic); also measures raster cell areas.
turf-js turf.area
  • unit always m2. Always square metres (geodesic).
  • layer → geojson
  • One total for all features of a FeatureCollection.
  • Turf works on GeoJSON in longitude/latitude (WGS 84); data in another CRS must be reprojected first.
whiteboxtools PolygonArea
  • unit always crs-units. Square CRS units (square metres in a metric CRS); convert afterwards for other units.
  • layer → input
  • Adds an AREA field to the input file itself; there is no separate output.