Class CustomModelParser
java.lang.Object
com.graphhopper.routing.weighting.custom.CustomModelParser
-
Method Summary
Modifier and TypeMethodDescriptionstatic CustomWeightingcreateWeighting(EncodedValueLookup lookup, TurnCostProvider turnCostProvider, CustomModel customModel) This method creates a weighting from a CustomModel that must limit the speed.static CustomWeighting.ParameterscreateWeightingParameters(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. -
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)
-