vendredi 25 mars 2016

How to get the long/lat information from a NodeID and vice versa

In the SpatiaLite website they explain how to use .osm data to create a SpatiaLite database, that contains a single table, where each row is an arc of the road graph. Then, they explain the procedure of calculating the shortest path from A to B in their website:

  1. Create the VirtualNetwork from a .osm file using a tool they provide
  2. Execute the following query: select * from VirtualNetwork where NodeFrom=267209305 and NoteTo=267209702 to get the shortest path
  3. Below the result you are supposed to get from the query above. It represents every arc on the shortest path.

1

Questions:

  1. How to get the Latitude/Longitude from every NodeID that is on the shortest path. Otherwise, I will not be able to interpret what those NodeIDs mean.

  2. How to get the NodeIDs from the Latitude/Longitude of NodeFrom and NodeTo. Otherwise, I will not be able to execute the shortest path query in the first place.

Aucun commentaire:

Enregistrer un commentaire