ST_Area on sphere returns NaN
|Reported by:||Mike Taves||Owned by:||pramsey|
While working on #2918, of the 500000 tests, 34 quadrilateral polygon tests return NaN from `ST_Area(geog, use_spheroid=false). For example:
SELECT ST_Area('POLYGON((0 78.703946026663,0 0,179.999997913235 -33.0888306884702,179.999997913235 0,0 78.703946026663))'::geography, false);
Which is really a non-sense polygon, but has an area result of NaN. The area under the WGS84 geodesic should be 127417658341994.233087 m², which I think is pretty close to ¼ the surface area of a sphere with
WGS84_RADIUS (6371008.771415059833 m).
The problem is likely somewhere in
lwgeom_area_sphere or related functions in