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 |
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. answered 06 Mar '15, 11:34 rorym |
There have already been various similar questions, for example How can I convert an OSM XML file into a graph representation?.