Enabling foot profiles

Hi all,

I’m trying to deploy graphhopper locally using docker and am having trouble getting profiles other than “car” to show up, mainly foot (relevant bits of config.yml below). Whenever I start a server and check the /info endpoint, I only see the “car” profile under the profiles though. Am I missing something?

graphhopper:


  ##### Routing Profiles ####

  # Routing can be done only for profiles listed below. For more information about profiles and custom profiles have a
  # look into the documentation at docs/core/profiles.md or the examples under web/src/test/java/com/graphhopper/application/resources/
  # or the CustomWeighting class for the raw details.
  #
  # In general a profile consists of the following
  # - name (required): a unique string identifier for the profile
  # - vehicle (required): refers to the `graph.vehicles` used for this profile
  # - weighting (required): the weighting used for this profile like custom
  # - turn_costs (true/false, default: false): whether or not turn restrictions should be applied for this profile.
  #
  # Depending on the above fields there are other properties that can be used, e.g.
  # - u_turn_costs: 60 (time-penalty for doing a u-turn in seconds (only possible when `turn_costs: true`)).
  # - custom_model_files: when you specified "weighting: custom" you need to set one or more json files which are searched in
  #   custom_models.directory or the working directory that defines the custom_model. If you want an empty model you can
  #   set "custom_model_files: []
  #   You can also use the `custom_model` field instead and specify your custom model in the profile directly.
  #
  # To prevent long running routing queries you should usually enable either speed or hybrid mode for all the given
  # profiles (see below). Or at least limit the number of `routing.max_visited_nodes`.

  profiles:
    - name: car
      vehicle: car
      custom_model:
        distance_influence: 70
#      turn_costs: true
#      u_turn_costs: 60
    - name: foot
      vehicle: foot
      custom_model_files: [foot_elevation.json]
#    - name: bike
#      # to use the bike vehicle make sure to not ignore cycleways etc., see import.osm.ignored_highways below
#      vehicle: bike
#      custom_model_files: [bike.json, bike_elevation.json]

  # instead of the inbuilt custom models (see ./core/src/main/resources/com/graphhopper/custom_models)
  # you can specify a folder where to find your own custom model files
  # custom_models.directory: custom_models

  # Speed mode:
  # Its possible to speed up routing by doing a special graph preparation (Contraction Hierarchies, CH). This requires
  # more RAM/disk space for holding the prepared graph but also means less memory usage per request. Using the following
  # list you can define for which of the above routing profiles such preparation shall be performed. Note that to support
  # profiles with `turn_costs: true` a more elaborate preparation is required (longer preparation time and more memory
  # usage) and the routing will also be slower than with `turn_costs: false`.
  profiles_ch:
    - profile: car
    - profile: foot

  # Hybrid mode:
  # Similar to speed mode, the hybrid mode (Landmarks, LM) also speeds up routing by doing calculating auxiliary data
  # in advance. Its not as fast as speed mode, but more flexible.
  #
  # Advanced usage: It is possible to use the same preparation for multiple profiles which saves memory and preparation
  # time. To do this use e.g. `preparation_profile: my_other_profile` where `my_other_profile` is the name of another
  # profile for which an LM profile exists. Important: This only will give correct routing results if the weights
  # calculated for the profile are equal or larger (for every edge) than those calculated for the profile that was used
  # for the preparation (`my_other_profile`)
  profiles_lm: []


  #### Vehicles ####

  # The vehicle defines the base for how the routing of a profile behaves. It can be adjusted with the turn_costs=true
  # option or, only for the roads vehicle, there is the transportation_mode option:
  # name=mycustomvehicle,turn_costs=true,transportation_mode=MOTOR_VEHICLE
  # But you should prefer to configure the turn_costs via the profile configuration.
  # Other standard vehicles: foot,bike,mtb,racingbike,wheelchair


  #### Storage ####

  # Excludes certain types of highways during the OSM import to speed up the process and reduce the size of the graph.
  # A typical application is excluding 'footway','cycleway','path' and maybe 'pedestrian' and 'track' highways for
  # motorized vehicles. This leads to a smaller and less dense graph, because there are fewer ways (obviously),
  # but also because there are fewer crossings between highways (=junctions).
  # Another typical example is excluding 'motorway', 'trunk' and maybe 'primary' highways for bicycle or pedestrian routing.
  import.osm.ignored_highways: cycleway # typically useful for motorized-only routing
  # import.osm.ignored_highways: motorway,trunk # typically useful for non-motorized routing

  # configure the memory access, use RAM_STORE for well equipped servers (default and recommended)
  graph.dataaccess.default_type: RAM_STORE

  # will write way names in the preferred language (language code as defined in ISO 639-1 or ISO 639-2):
  # datareader.preferred_language: en

  # Sort the graph after import to make requests roughly ~10% faster. Note that this requires significantly more RAM on import.
  # graph.do_sort: true

When you start with car-only then you have to remove the graph cache folder after most config changes. With the docker image you can specify it like

-Ddw.graphhopper.graph.location=berlin-gh 

I.e. you have to remove berlin-gh.

Hmm I tried this but am still not seeing any profiles come up besides the car at the /info endpoint. Any other possibilities?

Either an incorrect config.yml is picked up from GraphHopper or the graph folder still exists. You could contact the docker image authors for any more ideas.

Thanks for the help - I’ll see if they have any ideas.