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


I extracted and have written a postgresql database using the following tool.

I want to extract lat, lon of the way points of a given way OSM ID using psql command. How can I do this ?


asked 21 Jan '19, 04:03

mkandula's gravatar image

accept rate: 0%

Imposm is optimized for rendering OSM data, and is not really suitable for a more general purpose spatial database, most people will use osm2pgsql for that.

In particular imposm will create separate tables for each mapping that you have defined, so you will need to see what table the objects you are interested were mapped to query that for the geometry column by osm_id and then step through the linestring to retrieve the individual coordinate pairs (both imposm and osm2pgsql schemas don't have a direct way to access individual, untagged way nodes once the data has been imported with SQL).

permanent link

answered 21 Jan '19, 07:01

SimonPoole's gravatar image

SimonPoole ♦
accept rate: 18%


for those who ask for : lon, lat from planet_osm_nodes, here is your response : "select lon::numeric/10000000 as lon, lat::numeric/10000000 as lat from planet_osm_nodes".

permanent link

answered 15 Jul '20, 05:03

Abdelkader's gravatar image

accept rate: 0%

The post was not about a database in the osm2psgl schema, so your answer is nonsense.

(15 Jul '20, 17:10) SimonPoole ♦

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 21 Jan '19, 04:03

question was seen: 2,383 times

last updated: 15 Jul '20, 17:10

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