Class CustomModelParser

java.lang.Object
com.graphhopper.routing.weighting.custom.CustomModelParser

public class CustomModelParser extends Object
  • 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-else block.
    • createWeightingParameters

      public static CustomWeighting.Parameters createWeightingParameters(CustomModel customModel, EncodedValueLookup lookup)
      This method compiles a new subclass of CustomWeightingHelper composed from the provided CustomModel caches this and returns an instance.
    • findVariablesForEncodedValuesString

      public static List<String> findVariablesForEncodedValuesString(CustomModel model, NameValidator nameValidator, ClassHelper classHelper)