Hello!

I have all the XML data into PostGres DB using OSM2PGSQL. I get the coordinates of a node and what I get is the next:

471196104, -858385498 (it is in Washington)

I dont know the format of the this coordinates and how to convert it. I would like to have coordinates in a "normal" format, I mean something like this: 41.347187,2.0309942

Thank you for the help in advance

asked 19 Mar '12, 18:34

aruizga7's gravatar image

aruizga7
11335
accept rate: 0%


The coordinates you got is in spherical mercator projection. osm2pgsql transforms all the coordinates to mercator before inserting them to the database. To get the coordinates in another projection use the function ST_Transform in postgis.

The standard latlon coordinates you want is EPSG:4326 and spherical mercator is EPSG:3857.

link

answered 19 Mar '12, 19:12

Gnonthgol's gravatar image

Gnonthgol
12.8k1198188
accept rate: 16%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×64
×51

Asked: 19 Mar '12, 18:34

Seen: 1,175 times

Last updated: 19 Mar '12, 19:12

powered by OSQA