Compute the planar area of a polygon or multipolygon geometry in the units of its coordinate system.
ST_AREA(geometry)
## Overview Returns the planar area of a geometry in the units of its coordinate reference system. For a POLYGON this is the surface enclosed by the exterior ring minus the surface of any interior rings (holes). For a MULTIPOLYGON it is the sum of the areas of its constituent polygons. POINT, LINESTRING, and empty geometries return 0. The computation is purely two-dimensional and cartesian. It does not project the input, apply Earth curvature, or attempt to convert between coordinate systems. That makes it fast and exact for data that already lives in a projected CRS (for example a UTM zone or a national grid) but unsuitable as a direct square-meter measurement for raw longitude/latitude data. ## When to use ST_AREA vs. alternatives - **ST_AREA** (this function): planar area in CRS units. Use after projecting data to a metric CRS when you need square meters, or on already-projected inputs. - **ST_LENGTH**: perimeter or line length in CRS units. Pair with ST_AREA to compute shape compactness ratios. - **Spherical/ellipsoidal area**: not covered by this function. For area on raw WGS 84 coordinates you must project first or compute using an external geodesic library. ## Behavior - Returns a DOUBLE in the squared units of the input CRS. If the geometry is in WGS 84 decimal degrees the result is in square degrees, which is rarely useful as a physical area. - Holes in a POLYGON are subtracted from the exterior area. - Ring winding order is normalized internally, so clockwise and counter-clockwise exteriors both produce the same positive area. - MULTIPOLYGON area is the sum of its parts; overlapping parts are double counted because the input is assumed to be well-formed. - POINT and LINESTRING inputs return 0 rather than an error. - Returns NULL if the input geometry is NULL. - Invalid geometries (self-intersecting rings, unclosed rings) produce an implementation-defined value; validate with ST_GEOM_FROM_TEXT round-trips before trusting area computations on untrusted data. ## Input format - Accepts any GEOMETRY constructed with ST_GEOM_FROM_TEXT, ST_MAKE_POINT, or returned by other ST_ functions. - The CRS is not tracked on the geometry; the caller is responsible for knowing the units of the input. - To get square meters from geographic coordinates, reproject the geometry into a local metric CRS (for example UTM or an equal-area projection) before calling ST_AREA. ## Compatibility - Matches the OGC Simple Features definition of planar area for a polygonal geometry. - Result units always mirror the coordinate units of the input; no SRID-aware conversion is performed.
| Name | Type | Description |
|---|---|---|
geometry | Specifies the input geometry whose area to compute. Accepts POLYGON, MULTIPOLYGON, and GEOMETRYCOLLECTION values. POINT and LINESTRING geometries return 0 because they have no two-dimensional extent. |
-- Simple sanity check: a 1x1 square has area 1 in the coordinate units.
SELECT ST_AREA(ST_GEOM_FROM_TEXT('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))')) AS area;
-- A triangle with base 4 and height 3 has area 6 square units.
SELECT ST_AREA(ST_GEOM_FROM_TEXT('POLYGON((0 0, 4 0, 2 3, 0 0))')) AS area;
-- Only two-dimensional geometries return a non-zero area.
SELECT
ST_AREA(ST_MAKE_POINT(-74.0060, 40.7128)) AS point_area,
ST_AREA(ST_GEOM_FROM_TEXT('LINESTRING(0 0, 5 5)')) AS line_area;
-- Return parcels whose planar area exceeds 10,000 square units in the source CRS.
SELECT parcel_id, owner
FROM gis.catalog.parcels
WHERE ST_AREA(geom) > 10000.0;
-- Sort administrative regions from largest to smallest by planar area.
SELECT region_name, ST_AREA(boundary) AS area
FROM gis.catalog.regions
ORDER BY area DESC
LIMIT 20;
-- Sum the area of all service zones that contain a given point.
SELECT SUM(ST_AREA(zone_geom)) AS covered_area
FROM gis.catalog.service_zones
WHERE ST_CONTAINS(zone_geom, ST_MAKE_POINT(-0.1278, 51.5074));