If you’re expecting a typical photo-heavy entry about traveling and outdoor escapades, you can skip this post altogether. Come back in a couple weeks. If you’re interested in bicycle tour route planning, then there might be something of interest here.
Historic planning and navigation
I don’t normally write about gear or about the geeky computer stuff that I do, but we had a long covid lockdown, and I spent way too much on the computer.
It was about 28 years ago that I first put panniers on my bicycle and did an overnight bicycle tour. Of course, I’ve updated equipment list over the years, but I can point to one piece of equipment that has made the biggest impact on the quality of bicycle touring — the smartphone (with gps-enabled mapping applications).
We used to deal with paper maps, trying to find ever more detailed maps along the way, stopping at tourist offices to see if they had information about good routes for bicyclists, and very frequently asking people which way to go. All this is kind of fun, but it rarely got you on the best route.
In 1999 we pedaled some 10,000km in Africa with often just a 1:4,000,000 scale map! (That’s a cm for every 40km.) I remember being so excited in 2006 that the tourist office in Lausanne had a map showing the bicycle routes in the city. I picked it up when I first arrived and used it for the four days I spent in the city.
How times have changed. I love paper maps, and I must admit I enjoyed visiting Ethiopia’s equivalent to the USGS in Addis Ababa or INEGI in Mexico City or the widest selection of maps I’ve ever seen, at a store in Berlin, for a few examples.
Only four years ago I met Kurt at the Madrid airport, and he used his phone and some fancy app called osmand to find us a super route from the airport into the center of the city. I realized I needed to look into this technology.
Back in Turkey two months later I installed osmand on Ferda’s phone (I didn’t have a smartphone yet), and we joined a group tour from Kayseri to Antalya. During the three days we spent in Tarsus, I really used osmand for the first time and was amazed by the great routes it found through the city. With my 1:400,000 map and lots of asking for directions, I would have never found such bicycle friendly routes.
Another two months later Ferda and I were bicycling in Sweden. I bought an atlas in Malmö and was still mostly navigating with that, like I had been doing for over 20 years. But that 1:250,000 atlas didn’t show enough detail for finding a good route into Kalmar. Let’s check this osmand thing, we said — we still weren’t accustomed to it yet. Oh, look, it shows a bicycle route straight into the center of the city. It was only for bikes and of course didn’t show up in the atlas at all. Fantastic! I was finally beginning to get it.
Around this time a friend in Antalya couldn’t believe I was still using a Nokia phone with buttons. He gave me his old smartphone. I installed osmand and used it during a tour with Jack in Oman in January 2018. Worked great. Four months later I used osmand again in Sulawesi with Ferda. However, smartphones were still new for me, and I didn’t realize they weren’t waterproof. Really?! People spend so much money on these things, and they aren’t even waterproof??!! It never rained in Oman, but I learned this the hard way in Sulawesi. The screen never fully recovered, and I ended up buying my first smartphone in Rantepao, the biggest city in Tana Toraja. At 1,100,000 rupiah (almost US$80) it seemed like a crazy price to pay for a telephone. That’s the cell phone I still have.
Current route planning
Route planning involves routing, and routing requires two things:
- detailed information about the route choices and
- an algorithm to take this information and choose the best route.
For automobile users on main thoroughfares both are highly developed and have been for, what? perhaps a decade now. Routes that take cars on the fastest roads are of little interest to bicyclists.
Openstreetmap (osm) is continually improving and provides the former. During the lockdown I discovered brouter which provides the latter. The brouter algorithm takes a highly configurable profile that describes exactly the kind of route you’re looking for and how much weight to give to the choices (think road surface, hills, traffic as examples — we’re limited only by data). I can’t begin to explain everything these profiles can do. The m11n server hosts quite a number of profiles that bicyclists might be interested in. For my riding in Turkey I edited one of their profiles to put a higher cost on osm “path” tags. “Path” is a problematic tag in osm mainly because it covers too many different things, from perhaps paved bicycle paths to steep hiking trails. For my mountain riding in Turkey I put a much higher cost on these paths so my routes would avoid hiking trails. (Compare mine to the one I edited if you’re interested.)
You don’t have to dig into brouter much to see the power of their algorithm and approach. Excited by all this potential and with too much indoor time on my hands, I decided to write some solutions to the traveling salesman problem (tsp) using brouter routing. Note that traditionally we think of tsp solutions as minimizing distance, but we can minimize anything we want — time to travel by touring bicycle, e.g. (check out the kinetic energy options in the brouter profiles). It’s all so exciting that I stuck my code on github and created a Python package. Now I can find a bunch of places I want to visit and calculate a least effort (or time or distance or cost) tour connecting them all via bicycle friendly (configured to my preferences) routes.
Clearly I need to get out more.