NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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.

permanent link

answered 19 Mar '12, 19:12

Gnonthgol's gravatar image

Gnonthgol ♦
13.8k16103198
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

Question tags:

×263
×144

question asked: 19 Mar '12, 18:34

question was seen: 4,414 times

last updated: 19 Mar '12, 19:12

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum