[postgis-users] Projection for Calculating Area
Dylan Beaudette
dylan.beaudette at gmail.com
Thu Feb 21 09:56:15 PST 2008
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
More information about the postgis-users
mailing list