[postgis-users] ERROR: ptarray_area_spheroid: cannot handle ptarraythat crosses equator

Paragon Corporation lr at pcorp.us
Thu Feb 3 22:02:50 PST 2011


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.
 
FWIW:  Your code is more verbose than it needs to be.  You can go straight
to geography with ST_GeogFromText:
http://www.postgis.org/documentation/manual-svn/ST_GeogFromText.html
 
 
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;
 
 
Hope that helps,
Regina and Leo
http://www.postgis.us
 
 

  _____  

From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of marcello
marcellone
Sent: Thursday, February 03, 2011 3:52 PM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] ERROR: ptarray_area_spheroid: cannot handle
ptarraythat crosses equator


i try to calculate the area for a geographic grid 0.25 degree but for some
grids they touche equator i have the error in object.

"PostgreSQL 9.0.0 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"


SELECT 161109 polygon
,ST_AREA(GEOGRAPHY(ST_GEOMETRYFROMTEXT('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

SELECT 161109 polygon ,ST_AREA(GEOGRAPHY(ST_GEOMETRYFROMTEXT('POLYGON((15.75
0,15.75 0.25,16 0.25,16 0,15.75 0))'))) gsareageo;

Any idea about it ?

	

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110204/bf701d6d/attachment.html>


More information about the postgis-users mailing list