[postgis-users] Setting Units in PostGIS

Markus Schaber schabi at logix-tt.com
Mon May 2 13:13:12 PDT 2005


Hi, Jeff,

Jeff Grice wrote:

> I’m a newby to PostGIS and have what I believe is a simple question. 
> How do I determine what units PostGIS is returning?  When I calculate
> the area of a polygon or the distance of a line segment, how can I set
> it to return Square Miles or miles or feet?
> Any help would be greatly appreciated.

That completely depends on the units your data is measured in. If your
data coordinates are in a carthesian system, then distances are the same
units as the coordinate units, and areas are the squared unit.

If your data coordinates are in lat/long or something else, then
distance and area calculations are rather unusable, you will need
something like distance_sphere() then.

Markus



More information about the postgis-users mailing list