RouteGraph extension
Hi,
while the Karoo is great for seeing "the road ahead", I found it to be a bit lacking for seeing the route ahead. During some long distance events, I was struggling to perceive where I was on the track, how far away the next checkpoint / refueling stop was and how to pace myself getting there. Hammerhead has added some cool features to the SDK that allow extensions to access the current route, so I tried my hand at building an extension that helps in these situations.
It adds a couple of datafields, mainly an alternate elevation profile datafield:

Compared to the native karoo elevation profile data field, it adds POIs and climbs. By default, it is fully zoomed out to show the current route, but can be zoomed in with a tap. The "Distance to POI" and "Elevation to POI" datafields are also provided by the extension.
Alternatively, there is a vertical elevation profile, which shows more details and is supposed to mimic the instruction sheet the pros tape onto their stem:

Another feature I had some fun with is a minimap datafield. It can be placed on any data page and is supposed to provide an overview of where you are on the route without fiddling with the zoom on the main karoo map. It will auto zoom to fit the whole route by default, but can be zoomed in with a tap and will then try to fit as much of the upcoming route on the field as possible. It uses simple OpenStreetMap raster tiles downloaded via the companion app during riding.

There is some more features I had some fun with, but which are even more experimental. I tried to replicate the gradient-colored chevrons featured on Wahoo devices on the Karoo:

They work, but are a bit clunky at the moment, mainly because their sampling frequency is too low. I'll look into improving them in the future.
Lastly, I have tried obtaining traffic incidents from HERE Maps and showing them on the Karoo map and the extension data fields:


When loading a route and this feature is enabled, the extension will query the API and fetch a list of known traffic incidents (construction sites, road blocks, closures due to planned events, major accidents) along the route. I found the reported incidents to be quite accurate, but this will obviously depend on the data quality for your location. To my knowledge, the business model of HERE Maps mainly targets freight companies, so incidents on high traffic roads are likely to be reported while a blocked multi-use path is not.
You can try the current version of the extension by downloading it from here: https://github.com/timklge/karoo-routegraph . If you do so, feel free to let me know if you encounter issues and whether the features are useful to you. I use the extension during all of my rides and like the increased awareness of the upcoming climbs and POIs.
If you try it, please be aware that there are currently a few caveats:
- The experimental traffic incident reporting currently requires obtaining a HERE Maps API token (free, but obviously clunky to set up).
- The minimap will currently only start downloading tiles when it is visible on screen to save battery and this can take quite a few seconds per tile due to the low bandwidth of the BLE bridge
-
Internet connection is no longer required. Hammerhead had extended the SDK a few months ago that allows the extension to read the current route's elevation profile without downloading it from the internet. I should probably update the first post in this topic, thx for the heads up.
-
I've noticed that some POIs were missing in the offline POI database (those that are mapped as ways on OSM). Interestingly, those are also not shown with the little shopping cart symbols on the Karoo map, so maybe Hammerhead made the same mistake.
I've updated the POI database downloaded by the app; so if you use this feature, please redownload the offline POI data in the settings menu. I think only supermarkets or large buildings (stations etc) were missing; most categories like shelters were complete.

Using the offline POI feature, it is possible to automatically have all POIs of categories added to the karoo map (e. g. supermarkets, gas stations, drinking water supplies...) and to look up upcoming POIs via the button in the elevation profiles.
-
Avatar
Uwe
1 second ago
Hi Tried newest beta 30 extension yesterday. I wanted to have all the poi displayed on map. Like supermarkets snd water supply. But it seems only some (random?) part of the poi is loaded and displayed on the map. There is dome are ehich shows lots of them, other areas show nothing… I have pictures of this but cannot post them here. Poi seem to be loaded correctly but just do not show up when i add them to the map… -
@Uwe: Currently, POIs that are within 200 meters of the route will be shown if you have a route loaded, or within 2 km of your current location if you don't. Does that match your observation?
Unfortunately, I can not implement always showing the POIs for the map area that you are viewing in case you are unlocking the map and pan it around. There is no way for extensions to know which part of the karoo map you are viewing when the map is unlocked. I had suggested to Hammerhead to provide this with the extension SDK a year ago, but I think they do not prioritize it.
What I can improve is to increase this radius when you zoom out the map, as the zoom level is available to extensions. So that when you zoom out to view 10 km around your current location, it will increase the search radius. There has to be a limit there though as large search areas can become expensive.
-
Hi timklge
Thank you.
It does partially match.
When does this loading of pois happen ? When loading a route ?I have attached two photos. Hopefully you get them. They show when zooming out what was loaded…
At the beginning where i have updated the Extension and reloaded the offline poi from germany i hot some symbols display’d. Then there was a long gap and at the endpoint were a lot of loaded.
It is unrealistic there were no pois in between.One thought: this long part of the route with no bend,nothing. Maybe this is the cause of the problem ? Maybe you check only at the bending-points for nearby pois ?
I will recheck with another route…
Regards
Uwe -
Ah yes, thank you very much, I think you're right! Indeed, I had forgotten to sample the route in a fixed interval in the offline POI lookup code. It is done correctly in the gravel segment code, but in the offline POI code, I was using the points of the route polyline instead, so there were no points on straight segments. None of my test routes have a supermarket on a straight segment, so I had not noticed this on my rides.
I have pushed an update to beta31 that should fix this. Changelog: https://github.com/timklge/karoo-routegraph/releases/tag/1.0-beta31
I will test it on my next ride.
-
Hi timklge
Great. Will also try to test it asap.
BTW: 200m from the route seems to be a bit tight imho. There is a setting for at what distance poi show up in the elevation diagram. Is this also used here for the map or are the 200m fixed ?
I would be willing to make a greater detour if i am hungry 😎.
BTW2: I had a look on your changes: I am not a kotlin person at all, but what i did not understand:
Why would you sample on between points only if there are >2 points in the list ? -
I have pushed yet another update, to 1.0-beta32. Main new feature is the display of the estimated time of arrival at nearby POIs and the indication of opening status; when looking up supermarkets or other businesses, they will be displayed with a label "Open" or "Closed" if someone has entered their opening hours in openstreetmap. In my area, almost all businesses are tagged correctly.

