G
G
grepfreecd grepfreecd2016-06-27 12:47:37
PostgreSQL
grepfreecd grepfreecd, 2016-06-27 12:47:37

How to get coordinates stored in OSM(PostgreSQL with PostGIS)?

Hello, I am raising the tracking and monitoring service for a taxi. I do it for the first time. It is very difficult to search for information, due to the fact that so far I am poorly versed in geolocation issues.
The essence of the question is as follows - there are coordinates that are stored in a locally raised database where the city was previously imported (osm2pgsql). The planet_osm_nodes table looks like:
ea8b454d077449acb47937596127d6bf.png
But, I could not determine the coordinate format.
dd485170fc344d04b6ebb50c3d021fc7.png
What is the format and how to convert the data back, well, or give a link to understand how it works. Thank you in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
tsarevfs, 2016-06-27
@tsarevfs

planet_osm_nodes is a by-product of osm2psql. You need the planet_osm_point label for point features. The geometry is stored in the way field in postgis format.

F
freeExec, 2016-06-27
@freeExec

Usually there should be a separate column with geometry of type GEOM. And there they are stored in binary format.
And in theory, you can see them like this SELECT GeomCol.ToString() FROM db

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question