Hi
I am trying to convert the coordinates stored in the Here is an example of what the coordinates in the table look like:
Here is an SQL query that I am using for the conversion:
However the coordinates are like:
When they should be more like Is the SRID that the latitude and longitude in the Thanks
asked
srose |

It depends on how the values were imported. My data was created by Nominatim which simply converts lat/lon to an integer by multiplying by 10000000.
answered
neilireson |

Hi! I'm looking for the same answer and I wrote this code, in C:
answered
a_manfrinati |

The coordinates in the planet_osm_nodes table aren't in any proper spatial reference system. They are stored as integers, not as coordinate values, and are manipulated when converted to the spatial tables. If you look closely, they are too large to be spherical mercator coordinates (hence the clipping to 90), and the fact that they are in integer columns would otherwise suggest a large amount of rounding! Instead, you should grab the coordinates from the geometry ("way") column of the planet_osm_point table, which are indeed actual coordinates. If for some reason you must use the nodes table (which is unusual) then divide the integers by 100.
answered
Andy Allan |