ST_Area bug?

Alexander Trufanov <[email protected]> Tue, 25 Mar 2025 19:58:28 +0300
Newsgroups gmane.comp.gis.postgis
Message-ID <CAFafbSOuf4+WJuwvu3TB9kbA5Cd-OWAeUgsu6gJSSCdGDs87vA@mail.gmail.com>
Hello,

I've a following area calculation:

select ST_Area(
ST_GeometryFromText('POLYGON ((-0.780387531 -79.736894381,
170.375361283 -79.736894381,
170.375361283 -79.692508368,
-0.780387531 -79.692508368,
-0.780387531 -79.736894381))', 4326)::geography) /1000000

which returns ~900 km^2

while ST_Perimeter() for the same geography is ~4600km
and If I open ST_AsGeoJson() of this geometry in google earth pro and some
websites I'm getting ~ 16700 km^2.
It seems it's a correct result and ST_Area() result is wrong.

Is this a known problem?

My versions:
PostgreSQL 15.10 (Debian 15.10-astra.se1) on x86_64-pc-linux-gnu, compiled
by gcc (Astra 12.2.0-14.astra3+b1) 12.2.0, 64-bit
POSTGIS="3.3.2 68f4434" [EXTENSION] PGSQL="150" GEOS="3.11.1-CAPI-1.17.1"
PROJ="9.1.1" GDAL="GDAL 3.6.2, released 2023/01/02" LIBXML="2.9.14"
LIBJSON="0.16" LIBPROTOBUF="1.4.1" WAGYU="0.5.0 (Internal)" RASTER

-- 
With best regards,
Truf