Hello everyone , I'm new to openlayer and i have a problem and i need some help! I want to take the road network from an area and build a graph so i can take it and use it for finding sortest path . My problem is i don't know how to take the road network and how to construct the path . I done a google search and i found that i have to use OSM files but i don't know how . If you could show me some examples and point me to the right direction it would be great

Thanks in advance, cheers john

asked 21 Nov '11, 16:03

john_'s gravatar image

john_
11112
accept rate: 0%


You can extract road networks from OpenStreetMap data and use them for routing, but OpenLayers is only used to display the result of that process.

Instead you'll need to get to know how OSM data is structured, the tools you can use to import it into other systems (such as pgRouting), how to perform routing queries, and only then how to display the results. If you have specific questions about OpenStreetMap you can ask them here, but otherwise a good place to start would be osm2pgrouting.

permanent link

answered 21 Nov '11, 16:20

Jonathan%20Bennett's gravatar image

Jonathan Ben...
8.2k1785108
accept rate: 18%

So i have to create a database and load my data there but is there anothere way to do that! I want to have my road network graph stored to a file so then i can run an algorithm to find the sortest path

(22 Nov '11, 15:29) john_

pgRouting provides most common routing algorithms anyway, so you wouldn't need to reimplement them. Also, scanning a file to find start and end points of your route would be far more resource-intensive than using a database.

(22 Nov '11, 16:16) Jonathan Ben...

To get an overview about all routing possibilities based on OSM, have a look at the wiki at http://wiki.openstreetmap.org/wiki/Routing and all its sub pages.

(22 Nov '11, 16:49) stephan75
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:

×195
×117
×17

question asked: 21 Nov '11, 16:03

question was seen: 8,702 times

last updated: 22 Nov '11, 16:49

powered by OSQA