ST_AREA_SQUARE_METERS
更新时间:2025-10-17
描述
计算地球球面上区域的面积
语法
SQL
1ST_AREA_SQUARE_METERS( <geo>)
参数
| 参数 | 说明 |
|---|---|
<geo> |
地球球面位置 |
返回值
ST_Area_Square_Meters(
举例
SQL
1SELECT ST_Area_Square_Meters(ST_Circle(0, 0, 1));
Text
1+-------------------------------------------------+
2| st_area_square_meters(st_circle(0.0, 0.0, 1.0)) |
3+-------------------------------------------------+
4| 3.1415926535897869 |
5+-------------------------------------------------+
SQL
1SELECT ST_Area_Square_Meters(ST_Point(0, 1));
Text
1+-------------------------------------------+
2| st_area_square_meters(st_point(0.0, 1.0)) |
3+-------------------------------------------+
4| 0 |
5+-------------------------------------------+
SQL
1SELECT ST_Area_Square_Meters(ST_LineFromText("LINESTRING (1 1, 2 2)"));
Text
1+-----------------------------------------------------------------+
2| st_area_square_meters(st_linefromtext('LINESTRING (1 1, 2 2)')) |
3+-----------------------------------------------------------------+
4| 0 |
5+-----------------------------------------------------------------+
