Skip to main content

ST_AREA_SQUARE_KM

Description

Calculate the area of the region on the sphere of the Earth

Syntax

ST_AREA_SQUARE_KM( <geo>)

Parameters

ParametersInstructions
<geo>The spherical position of the earth

Return Value

ST_Area_Square_Km( ): the units returned are square kilometers

Examples

SELECT ST_Area_Square_Km(ST_Polygon("POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))"));
+----------------------------------------------------------------------+
| st_area_square_km(st_polygon('POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))')) |
+----------------------------------------------------------------------+
| 12364.036567076409 |
+----------------------------------------------------------------------+