I’m quite new with graphhopper. I would like to use graphhopper’s routing engine to generate routes, weighted by existing gpx tracks: the more a way has been taken, the more its weight will be important.
I already have my weights for all OSM way, stored in a Postgis database with the OSM ways IDs, and I know would like to add them to graphhopper.
For this, I saw 2 options :
Adding a new encoded value to graphhopper and creting a new flag, and then use it in a custom model
Creating a new weighting class, like the FastestWeighting, that includes my own weight
Which option would you recommend? Is there any other option to do so?
Is there any existing tutorial or documentation decribing how to create an EncodedValue ?
I’ve found some discussions detailling some of the classes to extend here :
I tried to inspire from this discussions, and develop new java classes, but I’m not sure if I’m going the right way.
I created an EncodedValue file, extended the EncodedValueFactory with my new EV, and extend the TagParser class with a CustomTagParser, but it didn’t worked yet