[OSM-dev] osm2pgsql coordinates

Jon Burgess jburgess777 at googlemail.com
Thu Oct 11 17:09:26 BST 2007


On 11/10/2007, Shane <shane at cm.nu> wrote:
> Hey all,
>
> Just grabbed an OSM dump for use within PostGres and ran it
> through osm2pgsql.  However, I'm getting some odd results
> when I look at the data.
>
> gis=> select osm_id,AsText(way) from planet_osm_point limit 10;
> osm_id|astext
> 656930|POINT(430322.946557555 5378281.22134329)
> 2227863|POINT(425274.763497368 5363058.88191314)
> 2227865|POINT(425050.699626299 5362858.37425581)
> 2227867|POINT(424880.937402839 5362709.33501086)
> 2227868|POINT(424596.6608192 5362459.33025679)
> 2227870|POINT(424222.20431607 5362175.90697444)
> 2227871|POINT(424026.304276172 5361945.34423213)
> 2227872|POINT(423899.97891802 5361638.02804494)
> 2227873|POINT(423739.556399838 5361297.28472157)
> 2227875|POINT(423531.066125531 5360989.02663743)
> (10 rows)
>
> Is osm2pgsql from svn broken or is it using some sort of
> projection I am not familiar with.  Any help greatly
> appreciated.
>

Those are mercator projected (in metres). If you want geometries in
lat/long degrees then you'll need to use the --latlong option during
the import.

-- 
    Jon




More information about the dev mailing list