# GraphHopper Configuration (v9+ format)
# Documentation: https://github.com/graphhopper/graphhopper/blob/master/docs/core/deploy.md

graphhopper:
  # OSM data - start with Africa only
  datareader.file: /data/africa-latest.osm.pbf
  graph.location: /data/graph-cache

  # Encoded values for routing
  graph.encoded_values: car_access,car_average_speed,road_class,road_environment

  # Routing profiles (v9+ format - no "vehicle", use custom_model)
  profiles:
    - name: car
      turn_costs:
        vehicle_types: ["motorcar"]
      custom_model:
        priority:
          - if: "!car_access"
            multiply_by: "0"
        speed:
          - if: "true"
            limit_to: "car_average_speed"

    - name: truck
      turn_costs:
        vehicle_types: ["hgv"]
      custom_model:
        priority:
          - if: "!car_access"
            multiply_by: "0"
        speed:
          - if: "true"
            limit_to: "car_average_speed * 0.85"

  # CH (Contraction Hierarchies) for fast queries
  profiles_ch:
    - profile: car

  # LM (Landmarks) for flexible queries and isochrones
  profiles_lm:
    - profile: car
    - profile: truck

  # Import settings
  import.osm.ignored_highways: footway,cycleway,path,pedestrian,steps

server:
  application_connectors:
    - type: http
      port: 8989
      bind_host: 0.0.0.0
  admin_connectors:
    - type: http
      port: 8990
      bind_host: 0.0.0.0
