To apply algorithms like Dijkstra on a graph, we need nodes and the distance between each node as weights. In real world these weighted graphs are actual maps and the weights are distance of road. We are looking for a library or a tool which we can be used to convert these map files(.shp or .osm) into a weighted graph or an adjacency matix?

asked 13 Jan, 06:27

Kartikeya's gravatar image

Kartikeya
111
accept rate: 0%


There are a number of tools which will populate the pgrouting schema in PostGIS from OSM data too: osm2pgrouting and osm2po (latter is closed source proprietary software). You can readily interrogate the pgrouting tables with SQL queries and use different algorithms & weights for routing, so although not the most efficient routing method it's quite a good set-up for experimentation.

Anita Graser has written a number of tutorials about pgrouting itself.

permanent link

answered 13 Jan, 13:13

SK53's gravatar image

SK53 ♦
24.4k46244385
accept rate: 20%

https://github.com/Tristramg/osm4routing2 is the easiest I've found to create a routing graph from OSM data.

permanent link

answered 13 Jan, 12:39

Richard's gravatar image

Richard ♦
29.6k42264394
accept rate: 19%

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:

×55
×5
×1
×1
×1

question asked: 13 Jan, 06:27

question was seen: 67 times

last updated: 13 Jan, 13:13

powered by OSQA