[postgis-users] Projection for Calculating Area

mchapman at texelinc.com mchapman at texelinc.com
Thu Feb 28 21:29:10 PST 2008

```Also, I think utm is 60 zones each 6 degrees of longitude at the equator starting at the dateline and progressing easterly around the globe. Further, each zone is divided into a northern and southern hemishere.  Then each zone is considered a coordinate system in itself where the width of the zone is something like 500000 and the height of the coordinate system is 10000000, as compared to an angular projection where the bounds are -180, -90, 180, 90.

You could create a table of utm zone geometries and do an intersect each time you wanted to figure out what zone you needed.

Just some thoughts.  Hope they help.
Please correct me if I have a flaw in my suggestions.

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
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
```