跳转至
Apache Sedona 1.9.0 已正式发布,新增 Spark 4.1 支持、proj4sedona 坐标系转换、Bing Tile 函数等众多特性!

ST_Area

Introduction: Return the spherical area of a geography in square meters, calculated on the sphere. The Earth is modeled as a sphere of radius R = 6 371 008 m (the mean Earth radius), not the WGS84 ellipsoid; the result is the area of the polygon's interior on that sphere. Multi-polygons sum the children's areas and geography collections recurse. Returns 0.0 for non-areal geographies (points, linestrings) and for NULL.

ST_Area on a Geography (sphere-native)

If the input ring is wound in the orientation that would describe the rest of the planet, Sedona returns the smaller of the two regions, so the answer is always bounded by half the surface of the Earth. If you specifically want the WGS84 ellipsoidal value, convert via ST_GeogToGeometry first and use the geometry overload.

Format:

ST_Area (geog: Geography)

Return type: Double

Since: v1.9.1

SQL Example:

SELECT ST_Area(ST_GeogFromWKT('POLYGON ((0 0, 2 0, 2 2, 0 2, 0 0))', 4326))

Output:

4.945234327988249E10