# OpenRailRouting Configuration for Africa
# Based on default OpenRailRouting config

graphhopper:
  import.osm.ignored_highways: ''

  # OpenStreetMap input file - Africa
  datareader.file: /data/africa-latest.osm.pbf
  graph.location: /data/graph-cache

  ##### Routing Profiles ####

  profiles:
    - name: tgv_all
      turn_costs:
        vehicle_types: [train]
        u_turn_costs: 300
      custom_model_files: [rail.json, tgv_all.json, preferred_direction.json]
    - name: non_tgv
      turn_costs:
        vehicle_types: [train]
        u_turn_costs: 900
      custom_model_files: [rail.json, non_tgv.json, preferred_direction.json]
    - name: tramtrain
      turn_costs:
        vehicle_types: [train, tram, light_rail]
        u_turn_costs: 180
      custom_model_files: [tramtrain.json, 15kv-ac_750v-dc.json, gauge_1435.json, preferred_direction.json]
    - name: all_tracks
      turn_costs:
        vehicle_types: [train, tram, light_rail, subway]
        u_turn_costs: 180
      custom_model_files: [all_tracks.json]
    - name: all_tracks_1435
      turn_costs:
        vehicle_types: [train, tram, light_rail, subway]
        u_turn_costs: 180
      custom_model_files: [all_tracks.json, gauge_1435.json]

  # Use builtin custom_models from JAR
  # custom_models.directory: custom_models

  profiles_ch:
    - profile: tgv_all
    - profile: non_tgv
    - profile: tramtrain
    - profile: all_tracks
    - profile: all_tracks_1435

  profiles_lm: []

  #### Encoded Values ####
  graph.encoded_values: gauge,voltage,electrified,frequency,road_environment,max_speed,rail_access,rail_average_speed,railway_class,railway_service,preferred_direction

  prepare.min_network_size: 200
  prepare.subnetworks.threads: 1

  routing.non_ch.max_waypoint_distance: 1000000

  graph.dataaccess.default_type: RAM_STORE

server:
  application_connectors:
    - type: http
      port: 8988
      bind_host: 0.0.0.0
      max_request_header_size: 50k
  request_log:
    appenders: []
  admin_connectors:
    - type: http
      port: 8990
      bind_host: 0.0.0.0

logging:
  level: INFO
  appenders:
    - type: console
      time_zone: UTC
      log_format: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
  loggers:
    "com.graphhopper.osm_warnings":
      level: DEBUG
      additive: false
      appenders:
        - type: console
          logFormat: '[%level] %msg%n'
