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

Using OSM to access specific walking paths

 0 Hi, I'm pretty new to Python and extremely new to OSM, but I'm hoping to use OSM's data to calculate shortest walking paths on my college campus. Do you guys have any suggestions on how to start doing this? I'm having trouble understanding how to access and identify specific walking paths. Thanks. asked 09 Feb '20, 05:58 Jklod 21●1●1●4 accept rate: 0% 3 Are you looking for an API that will do all the work for you; or some ready-made library code that you can host locally; or do you want to write the whole thing from scratch? (09 Feb '20, 11:28) Richard ♦ I'd like to find a way to access the data, but do the work of computing shortest paths and displaying them manually. Though if there are resources that would help me do this manually that'd be useful. (09 Feb '20, 20:40) Jklod 1 Especially for walking, you need to be aware of data quality and usage as it's more complicated than driving. (10 Feb '20, 13:44) Kovoschiz

 3 Your first task is to get OpenStreetMap data and transform it into a routable graph. I wouldn't recommend reinventing the wheel for this: you can use osm4routing (Python) or osm4routing2 (Rust) for this. Both are available on github. In osm4routing2's output data, it'll signify whether a particular way is routable for pedestrians or not. You can then build your shortest-path algorithm on this data. I'd suggest you start with the (unidirectional) Dijkstra algorithm, which is simple and understandable. There are lots of resources online explaining how to implement Dijkstra in Python. Once you've got the hang of that, you can move on to slightly more advanced algorithms such as bidirectional Dijkstra, A*, etc. etc. answered 10 Feb '20, 14:55 Richard ♦ 30.9k●44●279●412 accept rate: 18%
 2 Please have a look at the Routing page on the OSM wiki. It has a lot of information, also for developpers. Most types of highway are accessible to pedestrian, but you have to consider several tags to be sure ( access,foot...). I'm not sure you can start from scratch, unless you have a lot of free time, this is a really complex problem. answered 10 Feb '20, 11:58 H_mlet 5.4k●17●81 accept rate: 13%

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• 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:

×202

question asked: 09 Feb '20, 05:58

question was seen: 1,952 times

last updated: 10 Feb '20, 14:55

Related questions

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