Repository navigation
Description
-
To enable
ch, you just need to callsetCHEnabled. For landmarks you have to callsetWeightingsAsStrings(Collections.singletonList("fastest"))in addition togh.getLMFactoryDecorator().setEnabled(true), because opposite toCHAlgoFactoryDecorator(setWeightingsAsStrings(Arrays.asList(getDefaultWeighting()))),LMAlgoFactoryDecoratordoesn't havefastestas default value. -
Method
loadOrPrepareLMon mobile leads to errorWrites are not allowed!because ifsetAllowWrites(false)(Locus add-on does it), error will be thrown even if landmarks is already prepared (no need to setprepare.lm.done=true— it is already set and data prepared). -
If I understand correctly, for prepared landmarks algo
DIJKSTRA_BIshould be used, right? But logic to select default algo if not specified explicitlyalgoStr = chFactoryDecorator.isEnabled() && !disableCH ? DIJKSTRA_BI : ASTAR_BIis outdated and not correct, right (https://github.com/graphhopper/graphhopper/blob/master/core/src/main/java/com/graphhopper/GraphHopper.java#L1001
)? Well, I tried to explicitly specifyDIJKSTRA_BIand still unacceptable slow.
Without landmarks car routing from Germany to Italy is unacceptable slow (did not wait for results). After
gh.getLMFactoryDecorator().setEnabled(true);
gh.getLMFactoryDecorator().setWeightingsAsStrings(Collections.singletonList("fastest"));
gh.setAllowWrites(true);
on locus add-on side I hope landmarks is enabled, but still routing cannot be finished. e.g. for 600 km bike it is finished in the same time as for car 70 km. And for 600 km car routing time is endless.
In https://www.graphhopper.com/blog/2017/08/14/flexible-routing-15-times-faster/ I see "Still the speed of contraction hierarchies is ~10 times faster on average" and probably it means that you cannot do car routing on mobile with turn restrictions at the moment (sorry, it is off topic here, since I have to discuss about it not in the GitHub issues, but for me not yet clear — will be still so slow when all mentioned bugs will be fixed).
My landmarks: https://s3.eu-central-1.amazonaws.com/gh-routing-data/2018-06-17/we-ce-europe.osm-gh.zip (coverage https://umap.openstreetmap.fr/en/map/europe-region-1-coverage_228183)
Activity
karussell commentedon Jun 29, 2018
Thanks for writing & finding these issues. Yes, the usage needs to improve!
You can try the experimental branch #1247 and see how it performs in comparison? Any constructive feedback in this early stage would be very helpful.
landmark uses bidirectional A*. In fact landmarks is bidir A* with 'just' a different heuristic.
In general getting feedback from people using GraphHopper on mobile devices is highly appreciated. E.g. loading big files into memory mapped storage is still a huge issue that IMO we can solve only if we go partially native for a special DataAccess object as Android blocks requesting memory mapped files at a certain limit per application on Android.
karussell commentedon Jul 30, 2020
This should be improved with the refactorings in 1.0 and later.