[postgis-users] ERROR: ptarray_area_spheroid: cannot handle ptarraythat crosses equator
marcello marcellone
nasoblu5 at yahoo.it
Sun Feb 6 06:57:06 PST 2011
On 02/04/11 07:02, Paragon Corporation wrote:
Marcello,
So you get an error about ptarray_area_spheroid. You know off hand which
version of PostGIS 2.0.0 you are running.
We are running a 2011-01-29 build and your queries return answers for us.
Whether the answer is right is a different question.
polygon | gsareageo
---------+------------------
161109 | 473946981.913427
polygon | gsareageo
---------+------------------
161109 | 772770383.761807
We are running on 32-bit Windows:
PostgreSQL 9.0.2, compiled by Visual C++ build 1500, 32-bit
POSTGIS="2.0.0SVN" GEOS="3.3.0-CAPI-1.7.0" PROJ="Rel. 4.6.1, 21 August 2008"
LIBXML="2.7.6" USE_STATS
I thought maybe it would be a difference in Proj, but geography doesn't use
proj for area. It could be a difference in 32-bit vs. 64-bit. Perhaps
someone else running PostGIS 2.0.0 or 1.5 can test (preferably on 64-bit
Linux).
Works fine on our 1.5 build as well.
Marcello:
Ok now i recompiled postgresql and postgis to last snapshot available:
"PostgreSQL 9.1alpha3 on x86_64-unknown-linux-gnu, compiled by GCC gcc (SUSE Linux) 4.5.0 20100604 [gcc-4_5-branch revision 160292], 64-bit"
"POSTGIS="2.0.0SVN" GEOS="3.2.2-CAPI-1.6.2" PROJ="Rel. 4.7.1, 23 September 2009" LIBXML="2.7.7" USE_STATS"
Postgis build is 6780 01/29/11
So i submit this:
SELECT 161109 polygon ,ST_AREA(ST_GEOGFROMTEXT('POLYGON((15.8327132977611 0.25,16 0.25,16 0,
15.8566682147637 0,15.8566112518311 0.00356000009924173,15.8485898971558 0.124770000576973,15.8327132977611 0.25))')) gsareageo
and i receive the same error:
ptarray_area_spheroid: cannot handle ptarray that crosses equator
If i change the points with 0 lat coordinates with a very small quantity as 0.0000000000000000000000000000000001 the select goes ok...
SELECT 161109 polygon ,ST_AREA(ST_GEOGFROMTEXT('POLYGON((15.8327132977611 0.25,16 0.25,16 0.0000000000000000000000000000000001,
15.8566682147637 0.0000000000000000000000000000000001,15.8566112518311 0.00356000009924173,15.8485898971558 0.124770000576973,15.8327132977611 0.25))')) gsareageo
161109;471828022.374555
but there is a reliable difference between 0 lat coordinate points :
473946981.913427 vs. 471828022.374555
I installed postgis in separe schema postgis2, now i can create another schema with postgis 1.5 last build but maybe the problem can be in the last geos library or proj ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110206/d6272422/attachment.html>
More information about the postgis-users
mailing list