[GraphHopper] Problem with the type of te path (Car, pedestrians, bike)

Peter K peathal at yahoo.de
Mon Oct 21 14:40:36 UTC 2013


Hi Bruno,

some things to clarify:

 * if you need CH you need the preparation step (your graph size will
double roughly) and you are tight to only one vehicle
 * Now, if you setup GraphHopper on Android to use FOOT (and CH) you
have to use FOOT for the preparation step which you do on your desktop
computer
 * if you don't need CH you could import all vehicles and query what you
like

> GraphHopper tmpHopp = new GraphHopper().forMobile();

That is just a convenience method. Have a look at the source to get
better understanding of it.

> "An error happend while creating graph:Encoding does not match
Graphhopper config: foot:com.graphhopper.routing.util.FootFlagEncoder
Graph: car:com.graphhopper.routing.util.CarFlagEncoder"


You are trying to load an already imported graph (where only car was
imported) with configuration 'foot'. Just drop the graphhopper folder on
disc and re-run the import procedure for the new config.

Regards,
Peter.


> Hi Petter,
> thanks for the quick response :)
>
> I have a few questions related of what you sayd,
> I'm making the app for android offline, so i'm using the 
>
> GraphHopper tmpHopp = new GraphHopper().forMobile(); 
>
> I probably cant use as it is showed in the GraphHopperTest 
>
> instance = new GraphHopper().init(
>
>                 new CmdArgs().
>
>                 put("osmreader.acceptWay", "FOOT,CAR"). ...
>
> I used the Java API and try to do it in the code
>
> hopper.setEncodingManager(new EncodingManager("FOOT")) 
>
> i got an error and i'm thinkind the problem is with the .map e got from my contry that probably dont have FOOT option
>
> "An error happend while creating graph:Encoding does not match Graphhopper config: foot:com.graphhopper.routing.util.FootFlagEncoder Graph: car:com.graphhopper.routing.util.CarFlagEncoder"
>
> just to check i take out the setEncodingManager and read the log while its working
>
> Tag: GH  
>
> Text: found graph LevelGraphStorage|car|MMAP_STORE|1,2,1,1,1,1, nodes 562252"
>
>
> do you think i'm having a problem with the project or maybe i downloaded a map that doesnt have the foot option?
>
> i download the Portugal information from the website you have in the Android Demo
> http://download.geofabrik.de/europe.html
>
>
>
>
>
>
>
>
>
> On Mon, Oct 21, 2013 at 1:32 PM, Peter K <peathal at yahoo.de
> <mailto:peathal at yahoo.de>> wrote:
>
>     Hi Bruno,
>
>
>     > There is more documentation about the Graphhopper?
>
>     The unit tests and the wiki are for documentation
>
>
>
>     > How can i change the routing for pedestrians instead of routing
>     for Cars?
>
>     You can configure this in the config.properties or if you prefer
>     the Java API do
>     hopper.setEncodingManager(new EncodingManager("FOOT"))
>     or see the GraphHopperTest and how to specify the
>     osmreader.acceptWay property
>
>
>
>     > Do i need to create the routing data specifically for
>     pedestrians before put the -gh info in the SD card?
>
>     Only if you use the speed up technic 'contraction hierarchies',
>     which is the default. Disable it via config.properties or
>     hopper.disableCHShortcuts()
>
>     Regards,
>     Peter.
>
>
>>     Hello,
>>
>>     I'm trying to create an app for android that show the route for
>>     pedestrians.
>>     I now have Graphhopper prepared and running in my Android device
>>     as the examples are show in the Android Demo.
>>
>>     There is more documentation about the Graphhopper? 
>>     How can i change the routing for pedestrians instead of routing
>>     for Cars?
>>
>>     I saw in the Low Level API
>>     "EncodingManagerem=newEncodingManager("CAR");",
>>     do i need to do something like this but for pedestrian´s? Do i
>>     need to create the routing data specifically for pedestrians
>>     before put the -gh info in the SD card?
>>
>>     Sorry for the bad English and thanks in advance,
>>
>>     Best Regards,
>>     Bruno
>>
>
>
>     _______________________________________________
>     GraphHopper mailing list
>     GraphHopper at openstreetmap.org <mailto:GraphHopper at openstreetmap.org>
>     https://lists.openstreetmap.org/listinfo/graphhopper
>
>
>
>
> -- 
> t
>
>
> _______________________________________________
> 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/20131021/a90b8a06/attachment.html>


More information about the GraphHopper mailing list