Friday 20 April 2018

Android: Navigating a meticulously constructed custom route?

Given the number of hiccups we encountered with Garmin GPS on the last trip, this time around we've decided to forgo the rental expense of GPS units and use our mobile phones instead. Between us, we've got a diverse selection of Samsung Galaxy (Android) phones so the interesting question for us is: "How do we transfer the routes that we have agonised over for nights on end to our phones so that we can navigate them (turn-by-turn) on the bikes? Is there a method to take routes from Google MyMaps and navigate them on the Samsung Galaxy?

Unfortunately, application support for turn-by-turn routes is still very thin on the ground where smart-phones is concerned. I have managed to find a way to do this, but it took a few weeks research and testing to find a process and target application to meet our needs.

Google MyMaps

The tool we use to plan our Japan trips is Google MyMaps. We tend to plan a set of daily routes over months; typically with a lot of back-and-forth on the start/end points, the must-see sights to along the way, various notable roads that must be ridden and so on. Google MyMaps provides the perfect tool for such collaboration. Waypoints can be entered and the route between them dragged and tweaked until the perfect set of roads is selected. The results are stored in the cloud, and the maturing routes can be accessed and modified by all participants right up until you step on to the plane.

Google 'My Maps' is perfect for route planning!
MyMaps does have large limitations however. Most notably, it's not a navigation application. It can't provide turn-by-turn navigation, nor does it even know about your current (GPS) location. For this you need a navigation application. Even during map development this limitation means that MyMaps can't even tell you how long a chosen route will take you to ride. It can give you the distance in kilometres (sort of) but not the all important time measurement. For this statistic, Google Maps must be used - tracing out the roads that you've selected in your route yet again and checking the time taken. Yes - it's as annoying as it sounds. If the Google dev team could just get off their fat arses, stay away from those Mountain View office perks for just a few hours each day, maybe they could get their two mapping applications better integrated. We would all be kissing their arses big time! Are you listening Google?

Ok, so how then do you actually navigate a route created in MyMaps when you're on the bike? Well on the Garmin Zumo for example it's possible to load the route into the device as a KML file. The Garmin struggles to stay on route though (hence our issues last trip) with the slightest deviation causing the device to recalculate out the wazoo. Goodbye perfect set of mountain roads.

Now that we've done-away with the Garmin, what are the options on the smart-phone?

Google Maps?

There are several navigation options available for Android devices, but by far the most polished and most obvious choice is Google Maps. Or so you would think.  Google Maps provides a beautifully rendered display and easily digestible turn-by-turn navigation. The trouble with Google Maps, however, is that it is completely incapable of following a route created externally. The worst part of this is that you can actually load and display in a route created in MyMaps, but Google Maps won't use it to navigate. It just displays it for reference only.

Google Maps can kinda be used in a pinch. If you have your specific waypoints defined, you can use it to navigate to each waypoint individually.  Unfortunately:
  • you need to start navigating again after each waypoint is reached
  • Google chooses what it believes to be the most efficient route to each waypoint.
This is problematic for us because we have very specific routing requirements - those skyliners and notable mountain roads are not to be missed!

So what other options are out there?

OsmAnd

After trying nearly every navigation app available for Android and getting increasingly desperate, I happened upon quite a good process for route navigation using the application OsmAnd. Phew! Finally I'd found a way to get a route from MyMaps into a turn-by-turn navigation app that actually:
  • provides turn-by-turn directions from your current location to the start of the route
  • actually follows the route you've specified
  • let's you know when you've left the specified route
  • tries to navigate you back onto the route if you leave it, and
  • most importantly, if you re-enter the route at a position other than were you left it, the turn-by-turn navigation adjusts and continues from where you re-joined the route.
Add to this the fact that maps for Japan can be downloaded for free and used offline, and you've got a pretty perfect navigation tool for our needs. Of course the real-time display that as flash as the one Google Maps provides - especially Google Maps in Android Auto mode - but it's usable all the same.

Routes from Google MyMaps to OsmAnd

Getting a route created in Google MyMaps into OsmAnd ready for navigation is a little involved but, in the end, is very straightforward process. I guarantee you'll think the investment in time was worth the effort. The process is laid out below:

Step 1 : Generate a KML file in MyMaps
  1. Open your map in Google MyMaps.
  2. Click on the "three dots" in order to see the list of options.
  3. Click Export in KML.
  4. Keep the first check box unticked (it's only useful for online work).
  5. Tick the second one ticked to generate a KML file.
Step 2 : Convert your KML file to GPX
  1. Visit https://mygeodata.cloud/converter/kmz-to-gpx


  2. Drop your KML file onto the left panel and click Continue.
  3. In frame 1, you'll see all your layers from your map (e.g. one layer for your Points of Interest, one layer for the route, etc.). You can keep frame 1 unchanged if you want to convert the entire content of your map or you can remove the layer you don't want. Personally I just select the route I want to ride.
  4. In frame 2, select GPX format.
  5. In frame 3, click "Convert Now".
  6. Click on download and save the GPX file.
Step 3 : Import the GPX into OSMAnd
  1. On your computer, email the GPX file containing your route to the mail account on your phone/device
  2. On the phone/device, receive the email and download the GPX attachment.
  3. On your phone/device, click on the downloaded GPX attachment and select to open with the OsmAnd application.
  4. OsmAnd will display the route and allow you to use it for turn-by-tun navigation.



And that's all the news that's fit to print. I'm going to be doing a few test rides to get used to using the OsmAnd turn-by-turn instructions and so on, but I'm pretty sure it's going to be a useful resource on the road in Japan.

No comments:

Post a Comment