Hello

I have the openstreetmap database , from geofabrik..which contain planet_osm_point.planet_osm_line,Planet_osm_polygon,planet_osm_roads.

So now my question is, ST_distance is used to find the distance between source and destination , so how can i retrieve the existing -Nodes(which is -osm_id,name,Way) between source and destination.in postgre sql

help me please

best regards Kumar

asked 07 Oct '15, 23:18

kumar45's gravatar image

kumar45
11223
accept rate: 0%

edited 07 Oct '15, 23:53

aseerel4c26's gravatar image

aseerel4c26 ♦
32.2k16239552


You can retrieve the positions of the nodes from the line geometry but not the OSM ID; the OSM ID has been thrown away during the import because it is not needed for rendering.

If you import with the --slim option, then the OSM IDs of all nodes making up a way will be kept in an array in the planet_osm_ways table. The coordinates of those nodes will be in planet_osm_nodes unless you import with --flatnodes. The tags of those nodes (since you mention "name") are only recorded if they appear in the osm2pgsql style file and in that case, the node will (in addition to being in planet_osm_nodes) also appear in planet_osm_point where the tags are stored.

permanent link

answered 07 Oct '15, 23:31

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
73.3k866641137
accept rate: 24%

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:

×150
×126
×22
×3

question asked: 07 Oct '15, 23:18

question was seen: 1,465 times

last updated: 07 Oct '15, 23:53

powered by OSQA