May an extension read the offline map store, and is there a supported way to get the road network ahead?

Comments

2 comments

  • Avatar
    timklge

    I think the Mapsforge data does not contain elevation if I remember correctly, as it's not required to draw the map (The recently added contour lines are precalculated polylines stored elsewhere I think). It does contain other useful data like surface types though.

    It would be amazing if HH added access to the predicted route and its elevation to extensions as you suggest. Or even better, low level access to the routine engine and its data. They have not added new features to the SDK for more than a year or so though, and seem to be happy with what is there currently. They generally do not engage with third party developers here or on the defunct github issue tracker.

    0
    Comment actions Permalink
  • Avatar
    Andy Basacchi

    Thanks, that matches what I found. I opened the Karoo's ontario.map with mapsforge-map-reader: it has highway type, name, surface, tracktype, cycleway and oneway, but no elevation, as you say.

    Two things others may find useful. First, the routing tiles beside the map (.gph.gz, Valhalla format) do carry elevation per edge. I compared their per-edge mean elevation with my own surveyed profile along a 45 km ride and it agrees within a few metres, though a long rural edge gives only one value, so the shape inside the edge is lost.

    Second, karoo-ext 1.1.9 already gives an extension the loaded route's elevation: subscribe to OnNavigationState and the NavigatingRoute carries routeElevationPolyline, a 30 m profile of the whole route, plus the climbs list. On my Karoo 2 that worked, with the caveat that the state is delivered on subscribe and not pushed when navigation starts later, which I filed as karoo-ext issue #81. So the gap is only free riding without a loaded route.

    Has anyone here parsed the Valhalla tiles on-device, or heard whether reading the offline map store is tolerated by Hammerhead? I would rather build on something supported than on files that may change.

    0
    Comment actions Permalink

Please sign in to leave a comment.