<div dir="ltr">Hi,<div><br></div><div>The following query:</div><div><br></div><div>>  SELECT ST_Area(ST_GeographyFromText('POLYGON((40 0.009,40.1 0.009,40.1 0,40 0,40 0.009))'));</div><div><br></div><div>returns the error: </div><div><br></div><div>> ptarray_area_spheroid: cannot handle ptarray that crosses equator<br><div><br></div><div>I am using Postgis-2.3 provided by <a href="https://hub.docker.com/r/mdillon/postgis/">https://hub.docker.com/r/mdillon/postgis/</a><br></div><div><br></div><div>postgis_full_version =  POSTGIS="2.3.2 r15302" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.1, released 2013/08/26" LIBXML="2.9.1" LIBJSON="0.11.99" RASTER<br></div><div><div><br></div><div>I believe the geometry is valid.  I can pass the error by setting use_spheroid=false, like so:<br></div><div><br></div><div>> SELECT ST_Area(ST_GeographyFromText('POLYGON((40 0.009,40.1 0.009,40.1 0,40 0,40 0.009))'), false);</div><div><br></div><div>However, I would like to use the sphere everywhere else in my application.  Can anyone provide some insight?  I found something reporting this should not hapen on Postgis >= 2.2: <a href="https://gis.stackexchange.com/questions/169436/postgis-polygons-lying-on-the-equator/169482#169482">https://gis.stackexchange.com/questions/169436/postgis-polygons-lying-on-the-equator/169482#169482</a></div><div><br></div>Thanks!<br><div class="gmail_signature">Pete</div><div class="gmail_signature"><br></div>
</div></div></div>