Advertisement
Guest User

Untitled

a guest
Mar 30th, 2023
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.79 KB | None | 0 0
  1. graphhopper:
  2.  
  3. # OpenStreetMap input file PBF or XML, can be changed via command line -Ddw.graphhopper.datareader.file=some.pbf
  4. datareader.file: ""
  5. # Local folder used by graphhopper to store its data
  6. graph.location: graph-cache
  7.  
  8. ##### Vehicles #####
  9.  
  10.  
  11. # More options: foot,hike,bike,bike2,mtb,racingbike,motorcycle,car4wd,wheelchair (comma separated)
  12. # bike2 takes elevation data into account (like up-hill is slower than down-hill) and requires enabling graph.elevation.provider below.
  13. # graph.flag_encoders: car
  14. graph.vehicles: roads|transportation_mode=BUS,car
  15. # Enable turn restrictions for car or motorcycle.
  16. # graph.flag_encoders: car|turn_costs=true
  17.  
  18. # Add additional information to every edge. Used for path details (#1548), better instructions (#1844) and tunnel/bridge interpolation (#798).
  19. # Default values are: road_class,road_class_link,road_environment,max_speed,road_access (since #1805)
  20. # More are: surface,max_width,max_height,max_weight,max_axle_load,max_length,hazmat,hazmat_tunnel,hazmat_water,toll,track_type,
  21. # mtb_rating,hiking_rating,horse_rating,lanes
  22. # graph.encoded_values: surface,toll,track_type
  23. graph.encoded_values: max_width,max_height
  24. ##### Routing Profiles ####
  25.  
  26. # Routing can be done for the following list of profiles. Note that it is required to specify all the profiles you
  27. # would like to use here. The fields of each profile are as follows:
  28. # - name (required): a unique string identifier for the profile
  29. # - vehicle (required): refers to the `graph.flag_encoders` used for this profile
  30. # - weighting (required): the weighting used for this profile, e.g. fastest,shortest or short_fastest
  31. # - turn_costs (true/false, default: false): whether or not turn restrictions should be applied for this profile.
  32. # this will only work if the `graph.flag_encoders` for the given `vehicle` is configured with `|turn_costs=true`.
  33. #
  34. # Depending on the above fields there are other properties that can be used, e.g.
  35. # - distance_factor: 0.1 (can be used to fine tune the time/distance trade-off of short_fastest weighting)
  36. # - u_turn_costs: 60 (time-penalty for doing a u-turn in seconds (only possible when `turn_costs: true`)).
  37. # Note that since the u-turn costs are given in seconds the weighting you use should also calculate the weight
  38. # in seconds, so for example it does not work with shortest weighting.
  39. # - custom_model_file: when you specified "weighting: custom" you need to set a yaml or json file inside your custom_model_folder
  40. # or working directory that defines the custom_model. If you want an empty model you can also set "custom_model_file: empty".
  41. # You can also use th e`custom_model` field instead and specify your custom model in the profile directly.
  42. #
  43. # For more information about profiles and especially custom profiles have a look into the documentation
  44. # at docs/core/profiles.md or the examples under web/src/test/resources/com/graphhopper/http/resources/ or
  45. # the CustomWeighting class for the raw details.
  46. #
  47. # To prevent long running routing queries you should usually enable either speed or hybrid mode for all the given
  48. # profiles (see below). Otherwise you should at least limit the number of `routing.max_visited_nodes`.
  49. profiles:
  50. - name: bus
  51. vehicle: roads
  52. weighting: custom
  53. custom_model_file: bus.json
  54.  
  55. # - name: car_with_turn_costs
  56. # vehicle: car
  57. # weighting: short_fastest
  58. # distance_factor: 0.1
  59. # turn_costs: true
  60. # u_turn_costs: 60
  61.  
  62. # Speed mode:
  63. # Its possible to speed up routing by doing a special graph preparation (Contraction Hierarchies, CH). This requires
  64. # more RAM/disk space for holding the prepared graph but also means less memory usage per request. Using the following
  65. # list you can define for which of the above routing profiles such preparation shall be performed. Note that to support
  66. # profiles with `turn_costs: true` a more elaborate preparation is required (longer preparation time and more memory
  67. # usage) and the routing will also be slower than with `turn_costs: false`.
  68. profiles_ch:
  69. - profile: car
  70. # - profile: car_with_turn_costs
  71.  
  72. # Hybrid mode:
  73. # Similar to speed mode, the hybrid mode (Landmarks, LM) also speeds up routing by doing calculating auxiliary data
  74. # in advance. Its not as fast as speed mode, but more flexible.
  75. #
  76. # Advanced usage: It is possible to use the same preparation for multiple profiles which saves memory and preparation
  77. # time. To do this use e.g. `preparation_profile: my_other_profile` where `my_other_profile` is the name of another
  78. # profile for which an LM profile exists. Important: This only will give correct routing results if the weights
  79. # calculated for the profile are equal or larger (for every edge) than those calculated for the profile that was used
  80. # for the preparation (`my_other_profile`)
  81. profiles_lm: []
  82.  
  83. ##### Elevation #####
  84.  
  85.  
  86. # To populate your graph with elevation data use SRTM, default is noop (no elevation). Read more about it in docs/core/elevation.md
  87. # graph.elevation.provider: srtm
  88.  
  89.  
  90. # default location for cache is /tmp/srtm
  91. # graph.elevation.cache_dir: ./srtmprovider/
  92.  
  93.  
  94. # If you have a slow disk or plenty of RAM change the default MMAP to:
  95. # graph.elevation.dataaccess: RAM_STORE
  96.  
  97.  
  98. # To enable bilinear interpolation when sampling elevation at points (default uses nearest neighbor):
  99. # graph.elevation.interpolate: bilinear
  100.  
  101.  
  102. # To increase elevation profile resolution, use the following two parameters to tune the extra resolution you need
  103. # against the additional storage space used for edge geometries. You should enable bilinear interpolation when using
  104. # these features (see #1953 for details).
  105. # - first, set the distance (in meters) at which elevation samples should be taken on long edges
  106. # graph.elevation.long_edge_sampling_distance: 60
  107. # - second, set the elevation tolerance (in meters) to use when simplifying polylines since the default ignores
  108. # elevation and will remove the extra points that long edge sampling added
  109. # graph.elevation.way_point_max_distance: 10
  110.  
  111.  
  112. #### Speed, hybrid and flexible mode ####
  113.  
  114.  
  115. # To make CH preparation faster for multiple profiles you can increase the default threads if you have enough RAM.
  116. # Change this setting only if you know what you are doing and if the default worked for you.
  117. # prepare.ch.threads: 1
  118.  
  119. # To tune the performance vs. memory usage for the hybrid mode use
  120. # prepare.lm.landmarks: 16
  121.  
  122. # Make landmark preparation parallel if you have enough RAM. Change this only if you know what you are doing and if
  123. # the default worked for you.
  124. # prepare.lm.threads: 1
  125.  
  126. # In many cases the road network consists of independent components without any routes going in between. In
  127. # the most simple case you can imagine an island without a bridge or ferry connection. The following parameter
  128. # allows setting a minimum size (number of edges) for such detached components. This can be used to reduce the number
  129. # of cases where a connection between locations might not be found.
  130. prepare.min_network_size: 200
  131.  
  132.  
  133. ##### Routing #####
  134.  
  135.  
  136. # You can define the maximum visited nodes when routing. This may result in not found connections if there is no
  137. # connection between two points within the given visited nodes. The default is Integer.MAX_VALUE. Useful for flexibility mode
  138. # routing.max_visited_nodes: 1000000
  139.  
  140. # Control how many active landmarks are picked per default, this can improve query performance
  141. # routing.lm.active_landmarks: 4
  142.  
  143. # You can limit the max distance between two consecutive waypoints of flexible routing requests to be less or equal
  144. # the given distance in meter. Default is set to 1000km.
  145. routing.non_ch.max_waypoint_distance: 1000000
  146.  
  147.  
  148. ##### Storage #####
  149.  
  150.  
  151. # configure the memory access, use RAM_STORE for well equipped servers (default and recommended)
  152. graph.dataaccess: RAM_STORE
  153.  
  154.  
  155. # will write way names in the preferred language (language code as defined in ISO 639-1 or ISO 639-2):
  156. # datareader.preferred_language: en
  157.  
  158.  
  159. # Sort the graph after import to make requests roughly ~10% faster. Note that this requires significantly more RAM on import.
  160. # graph.do_sort: true
  161.  
  162.  
  163.  
  164. ##### Spatial Rules #####
  165. # Spatial Rules require some configuration and only work with the DataFlagEncoder.
  166.  
  167.  
  168. # Spatial Rules require you to provide Polygons in which the rules are enforced
  169. # The line below contains the default location for the files which define these borders
  170. # spatial_rules.borders_directory: core/files/spatialrules
  171.  
  172. # You can define the maximum BBox for which spatial rules are loaded.
  173. # You might want to do this if you are only importing a small area and don't need rules for other countries.
  174. # Having less rules, might result in a smaller graph. The line below contains the world-wide bounding box, uncomment and adapt to your need.
  175. # spatial_rules.max_bbox: -180,180,-90,90
  176.  
  177. # Dropwizard server configuration
  178. server:
  179. application_connectors:
  180. - type: http
  181. port: 8989
  182. # for security reasons bind to localhost
  183. #bind_host: localhost
  184. request_log:
  185. appenders: []
  186. admin_connectors:
  187. - type: http
  188. port: 8990
  189. bind_host: localhost
  190. # See https://www.dropwizard.io/1.3.8/docs/manual/configuration.html#logging
  191. logging:
  192. appenders:
  193. - type: file
  194. time_zone: UTC
  195. current_log_filename: logs/graphhopper.log
  196. log_format: "%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
  197. archive: true
  198. archived_log_filename_pattern: ./logs/graphhopper-%d.log.gz
  199. archived_file_count: 30
  200. never_block: true
  201. - type: console
  202. time_zone: UTC
  203. log_format: "%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement