[postgis-devel] [PostGIS] #304: Geography Best SRID or ?

PostGIS trac at osgeo.org
Sat Nov 14 08:25:10 PST 2009


#304: Geography Best SRID or ?
---------------------+------------------------------------------------------
 Reporter:  robe     |       Owner:  pramsey      
     Type:  defect   |      Status:  new          
 Priority:  medium   |   Milestone:  postgis 1.5.0
Component:  postgis  |     Version:  trunk        
 Keywords:           |  
---------------------+------------------------------------------------------
 I'm a bit puzzled maybe its because I haven't thought about how the
 curvature of the earth affects area much, but I would expect that if I
 buffer a point, any point on the globe by say 10 meters, that each polygon
 would be the same area.  It more or less is if I convert to UTM zone,
 buffer, convert back to geography --> take the area.  But not when I use
 ST_Buffer geography.  What gives?

 (If I buffer by 10 meters -- I expect the answer to be pi()*10^2 (314 +-
 2).  Really 312 because of the inaccuracy of the default buffer (using 8
 segs per quarter circle).

 and it is for the most part except when I go to Helsinki, Bergen.  My plot
 of land is around 288 sq meters.  I guess I shouldn't be visiting those
 places.


 {{{
 SELECT city, ST_Area(ST_Buffer(geography(the_geom), 10),true) As
 geog_area,
 ST_Area(geography(ST_Transform(ST_Buffer(ST_Transform(the_geom,utm_srid),
 10), 4326))) As utm_geog_area
 FROM (VALUES ('Helsinki', ST_GeomFromText('POINT(24.9767 60.1964)',4326),
 32635 ),
         ('Bergen', ST_GeomFromText('POINT(5.4907 60.35)',4326), 32631 )
         ) f(city, the_geom,utm_srid);
 }}}

 the above query yields

 {{{
   city   |    geog_area     |  utm_geog_area
 ---------+------------------+------------------
 Helsinki | 287.711725821719 | 312.298024061475
 Bergen   | 288.120740812147 | 312.249761770185
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/304>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-devel mailing list