NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I'm studding AI course and I need to create a routing or navigation program.

I live in Barcelona and first at all I need Barcelona's street network data. I have found it here https://mapzen.com/metro-extracts/ (but I don't know it this data is good enough to use it in a navigation system).

Here, http://wiki.openstreetmap.org/wiki/Routing, I have found more information about routing but I'm terrible lost.

Where do you recommend me to start with this?

I have to implement my own version of A* algorithm. I only need data, but reading the previous page I see that Openstreet data has information about speed, highway type, etc.

I'm sorry, but I'm lost and I don't know where to start with.

Any advice?

asked 06 Mar '15, 08:16

VansFannel's gravatar image

VansFannel
11112
accept rate: 0%

edited 06 Mar '15, 08:52

There have already been various similar questions, for example How can I convert an OSM XML file into a graph representation?.

(06 Mar '15, 10:26) scai ♦

Yes, it looks like you're onto the right idea. You can use an extract like that to route. It should have good information for you to route on (roads, footpaths, etc.). Read up about the OpenStreetMap data model and learn how ways are made up of nodes. When 2 roads join (e.g. at a junction), they should share a node. You will need the PBF or XML file from Mapzen. The XML format might be easier for you to work with (read up about the XML Schema). You can parse XML in any language. I wrote a programme to route across Dublin without passing a pub, it parses the XML directly and does simple routing on that. It's open source.

re: speed limits. They are optional for your routing algorithm. You can use them or not use them. It depends on what you want your router to be aware of.

permanent link

answered 06 Mar '15, 11:34

rorym's gravatar image

rorym
5.4k1449100
accept rate: 11%

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:

×305
×50

question asked: 06 Mar '15, 08:16

question was seen: 6,783 times

last updated: 06 Mar '15, 11:34

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum