The support forum is temporarily read-only. For urgent requests, please email contact[at]psyberia.net

Integrated offline autorouting with graphhopper

Any question about the app? Ask it here
Post Reply
damiano.falcioni
Posts: 8
Joined: Tue Jan 31, 2023 2:51 pm

Integrated offline autorouting with graphhopper

Post by damiano.falcioni »

Hi,
I would like to propose another offline routing approach using Graphhopper, a small and fast Java library for Android (1.5Mb the needed graphhopper-core) that work directly with the OSM compressed .pbf data.
The users could use their own pbf data (like downloaded from GeoFabrik) or you could provide slimmed down versions in your server of pbf containing only streets (easily done with osmium-tool with the command "osmium tags-filter original.osm.pbf w/highway -o onlystreets.oms.pbf").
In this way you could:
  • Avoid the installation of the separate BRouter app and its configuration (that is not so intuitive).
  • Use the latest offroad tracks and streets provided by the OSM community.
  • Support multiple profiles (including public-transports).
  • Help to solve your voice guidance feature request, as this library give also exacts textual directions to follow. So will be missing only the integration of a TTS engine for the speech functionality. Alternatively if this textual directions will be visualized as notifications you will get for free the integration with connected smartband/smartwatch that will automatically receive and show the notification.
A sample of the needed code is here: https://github.com/graphhopper/graphhop ... ample.java.

Hope this could help.
Best regards,
Damiano
Psyberia-Support
Site Admin
Posts: 6406
Joined: Wed Apr 14, 2010 9:41 pm

Re: Integrated offline autorouting with graphhopper

Post by Psyberia-Support »

Hi Damiano and thank you for this detailed information.

It's interesting and I add this into the planned features. Having different services is always better.
It won't be directly integrated with the app, but I'll need to make an extra app anyway, just like it's done with BRouter. This is why I liked the BRouter approach, even if you says that it's more complicated to use, there are a lot of advantages.

Note that the BRouter data also come from the OSM community and is regularly updated. You can also have multiple profiles (I don't think you can use public-transports though). The fact that you can download and update routing areas from the BRouter app is also very convenient for basic users.

From a more technical point of view, the advantages of having an external app are multiple (more generally than the Graphhopper library): AlpineQuest remains 100% home made, it means a total control on the source code, no rely on other projects or licences, no technical limitations due to the API. No risk of bugs, backdoors, viruses from included librairies. No need to update the application every time a library is updated or requires a fix, the external tool (here BRouter) is updated based on it's own schedule independently from the app. Less work for me (important tool!), smaller install size (for all those that don't use it), right now the universal installer size is less than 8MB, so that would be a 20% increase...
Do you like AlpineQuest ? Leave a small comment on Google Play !
damiano.falcioni
Posts: 8
Joined: Tue Jan 31, 2023 2:51 pm

Re: Integrated offline autorouting with graphhopper

Post by damiano.falcioni »

Hi,
and thanks, but don't get me wrong, im not promoting graphhopper :p
mine was only a suggestion for an integrated offline routing engine that support step by step directions, and I thought about graphhopper as brouter does not have such feature.
But your point is right; in your context I agree graphhopper does not fit and could be better to keep it separate to let your app lite and bug/pain free.

Thanks again,
Damiano
Psyberia-Support
Site Admin
Posts: 6406
Joined: Wed Apr 14, 2010 9:41 pm

Re: Integrated offline autorouting with graphhopper

Post by Psyberia-Support »

Yes no problem at all. Indeed this is a good information and solution, it just need some work to get it working.
But all solutions that works offline are good to have, it's all the point of this app...
Do you like AlpineQuest ? Leave a small comment on Google Play !
suntalla

Re: Integrated offline autorouting with graphhopper

Post by suntalla »

Hi,
If this means voice directions in A.Q. this would make me happy.
Especialy if in due time, in combination with audiowaypoints that can function as a proximity alert. This would actualy mean if you are blind and live in an off the grid village in a far away country, no good phone connection, you could just have a friend make/walk a route, add custom directions, no tiles needed, turn on follow the route, and not be completely lost in the place where you live.
Yes I do realise the problem of how to operate the UI of A.Q., or any other app that has follow the route and custom voice directions, would then be the bottle neck when you're blind. My quess/hope is that someone other then François can make an add-on app for that. Plenty ideas overhere about this add-on interface. Most off them most likely make no sense and anyhow: I do not have the technical knowledge to produce it, but everything starts with an idea, that is true also. To me the basic idea behind gps is: How not to get lost. Blind people can walk but have the highest risk of getting lost. Any small step to make this problem smaller is a noble thing. A phone and a friend is all that is needed, not even internet connection once the app is downloaded. Just walk a route at the same time make custom audio proximity alerts. No more. Especially if this is functional no matter where on earth you live it just might prove to be not a small step with the right follow up.
Friendly greetings
Jos
damiano.falcioni
Posts: 8
Joined: Tue Jan 31, 2023 2:51 pm

Re: Integrated offline autorouting with graphhopper

Post by damiano.falcioni »

A bit offtopic:
Is it actually true that brouter do not support navigation directions?
I said so in the first post as I remember to have it read somewhere in the brouter site, but looking by chance at their code seems they sort of handle it:
https://github.com/abrensch/brouter/blo ... eHint.java
Again, I don't know how it work and neither the interface exposed, but the functionality look like is there.
Psyberia-Support
Site Admin
Posts: 6406
Joined: Wed Apr 14, 2010 9:41 pm

Re: Integrated offline autorouting with graphhopper

Post by Psyberia-Support »

I think that BRouter is able to generate turn by turn instructions.
AQ does not request them because it doesn't output them.
Maybe later it will be a thing, but for an app that got "Off-road" on it's name, turn by turn instructions are not the top priority right now :D
Do you like AlpineQuest ? Leave a small comment on Google Play !
Post Reply