[OSM-talk] build your own routing options in Osmand (an idea for your OSM meetups)

Hi, You might have noticed pietervdvn's [1] diary articles [2][3] about tweaking the Osmand router. With OSM Belgium, we invited him to do a workshop about this subject [4]. I think it was really fun, and relatively easy. I'm not a coder myself, but I managed to make a switch for the pedestrian routing that will radically prefer paths when plotting a route. Not meant for going from A to B, but for when you want the nicest possible trip to go there [5]. For now, it just strongly prefers paths and the like, and smaller roads over bigger ones. But you could make it prefer unpaved paths for that natural experience. The adapted xml I used is available in Pieter's repo [6]. There are more examples there, as well as the original. The only thing you need to do is take an existing routing xml, name it routing.xml and drop it into the folder where Osmand will be looking for it (usually /sdcard/Android/data/net.osmand.plus/files/ ). The only issue we ran into is that this did not work on all Android phones. If you're an Osmand specialist, hints would be welcome. Pieter's presentation [7] quickly goes over the basics of routing and how this is implemented in Osmand. Pieter put a big effort in documenting the original routing.xml, to make it much easier to understand and tweak. Fortunately, this has now been merged into the Osmand repository. So you can start from the version there as well [8]. It's also possible to make entirely new routing profiles, like "speed pedelec routing". In my xml, you'll find this in the "boat" profile (because it works, not because it makes sense). To be able to use that, you need to activate the plugin for Osmand development and activate special routing profiles under the settings of that plugin. Feel free to ask for more details, though we don't know everything! I'll be at SotM, so feel free to ask me more there too. Easy and fun projects could be: - prefer roads without maxspeed when routing your streetview collection drives - follow cycle routes unless impossible for your scenic motorcycle or oldtimer tours I decided to send this to talk to inspire others. Doing an event like this shows the incredibly cool things you can use OpenStreetMap data for, as well as being a relatively accessible way for non-coders to taste the power of open source. 1: https://www.osm.be/2018/01/12/en-motm-pieter-vdv.html 2: https://www.openstreetmap.org/user/Pieter%20Vander%20Vennet/diary/42673 3: https://www.openstreetmap.org/user/Pieter%20Vander%20Vennet/diary/42672 4: https://www.meetup.com/OpenStreetMap-Belgium/events/252470094/ 5: https://i.imgur.com/dH6SXD8.jpg 6: https://github.com/pietervdvn/pietervdvn.github.io/blob/master/routing_radical_hiking.xml 7: https://docs.google.com/presentation/d/1cqpL5NedjF5lIzoPLA_X5-YE0tkZYX4ciczUsO8W1g8/edit#slide=id.g3a6c728807_0_122 8: https://github.com/osmandapp/OsmAnd-resources/blob/master/routing/routing.xml -- Joost Schouppe OpenStreetMap <http://www.openstreetmap.org/user/joost%20schouppe/> | Twitter <https://twitter.com/joostjakob> | LinkedIn <https://www.linkedin.com/pub/joost-schouppe/48/939/603> | Meetup <http://www.meetup.com/OpenStreetMap-Belgium/members/97979802/> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20180724/1e9c0728/attachment.html>