Class CustomModelParser
java.lang.Object
com.graphhopper.routing.weighting.custom.CustomModelParser
-
Method Summary
Modifier and TypeMethodDescriptionstatic CustomWeighting
createWeighting
(EncodedValueLookup lookup, TurnCostProvider turnCostProvider, CustomModel customModel) This method creates a weighting from a CustomModel that must limit the speed.static CustomWeighting2
createWeighting2
(EncodedValueLookup lookup, TurnCostProvider turnCostProvider, CustomModel customModel) static CustomWeighting.Parameters
createWeightingParameters
(CustomModel customModel, EncodedValueLookup lookup) This method compiles a new subclass of CustomWeightingHelper composed of the provided CustomModel caches this and returns an instance.findVariablesForEncodedValuesString
(CustomModel model, NameValidator nameValidator, ClassHelper classHelper)
-
Method Details
-
createWeighting
public static CustomWeighting createWeighting(EncodedValueLookup lookup, TurnCostProvider turnCostProvider, CustomModel customModel) This method creates a weighting from a CustomModel that must limit the speed. Either as an unconditional statement{ "if": "true", "limit_to": "car_average_speed" }
or as an if-elseif-else group.
-
createWeighting2
public static CustomWeighting2 createWeighting2(EncodedValueLookup lookup, TurnCostProvider turnCostProvider, CustomModel customModel) -
createWeightingParameters
public static CustomWeighting.Parameters createWeightingParameters(CustomModel customModel, EncodedValueLookup lookup) This method compiles a new subclass of CustomWeightingHelper composed of the provided CustomModel caches this and returns an instance. -
findVariablesForEncodedValuesString
public static List<String> findVariablesForEncodedValuesString(CustomModel model, NameValidator nameValidator, ClassHelper classHelper)
-