[postgis-users] Projection for Calculating Area

mchapman at texelinc.com mchapman at texelinc.com
Thu Feb 28 21:15:04 PST 2008


I wonder if you could loop through each intersecting geometry, calculate the weighted center point, find the optimal utm zone for that geometry, set the projection so it is tangent to to center point, transform the goemetry and finally calculate area. Loop until eof and sum the area of all geometries?  You could problably do this with cursors.  The question is whether my algorithm is correct because I am only a programmer, not a gis guru.

Martin
 
Sent via BlackBerry by AT&T

-----Original Message-----
From: Dylan Beaudette <dylan.beaudette at gmail.com>

Date: Thu, 21 Feb 2008 09:56:15 
To:postgis-users at postgis.refractions.net
Subject: Re: [postgis-users] Projection for Calculating Area


On Thursday 21 February 2008 09:33:17 am Travis Kirstine wrote:
> All,
> We have been developing a web mapping application using google maps as
> the front end interface with a postgis backend.  Using this
> application the user can draw a bounding box in google maps and the
> coordinates are then passed to postgis.  With postgis we then perform
> a query on the polygons stored in the postgis database to return the
> area using  ST_Intersection, ST_Transform (usually to UTM) and finally
> ST_Area.  The application works great but the problem is  that since
> we are trying to work on a global scale it is difficult to determine
> what projection (EPSG) to transform the data to calculate an accurate
> area since our data is in EPSG:4326 and returns decimal degrees.  We
> can easily transform the query results to a UTM or a Albers projection
> however the results can be inaccurate since the user may select
> multiple zones or hemispheres when view the map at a global scale.  Is
> there a accurate global projection for calculating area?

No. Except maybe a global sinusoidal projection... but-

This touches on one of the fundamental issues with geographic data: when you 
want to compute cartesian statistics (length, area, etc. in a planar sense) 
you are going to have to make a compromise in 

shape
direction
area

AND the larger the region you want to work with the more drastic the 
distortion on 2/3 of the above parameters you will encounter. 

This is why 'local' projections like UTM are highly valued-- by working with a 
very small chunk of the earth you can minimize distortion considerably. 

As for a solution: check the mailing list archives for a custom function that 
can automatically determine UTM zone based on a lon/lat coordinate pair. 

If you have really big shapes that are spanning multiple UTM zones, then 
setting up some kind of pre-processing logic which determines 1 of several 
possible albers equal area conic projections might work. For example, if the 
coordinates are near the continental US, use one set of standard parallels / 
central lon/lat to setup the projection. Adjust these parameters accordingly 
for different (continents?) regions of the world. You should be able to 
either find some existing EPSG codes which are close enough, or just make up 
your own, and define your projections in PROJ format. Then add them to the 
spatial_ref_sys table.

For some thoughts on equal area projections / projection parameters see:

Snyder, J. P. Map Projections- A working Manual U.S. Geologic Survey, U.S. 
Geologic Survey, 1987

Cheers,

Dylan

-- 
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


More information about the postgis-users mailing list