[postgis-users] Strange ST_Area problem
Stephen Woodbridge
woodbri at swoodbridge.com
Sat Mar 24 09:06:01 PDT 2012
st_area returns in the same units as the input data. So data in 4326 is
degrees and you numbers are in degrees squared. If you want the number
in meters or feet then project then into an appropriate UTM or equal
area projection.
-Steve
On 3/24/2012 11:48 AM, Eric Ladner wrote:
> I've got some building outlines that I'm pretty sure I've worked with
> before. They are all srid 4326 (lat/lon), converted from a SHP file.
>
> ST_Area returns extremely small numbers for any of the buildings.
> It's almost like it's looking at the data like they are absolute
> numbers instead of lat/lon.
>
> Thoughts?
>
> As an example:
>
> select st_npoints(the_geom), st_srid(the_geom), st_summary(the_geom),
> st_area(st_transform(the_geom,4326)) from buildings;
>
> st_npoints | st_srid | st_summary |
> st_area
> ------------+---------+----------------------------------+----------------------
> 5 | 4326 | | 9.7305773438805e-09
> : MultiPolygon[BS] with 1 elements
> : Polygon[] with 1 rings
> : ring 0 has 5 points
> :
> 5 | 4326 | | 1.1065881433403e-08
> : MultiPolygon[BS] with 1 elements
> : Polygon[] with 1 rings
> : ring 0 has 5 points
> :
>
>
More information about the postgis-users
mailing list