Calculate the area of the region on the sphere of the Earth
ST_AREA_SQUARE_KM( <geo>)
| Parameters | Instructions |
|---|---|
<geo> | The spherical position of the earth |
ST_Area_Square_Km( ): the units returned are square kilometers
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 | +----------------------------------------------------------------------+