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

Generating node information from point A to point B from OpenStreetMap?

0

I have the OpenStreetMap database of Saxony and i want to Return a street which is between 2 given Node ID I should return in POSTGRE SQL

  • name
  • Longitude and Latitude of all points between the nodes
  • Distance (double value in km)

answer should be something like

{…,name: “Annaberger Straße”, points:[ {Lng, Lat}, {Lng, Lat}, …], distance: ???,…}

i want find the distance between two nodes and also i need to return the street name, and geometries between the nodes from openstreetmap database?

asked 29 Sep '15, 16:56

vinod12b's gravatar image

vinod12b
11112
accept rate: 0%

edited 29 Sep '15, 20:37

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554

1

do you mean routing or a straight line between the two nodes?

(29 Sep '15, 20:36) aseerel4c26 ♦
2

Have you already imported the data into a PostgreSQL database, and if yes, how?

(29 Sep '15, 22:24) Frederik Ramm ♦
2

aseerel4c26- thank you and yeah straight line between two nodes ..

Frederik Ramm- i imported .pbf file from gofabrik to postgre sql using osm2pgsql through cmd

(30 Sep '15, 14:32) vinod12b

Source code available on GitHub .