Remove a weighting dynamically from Algorithm Options?

Is it possible to remove a custom weighting while supplying the algoOpts to the createAlgo method? Where should I be looking to customise this if it doesn’t exist already?

I don’t really understand the question, but you should be able to extend GraphHopper to do almost everything you want. I would probably start at the createAlgo method or the place where this method gets called.


This is my calcPaths method where I can dynamically add a weigthing to my algoOpts,

AvoidEdgesWeighting avoidPathWeighting = new AvoidEdgesWeighting(algoOpts.getWeighting());
	algoOpts = AlgorithmOptions.start(algoOpts).algorithm(Parameters.Algorithms.ASTAR_BI)

Now what if my want to remove a weighting instead of adding?

I think I figured it out. Instead of adding the weighting all at once I can add the weighting only when needed just like the
createTurnWeighting the Graphhopper class