[postgis-users] RE: area in meters

ebcorder at rockwellcollins.com ebcorder at rockwellcollins.com
Wed Mar 15 14:22:37 PST 2006


Thanks Paul for a really quick response.   This stuff is tough on newbies.
The Polygon is an unusual shape.... looks kinda like a peanut.  The polygon
covers an area around Birmingham Ala so I used the UTM Zone 16 2028.
Thanks for simplifying the query.




>Your query looks correct on its face, so we would have to see the
>polygon itself to take a more informed guess...
>P

>PS, a less convoluted SQL statement that returns the same answer:

  > select area2d(transform(shapes,2028)) from poly where cell_id = 1;

>On Mar 15, 2006, at 12:53 PM, <ebcorder at rockwellcollins.com>
<ebcorder at rockwellcollins.com> wrote:

> If anyone can help on this I don't think this value is correct.  I
> stored a
> polygon away as Lat/Lon with an SRID=4326.  To obtain the area of the
> polygon in meters
>
> I wrote this query to transform to UTM.
> geom_test=# select area2d(transform((select shapes from poly  where
> poly.cell_id=1), 2028));
>
>       area2d
> ------------------
>  30157076.0118284
> (1 row)
>
> I don't think this is right.   On  a Delorme map tool I get 443 square
> Kilometers.
>
>
>
>
> CREATE TABLE "poly" (
>             "cell_id"  int4 NOT NULL
>          );
>
>
> select addgeometrycolumn('poly','shapes',4326,'POLYGON',4);
>
> insert into poly (cell_id,shapes)   values (1,
> GeomFromtext('POLYGON((33.745400 -87.095300 1111.000    0,33.727700
> -87.099700 1111.000    0,33.718900 -87.102000 1111.000    0,33.708200
> -87.093700 1111.000    0,33.699400 -87.095900 1111.000    0,33.688700
> -87.087600 1111.000    0,33.678000 -87.079300 1111.000    0,33.665400
> -87.060500 1111.000    0,33.663500 -87.049900 1111.000    0,33.652900
> -87.041600 1111.000    0,33.649100 -87.020500 1111.000    0,33.647200
> -87.010000 1111.000    0,33.643400 -86.988900 1111.000    0,33.641600
> -86.978400 1111.000    0,33.637800 -86.957300 1111.000    0,33.635900
> -86.946700 1111.000    0,33.640900 -86.923400 1111.000    0,33.639000
> -86.912900 1111.000    0,33.635300 -86.891800 1111.000    0,33.633400
> -86.881300 1111.000    0,33.620800 -86.862400 1111.000    0,33.617000
> -86.841400 1111.000    0,33.615100 -86.830800 1111.000    0,33.611300
> -86.809800 1111.000    0,33.607500 -86.788700 1111.000    0,33.605600
> -86.778200 1111.000    0,33.601800 -86.757100 1111.000    0,33.606800
> -86.733800 1111.000    0,33.604900 -86.723200 1111.000    0,33.611800
> -86.710400 1111.000    0,33.618700 -86.697600 1111.000    0,33.625600
> -86.684800 1111.000    0,33.632500 -86.672000 1111.000    0,33.641300
> -86.669700 1111.000    0,33.658900 -86.665100 1111.000    0,33.667700
> -86.662800 1111.000    0,33.678400 -86.671100 1111.000    0,33.689200
> -86.679400 1111.000    0,33.699900 -86.687600 1111.000    0,33.701800
> -86.698200 1111.000    0,33.705600 -86.719200 1111.000    0,33.718200
> -86.738000 1111.000    0,33.720100 -86.748600 1111.000    0,33.715100
> -86.772000 1111.000    0,33.718900 -86.793000 1111.000    0,33.720800
> -86.803600 1111.000    0,33.724600 -86.824700 1111.000    0,33.719600
> -86.848100 1111.000    0,33.721500 -86.858600 1111.000    0,33.725300
> -86.879700 1111.000    0,33.727200 -86.890200 1111.000    0,33.731000
> -86.911300 1111.000    0,33.732900 -86.921900 1111.000    0,33.745500
> -86.940700 1111.000    0,33.747400 -86.951300 1111.000    0,33.751100
> -86.972400 1111.000    0,33.754900 -86.993500 1111.000    0,33.765600
> -87.001800 1111.000    0,33.769400 -87.022900 1111.000    0,33.762400
> -87.035700 1111.000    0,33.764300 -87.046300 1111.000    0,33.757400
> -87.059100 1111.000    0,33.759200 -87.069700 1111.000    0,33.752300
> -87.082500 1111.000    0,33.745400 -87.095300 1111.000    0))',4326));
>
>
>






Elwood Cordery
Rockwell Collins
Contract Software Engineer
319-295-8248




More information about the postgis-users mailing list