RouteGraph extension

Comments

51 comments

  • Avatar
    Stevejgalbraith

    Hi,

    this looks great and I would love to try the traffic incident reporting. Can you please explain how to get an API token.

    Thanks

    0
    Comment actions Permalink
  • Avatar
    John Pfennings

    Like it but only one thing is not fine imo:en that are the chevrons. Wahoo style... Could you make these optional?
    Rest is great.

    0
    Comment actions Permalink
  • Avatar
    timklge

    Thanks.

    @Stevejgalbraith: You can register at https://platform.here.com . Then, you can register an app (the name doesn't matter) and obtain an API token. Unfortunately, they recently removed the "limited" tier where you could just create a simple account; now, you have to enter billing details, but the free tiers are still there and you won't be charged. You can use the rest of the features of the extension without this.

    @John Pfennings: There is a setting in the menu to disable them ("Show gradient indicators on map") , and they are disabled by default as I thought that they are rather intrusive on the map. Were they enabled on your device?

    0
    Comment actions Permalink
  • Avatar
    John Pfennings

    Hi Tim yes they were enabled. I even made a question for hari from hammerhead what these chevrons were. He told me it could be your app. Deinstalked and if course they were gone 🫣 thanks for your quick reply.

    1
    Comment actions Permalink
  • Avatar
    D Fel

    Nice looking app! Just curious, if there is significant rerouting when underway, or a new POI is added on the fly when riding which changes the route, or one changes to a completely new route, will the extension lose the correct distance to POIs and elevation profiles?

    Maybe I am confused by the internet connection requirement. Will the app get data on the karoo 3 via my phone's internet connection and the karoo companion app?

    0
    Comment actions Permalink
  • Avatar
    timklge

    @D Fel: When you are navigating to a POI, that will become your new "temporary route" and the extension will show the elevation profile for that, but only global POIs as the temporary route has no POIs of its own. When you arrive at the destination, drop the temporary route or load a completely different route, the extension will show the elevation profile and POIs for that route instead. It reads your current position on the route from the Karoo "distance to destination" datafield.

    Yes, the extension will use your phone's connection if you have the companion app set up with a Karoo 3.

    0
    Comment actions Permalink
  • Avatar
    timklge

    I've pushed an update with some new features that I want to use during some upcoming bikepacking trips. On the elevation graphs, you'll now find a button with a pin drop icon to open a POI info screen:

    There's also a new datafield that just contains the button, and there's a new button to open it from the main settings menu. When you press it, a new screen opens that shows all set up POIs and buttons to initiate navigation. By default, the POIs are sorted by the linear distance between your current position and their position, but you can change the sort order to "Ahead on route", which will sort the POIs by the remaining distance on your currently loaded route.

    There's a separate tab you can open that allows you to search for nearby OSM POIs of certain categories (e. g. supermarkets, train stations, drinking water supplies etc.). You can also choose to search for POIs ahead on your route here; so it can be used to look up upcoming POIs that require as little diversion from your route as possible.  

    You can "bookmark" each POI, after which it will appear on the main karoo map and on the route graph elevation data fields. The extension will also show an approach alert if you get within 500 meters of the closest point on the route to the POI (configurable in settings).

    Lastly, there is a third tab that allows you to look up POIs (e. g. by address or something like "Brandenburg gate").

    The extension uses overpass-api.de and Nominatim for POI lookup. Both are great software projects that make it easy to implement features like this; but since they are API-based, you will need an active internet connection to use it while riding (via companion app on Karoo 3 or SIM card on Karoo 2).

    I've also reworked the gradient indicators; they now use the karoo color palette for gradients in addition to blue hues for descents. There's still some minor issues with it that only Hammerhead can fix because it is related to how the SDK handles symbols that extensions draw on the map; the chevrons will not rotate with the map if you unlock it and pan around, and they rotate a little bit delayed when you turn. Maybe they'll fix that at some point, maybe they won't.

    0
    Comment actions Permalink
  • Avatar
    John Pfennings

    @timklge this works really great used already during a ride in Germany through Bergisches Land to find typical bakery's 👍👍

    1
    Comment actions Permalink
  • Avatar
    Javiuchi

    Hammerhead has added new functions to the library: elevation, ascent, and navigation distance for POIs. Will these new options improve Routegrahp?

    https://github.com/hammerheadnav/karoo-ext/tree/1.1.6

    0
    Comment actions Permalink
  • Avatar
    timklge

    @John Pfennings: Thanks! I currently use it during rides to look up upcoming gas stations that I don't have to leave the route for, and add them as POIs. I'll also use it in an upcoming bikepacking event to look up shelters for sleeping spots along the route, I'm curious how that will work out.

    Hammerhead has added new functions to the library: elevation, ascent, and navigation distance for POIs. Will these new options improve Routegrahp?

    Yes, I'll update the extension once the new SDK capabilities are part of the public Karoo software. The extension will then no longer need internet access to display the elevation profiles and climbs, as it can get the data from the Karoo instead. The climbs shown on the elevation profile data fields will then also match the climbs shown in the Climber drawer.

    The nearby POI search function will still require internet access, as it uses the Overpass and Nominatim APIs and the offline OSM maps on the Karoo are not available to extensions.

    0
    Comment actions Permalink
  • Avatar
    Christian Renner

    Hi Tim, this is a great extension. Two things I noted:

    1. When using a radar, the "swim lane" on the left covers a majority of the climb profile in vertical mode (if a car is behind). No deal breaker but still not ideal.

    2.  The amount of text available in vertical mode is rather low. I put names of climbs, time and power targets; e.g. "Kühtai (07:20, 200W)" which was too long. Would be nice to have a more condensed or smaller font.

    0
    Comment actions Permalink
  • Avatar
    timklge

    Thanks, I agree both of these can be improved. I've made changes to wrap long text labels and reduce the font size and spacing for the next release. It might result in long names taking up all the available space though; I might cap it to three lines in a future update.

    I've also added some code that moves the route graph over to the right when the radar is detecting a car, I'll test if that works correctly.

    0
    Comment actions Permalink
  • Avatar
    Son Nguyen

    Hi Tim,

    I really love the colored gradient ovelay on the elevation graph. This is a feature I was really missing from my old Wahoo (till I discovered your extension). I am wondering if it will ever be feasible for this feature to be available during "free-ride" without a route? 

    1
    Comment actions Permalink
  • Avatar
    timklge

    I agree it would be cool to have, but I can't implement it at this point because extensions don't have access to the map data. So it would require Hammerhead adding new features to the SDK; they would need to expose the route the Karoo thinks you will take and its elevation data to extensions. 

    I don't know what their long term plans for SDK capabilities are. There are other parts of the extension where access to offline OSM map data would be great; e. g. the POI lookup uses the overpass API, but in theory, the Karoo has downloaded all the map data that also contains the POIs, so it could be handled offline if extensions could access the map data. I'd also like to indicate gravel sections on the route graphs like strava does, but the extension has no way of knowing the surface conditions (without accessing yet another online API).

    0
    Comment actions Permalink
  • Avatar
    Héctor Casals

    This weekend I tried your extension and it's very useful for finding out the distance to POIs. Great work! It's something I've really missed, as most of the time routes are divided into several parts and I only had the total distance to the end, not the distance to the intermediate stop.

    Do you have access to the average speed? Could you calculate the estimated time to the POI?

    0
    Comment actions Permalink
  • Avatar
    Christian Renner

    Hey Tim, I agree that using additional SDKs and services is not favorable, if the same data/info could be exposed by the Karoo SDK. Would be much appreciated if HH would add this.

    0
    Comment actions Permalink
  • Avatar
    timklge

    @Hector: Yes. There's already a github issue for it: https://github.com/timklge/karoo-routegraph/issues/39 . I'm not sure yet what the best approach would be though. I could try to replicate the ETA algorithm that Hammerhead uses, or I could try to be very smart about it and factor in upcoming climbs etc.

    1
    Comment actions Permalink
  • Avatar
    timklge

    I've now added surface condition display to the elevation profile datafields. This has to be enabled in the settings menu, and requires granting file access permissions to the extension. If the permission is granted, the extension will use the mapfiles on the karoo's shared storage to look up the gravel and offroad sections on the currently loaded route and indicate them on the elevation profile datafields. This is rather complex, but I found it to be working well; it would be much easier if Hammerhead just exposed the surface cues through the extension SDK.

    Also, I've added a "Features" section to the README file, as the extension has gotten quite complex: https://github.com/timklge/karoo-routegraph

    2
    Comment actions Permalink
  • Avatar
    John Pfennings

    Hi @timklge use the extension since start. But tried now to activate surface info and it does not appear . In apps granted permission for everything… any clue?

    0
    Comment actions Permalink
  • Avatar
    John Pfennings

    Oeps forgot…. I use a different xml from openorg maps ( elevate ) and use their maps also. Suppose that iscthe reason 🫣

    0
    Comment actions Permalink
  • Avatar
    timklge

    @John Pfennings: It should work anyways. I'm not sure why it does not on your device - it would be great if you could update to version 1.0-beta24. I've added a debug label to the settings menu underneath the toggle that enables the surface condition display. It should look like this after you enabled the setting and have a route loaded:

    I'm not very happy with the current implementation of this feature as it is quite clunky. When you first grant the permission, android will terminate the app and you have to reopen it, and there is no way around this that I am aware of. When you load a route, the app will then take a sample of your route in 100 meter intervals and look up the closest OSM way in the mapsforge files on the Karoo that it can find. If this is a gravel way, it will be marked. This would be much simpler if Hammerhead included the surface cues in the route information available through the SDK, as they have done for the route elevation profile etc.

    In the newest version, I've also added support to download POIs onto the Karoo. It will download OSM extracts from my webserver at https://routegraph.timklge.de . It enables searching for nearby POIs / POIs along the route without an active internet connection. 

    0
    Comment actions Permalink
  • Avatar
    Uwe Hagmaier

    Great extension. Thank you so much.
    One question: i have once ensble showing pois on the karoo map - but i dont like it too much because of the large icons. Especially when zooming out this clutters the map. Now when i disable them they dont go away but stay on the map. Any idea ?
    Btw: where are the poi stored in the karoo file system ?

    0
    Comment actions Permalink
  • Avatar
    timklge

    Thanks for reporting this; I have looked at it on my device and you're right, I made a mistake that led to the POIs always being drawn onto the map regardless of the setting as long as you had the categories selected. I've pushed a new update to version `1.0.0-beta26` of the extension that fixes it.

    The POIs are stored in the extension's private data directory, which is "/data/data/de.timklge.karooroutegraph/files/pois.de.db" in the android filesystem. They are saved as indexed SQLite database files downloaded from my webserver at https://routegraph.timklge.de/ . The POIs are extracted from the OSM worldmap (https://planet.osm.org/). I originally wanted to use the POIs stored in the offline maps already downloaded to the Karoo, but they include only those the Karoo displays on the map, and I wanted to have more (e. g. trainstations, shelters, ...).

    0
    Comment actions Permalink
  • Avatar
    Uwe Hagmaier

    Thank you very much.
    This directory is invisible from outside via usb I suppose ?
    It is interesting that you could access the map data from within your extension. I am really wondering how this basically works at all. I have tried to add a seperate set of maps files downloaded from Openandromap alongside the karoo ones. To my surprise this works and the maps are correctly rendered using the elevate xml. Would be interesting if the maps are somewhat merged ?
    This openandromaps seem to contain much more details than the stock karoo ones…

    Regards
    Uwe

    0
    Comment actions Permalink
  • Avatar
    Joachim Lutz

    Hi,

    i just found your extension and it´s pretty impressive. Unfortunatels i can´t display surfaces to the profiles.

    i planned a route with a lot of gravel and route samples says 0 gravel.

    i permised file acces. Am i doing something wrong, or do you still need some time to develope the feature.

    0
    Comment actions Permalink
  • Avatar
    timklge

    The implementation of the surface condition lookup is very complex for what it does; the extension samples your route in 50 meter intervals and looks up the path at that position in the offline maps on your karoo.

    If you have a route for which the extension shows "XXX samples (0 gravel)" and the route doesn't reveal your location, it would be very helpful if you could send me the route gpx to timklge@gmail.com . I might have missed some OSM tags that indicate "gravel".  It might also be the case that the tags are not part of the HH mapsforge maps. I have tested the feature on some of my regular routes and found it to be working fine.


    In the long term, it would be much simpler if Hammerhead exposed the route's surface conditions via the SDK (similar to how the route elevation profile is read currently), I have asked them about it. The Karoo has all the data already, as you can toggle the surface condition warnings in the TBT drawer. 

    This directory is invisible from outside via usb I suppose ?
    It is interesting that you could access the map data from within your extension. I am really wondering how this basically works at all. 

    The POIs are not read from the karoo maps, because the Karoo maps don't contain them. The POI database is downloaded from my server instead. The surface conditions are part of the Karoo maps and the data would be too large to download, so I tried reading them from the Karoo maps instead. 

    1
    Comment actions Permalink
  • Avatar
    timklge

    @Joachim Lutz I've pushed a new version `1.0-beta27` where more surfaces are considered gravel. Would be great if you could check if the gravel sections on your route now are identified correctly.

    I've also fixed a dumb mistake I had made in an earlier version which resulted in climbs not showing up on the elevation profiles while on route.

    https://github.com/timklge/karoo-routegraph/releases/tag/1.0-beta27

    0
    Comment actions Permalink
  • Avatar
    Joachim Lutz

    Sorry, I was quite busy the last days and had no time to send you the gpx files.
    Today I did a ride with another route and it displayed the gravel sectors correctly

    I will check the new versions.

    0
    Comment actions Permalink
  • Avatar
    John Pfennings

    @timklge update on surface info a lot better now for gravel! Tested on today’s ride. Top.

    0
    Comment actions Permalink
  • Avatar
    RicardoD

    Hi all. Newby with Karoo3. I've found this extension that provides a great feature for me (complete route elevation). @timklge can you confirm if an internet connection is still needed for it?? Thanks in advance

    0
    Comment actions Permalink

Please sign in to leave a comment.