Calculate the area of the region on the sphere of the Earth
ST_AREA_SQUARE_METERS( <geo>)
| Parameters | Instructions |
|---|---|
<geo> | The spherical position of the earth |
ST_Area_Square_Meters( ): the units returned are square meters
SELECT ST_Area_Square_Meters(ST_Circle(0, 0, 1));
+-------------------------------------------------+ | st_area_square_meters(st_circle(0.0, 0.0, 1.0)) | +-------------------------------------------------+ | 3.1415926535897869 | +-------------------------------------------------+
SELECT ST_Area_Square_Meters(ST_Point(0, 1));
+-------------------------------------------+ | st_area_square_meters(st_point(0.0, 1.0)) | +-------------------------------------------+ | 0 | +-------------------------------------------+
SELECT ST_Area_Square_Meters(ST_LineFromText("LINESTRING (1 1, 2 2)"));
+-----------------------------------------------------------------+ | st_area_square_meters(st_linefromtext('LINESTRING (1 1, 2 2)')) | +-----------------------------------------------------------------+ | 0 | +-----------------------------------------------------------------+