Also, I have added minor railway stations to the offline POI databases, which were previously missing (tagged as railway=halt on OSM). Please redownload the offline POIs if you want to have them. Full changelog here https://github.com/timklge/karoo-routegraph/releases/tag/1.0-beta32
@Uwe I've changed the auto-add feature to also use the range set in the settings in the newest version. The point sampling code is shared between the "look up POIs ahead on route" and "look up POIs around current position" search modes in the POI lookup dialog. The latter calls the code with just the current position. The code should read < 2. The "ahead" search mode is used by the auto-add feature. -
Thanks, I think showing a warning if the closing time is within an hour is a good idea. The displayed status is for the estimated time of arrival, as that's the time displayed right next to it, so I thought it makes the most sense to also use it there.
In `1.0-beta33`, I have added a "🟡 Closing at HH:MM" status that is displayed if the closing time is within an hour of the estimated time of arrival. Also, it will show a "🔴 Opens at HH:MM" status if it is closed at the eta, but would open within an hour.
https://github.com/timklge/karoo-routegraph/releases/tag/1.0-beta33

-
Hi Tim.
I use the extension already for quite some time, however, did not cycle last 3 months. Now I have a strange behaviour, as whenever I load a route, the extension does not recognize the route, but only shows "no route loaded" (in my German version "Keine Route geladen").
So it does not show any route profile and likewise no route on mini map or POIs.
Is there any recommendation how to proceed
Karoo 3 and Routegraph all on latest versions.
-
@Björn On my Karoo, everything seems to work as intended. I am eating my own dog food and use the extension when commuting and on all rides, so unfortunately I'm not sure what is going on. I recently did a factory reset of my Karoo (3) and am using the version available from the extension library, so it looks to me like it's some issue specific to your Karoo. Maybe the extension got into some broken state and has a partially downloaded POI file or something, or it only breaks when a specific combination of settings is used.
You could try uninstalling and reinstalling the extension to reset the extension and its configuration.
The extension does not send any telemetry so I can't identify any issues remotely unfortunately. If it doesn't work after reinstalling it, it would be cool if you could send me an email to timklge@gmail.com so that we can look into debugging it if you are interested.
-
@Björn If this has been a one-time occurrence, I think it might have been caused by a Karoo issue. Sometimes, the Karoo does not restart the background service of extensions after reinstalling or updating an extension. After a restart of the Karoo, everything works again. Iirc I had posted about this on HH's SDK github issue tracker, but that has since been purged, and I don't know if they are working on the extension support and issues like this anymore.
My roadmap for the extension until I consider it "done":
- Improve the "Open" / "Closed" POI business status labels to also show when the status has changed in the past hour
- Add rerouting indication to the elevation profile datafields (i. e. polyline inserted into the route polyline for the reroute segment when off-route, as it currently will only show the last known position on route)
- Replace the current minimap with a vector-tile based implementation that reads the mapsforge tiles from the downloaded map data on the Karoo. This version can then be freely rotated instead of being north-up-only, does not require downloading the OSM tiles, and is not as blurry as the raster tiles. I've prototyped it, but it still needs work.
- After that, I'd like to add a precipitation radar / wind overlay to the minimap. OpenMeteo is currently working on making their spatial forecast data available for access, and I'd like to use that once available.
-
@ timklge
Sounds great. Especially improved minimap+radar.
Btw: sometimes with the current extension version the extension seems to crash or hang. At least the karoo tells that…
One more idea: Do you think you could combine elevation and surface on the elevation diagram ?
I’ll try to investigate that… -
@Uwe Sorry, I had introduced an error in the recent update that caused a crash when you were arriving at a target in "navigate to destination" mode and the navigation polyline point count becomes zero (dropping a pin, navigating to a POI, navigating to home etc). I've pushed a fix for that, hope that's the same issue in your case.
The elevation diagram should already show surface conditions (when enabled in the settings) and gradients. Below a certain zoom level, it will only show climbs by default though; on high zoom level, it will colorize every 100 meter segment on the route individually. You can customize that in the settings.
-
One more “idea”
Coming from wahoo i use routegraphs elevation profile on my main map page as a replacement for a similar feature on wahoo (but more functional) because of all the features it offers.
One thing missing on my old wahoo (i think they fixed this with never devices) was that the elevation diagram was not updated when leaving a planned route for whatever reason. Same with Karoo now. I had a look at the api and found ghey just do not offer the elevation data for the intermediate route back to the main one.
But in the meantime i also found that the rerouting function in karoo is relatively useless for me anyway. It sticks to much on local rerouting with often useless routes. But what is very good on karoo is the ability to have a temp route to a poi.
Here comes the idea: if we had the chance to create a temp poi to route to somewhere ahead of the current position on the current route that would completely fit my and maybe others bill. And having an updated elevation plot would be an additional automatic benefit…
Please sign in to leave a comment.
Comments
51 comments