[GraphHopper] optimal route

Peter K peathal at yahoo.de
Fri Oct 25 10:10:58 UTC 2013


Ok, that was one of the reasons it changed (to a simpler method). You'll
need access to the graphhopper instance:

encoder = graphHopper.getEncodingManager().getEncoder(request.getVehicle())
new FastestCalc(encoder)

> Ok!
> How to use new FastestCalc(FlagEncoder ), how  to get FlagEncoder?
>
> ???????, 25 ??????? 2013, 10:22 +02:00 ?? Peter K <peathal at yahoo.de>:
>
>     Hi
>
>>     I tryreq.setType("fastest") but argument must be
>>     WeightCalculation, help please.
>
>     This is the latest master. For your version you need to call new
>     ShortestCalc() or new FastestCalc()
>
>     >
>     http://graphhopper.com/maps/?point=56.848485%2C53.257985&point=56.853607%2C53.279529&locale=en-US
>
>     The cause is the missing implicit speed limitation for cities and
>     villages. So, the smaller road looks faster for GH as on the
>     bigger road there is an explicit speed limit (60 km/h). Feel free
>     to create an issue.
>
>     Regards,
>     Peter.
>
>>     I tryreq.setType("fastest") but argument must be
>>     WeightCalculation, help please.
>>
>>
>>     ???????, 25 ??????? 2013, 11:23 +04:00 ?? ??????? ??????
>>     <d-puchkov at mail.ru>:
>>
>>         thanks for this hint request.setType("fastest"|"shortest").
>>         I mean that the route is built not on a main road.
>>         http://graphhopper.com/maps/?point=56.848485%2C53.257985&point=56.853607%2C53.279529&locale=en-US
>>
>>         ???????, 25 ??????? 2013, 8:59 +02:00 ?? Peter K
>>         <peathal at yahoo.de>:
>>
>>             Hi,
>>
>>             if you use CH you can set this only up-front (when
>>             preparing the graph). If not, you can do
>>             request.setType("fastest"|"shortest") ... what do you
>>             mean with optimal?
>>
>>             Regards,
>>             Peter.
>>
>>>             Hi!
>>>             I use graphhopper on android and use it:
>>>             GHRequest req = new GHRequest(fromLat, fromLon, toLat,
>>>                                       
>>>              toLon).setAlgorithm("dijkstrabi").putHint(
>>>                                         "douglas.minprecision", 1);
>>>             GHResponse resp = hopper.route(req);
>>>
>>>             Can I choose which route to build? the shortest or the
>>>             fastest or the optimal?
>>>             -- 
>>>             ??????? ??????
>>>
>>>
>
>     _______________________________________________
>     GraphHopper mailing list
>     GraphHopper at openstreetmap.org
>     <sentmsg?compose&To=GraphHopper at openstreetmap.org>
>     https://lists.openstreetmap.org/listinfo/graphhopper
>
>
>
> -- 
> ??????? ??????
>
>
> _______________________________________________
> GraphHopper mailing list
> GraphHopper at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/graphhopper

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/graphhopper/attachments/20131025/cd779865/attachment.html>


More information about the GraphHopper mailing list