[GraphHopper] Map-matching Android

Robin Hunter robin at crml.com
Fri Jun 19 11:50:19 UTC 2015


Hi,

Getting close but another small issue.

When I generate the map file it creates a properties file that contains 
the accept string: 
car|speedFactor=5.0|speedBits=5|turnCosts=false|version=1, this will not 
compare as an exact lower case match to the encodingManager which is 
expecting only car|speedFactor=5.0|speedBits=5|turnCosts=false

This is in the method loadExisting() in GraphHopperStorage.

How can I either add the |version=1 to the encodingManager or drop the 
|version=1 from the properties file?

Many thanks,

Robin





On 2015-06-19 08:11, Peter wrote:
> Hi Robin,
> 
> as there was a problem in the Readme, would you just read and try 
> again?
> See also:
> https://github.com/graphhopper/map-matching/issues/25
> 
>> 2) Secondly, I did include graphHopper.setCHEnable(false);
> 
> You will definitely need this, but make sure you also disable ch when
> you import the pbf on your desktop, e.g. in the config.properties with:
> 
> prepare.chWeighting=no
> 
>> noting that it seems that the javax XML code will not allow an OSM map
> to be loaded directly in Android
> 
> Yes, it does not work yet. But currently there was no high demand yet 
> as
> importing it on the device requires lots of memory.
> 
> Regards,
> Peter
> 
> On 19.06.2015 08:58, Robin Hunter wrote:
>> Hi,
>> 
>> I have a full -gh directory so that graphhopper on Android will load
>> the map (noting that it seems that the javax XML code will not allow
>> an OSM map to be loaded directly in Android) and I am now trying to
>> get the map-matching working.
>> 
>> This fails in one of two ways -
>> 
>> 1) Firstly, I did not include graphHopper.setCHEnable(false);
>> 
>> In this instance the graph is loaded as a LevelGraphStorage type but
>> this is not allowed in the LocationIndexTree constructor and I cannot
>> find a mechanism to get the baseGraph passed that does not cause a
>> error, for example class cast exception.
>> 
>> 2) Secondly, I did include graphHopper.setCHEnable(false);
>> 
>> In this instance I get Cannot load the graph when using instance of
>> com.graphhopper.storage.GraphHopperStorage due to a hashcode
>> verification check in loadNodesHeader().
>> 
>> 
>> 
>> So far I have not found a mechanism to get to the point where I can
>> create a MapMatching object.
>> 
>> Any help appreciated.
>> 
>> Thanks,
>> 
>> Robin
>> 
>> _______________________________________________
>> GraphHopper mailing list
>> GraphHopper at openstreetmap.org
>> https://lists.openstreetmap.org/listinfo/graphhopper
> 
> 
> _______________________________________________
> GraphHopper mailing list
> GraphHopper at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/graphhopper



More information about the GraphHopper mailing list