This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

MySQL - conversion lat lon from int to degrees

0

Hello,

In the MySQL database I have the following data:

node id     lat             lon
2094180296  349660688   336654980
667088997   349663935   336658237
667089013   349667613   336661316
701333196   349670314   336663369
2094180312  349672919   336665248

How to convert latitude and longitude from integers to degrees (float / double)?

How does this algorithm?

asked 08 Jan '15, 17:13

Rysiu's gravatar image

Rysiu
26334
accept rate: 0%

A better forum for a question such as this that isn't OpenStreetMap related might be http://stackoverflow.com/ or http://gis.stackexchange.com/ (although actually I'm sure a quick web search will find the answer without even having to ask again).

(08 Jan '15, 17:29) SomeoneElse ♦
1

If the bit that you're missing is "what do these numbers mean in OpenStreetMap" than have a read of these two wiki sections:

http://wiki.osm.org/wiki/Beginners%27_guide

http://wiki.osm.org/wiki/Elements

(08 Jan '15, 17:41) SomeoneElse ♦

One Answer:

3

Looking at your first example which is at 34.9660688, 33.665498 it suggests you divide by 10,000,000

answered 08 Jan '15, 17:38

EdLoach's gravatar image

EdLoach ♦
19.5k16156280
accept rate: 22%

Source code available on GitHub .