[OSM-dev] projection for calculating distances in PostGIS

Emilie Laffray emilie.laffray at gmail.com
Wed May 19 13:13:52 BST 2010

On 19 May 2010 13:06, Marcus Wolschon <Marcus at wolschon.biz> wrote:

> Hello,
> what projections do you use to calculate distances (in meters) in postgis?
> I have some code here that tried to use 27700 but that is not defined
> on all inhabited continents of this planet.
> An error of at most 25% would be acceptable as tis is just about search
> -areas and not street-length.

It all depends what kind of distance you are trying to get. One easy way is
to use the FindUTM of the area you are looking for

The next possible trick is to switch your column type to geography if you
have postgis 1.5. It would mean that all postgis function relating to length
and areas would start reporting data in meters.

Emilie Laffray
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20100519/c706ae6a/attachment.html>

More information about the dev mailing list