From d07707288549dca5dd03df316e76e208ebba160b Mon Sep 17 00:00:00 2001 From: Jochen Haeussler Date: Wed, 27 Mar 2024 18:51:55 +0100 Subject: [PATCH 01/23] fix: move yml properties to defaults where possible --- ors-api/src/main/resources/application.yml | 24 ++-------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/ors-api/src/main/resources/application.yml b/ors-api/src/main/resources/application.yml index 831d261efd..6c0801d81b 100644 --- a/ors-api/src/main/resources/application.yml +++ b/ors-api/src/main/resources/application.yml @@ -119,7 +119,7 @@ ors: cache_path: ./elevation_cache profile_default: enabled: false - elevation: false + elevation: true elevation_smoothing: false encoder_flags_size: 8 instructions: true @@ -151,10 +151,9 @@ ors: lm: active_landmarks: 8 profiles: + # All properties defined in ors.engine.profile_default can also be set in each profile to overwrite the defaults profile-specific. car: - enabled: false profile: driving-car - elevation: true encoder_options: turn_costs: true block_fords: false @@ -190,15 +189,11 @@ ors: RoadAccessRestrictions: use_for_warnings: true hgv: - enabled: false profile: driving-hgv - encoder_flags_size: 8 encoder_options: turn_costs: true block_fords: false use_acceleration: true - maximum_distance: 100000 - elevation: true preparation: min_network_size: 200 methods: @@ -222,85 +217,71 @@ ors: restrictions: true WaySurfaceType: bike-regular: - enabled: false profile: cycling-regular encoder_options: consider_elevation: true turn_costs: true block_fords: false - elevation: true ext_storages: WayCategory: WaySurfaceType: HillIndex: TrailDifficulty: bike-mountain: - enabled: false profile: cycling-mountain encoder_options: consider_elevation: true turn_costs: true block_fords: false - elevation: true ext_storages: WayCategory: WaySurfaceType: HillIndex: TrailDifficulty: bike-road: - enabled: false profile: cycling-road encoder_options: consider_elevation: true turn_costs: true block_fords: false - elevation: true ext_storages: WayCategory: WaySurfaceType: HillIndex: TrailDifficulty: bike-electric: - enabled: false profile: cycling-electric encoder_options: consider_elevation: true turn_costs: true block_fords: false - elevation: true ext_storages: WayCategory: WaySurfaceType: HillIndex: TrailDifficulty: walking: - enabled: false profile: foot-walking encoder_options: block_fords: false - elevation: true ext_storages: WayCategory: WaySurfaceType: HillIndex: TrailDifficulty: hiking: - enabled: false profile: foot-hiking encoder_options: block_fords: false - elevation: true ext_storages: WayCategory: WaySurfaceType: HillIndex: TrailDifficulty: wheelchair: - enabled: false profile: wheelchair encoder_options: block_fords: true - elevation: true maximum_snapping_radius: 50 ext_storages: WayCategory: @@ -309,7 +290,6 @@ ors: KerbsOnCrossings: true OsmId: public-transport: - enabled: false profile: public-transport encoder_options: block_fords: false From fda54821c205ac5864d0f5dcde2d7a4c3efaafc2 Mon Sep 17 00:00:00 2001 From: Jochen Haeussler Date: Wed, 27 Mar 2024 18:53:43 +0100 Subject: [PATCH 02/23] fix: fix evaluation of 'enabled' in profile_default --- .../src/main/java/org/heigit/ors/api/EngineProperties.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ors-api/src/main/java/org/heigit/ors/api/EngineProperties.java b/ors-api/src/main/java/org/heigit/ors/api/EngineProperties.java index fd8ac178bb..b3acb8b8df 100644 --- a/ors-api/src/main/java/org/heigit/ors/api/EngineProperties.java +++ b/ors-api/src/main/java/org/heigit/ors/api/EngineProperties.java @@ -100,12 +100,13 @@ public RouteProfileConfiguration[] getConvertedProfiles() { if (profiles != null) { for (Map.Entry profileEntry : profiles.entrySet()) { ProfileProperties profile = profileEntry.getValue(); - if (!profile.isEnabled()) { + boolean enabled = profile.enabled != null ? profile.enabled : profileDefault.isEnabled(); + if (!enabled) { continue; } RouteProfileConfiguration convertedProfile = new RouteProfileConfiguration(); convertedProfile.setName(profileEntry.getKey()); - convertedProfile.setEnabled(profile.enabled != null ? profile.enabled : profileDefault.isEnabled()); + convertedProfile.setEnabled(enabled); convertedProfile.setProfiles(profile.getProfile()); String graphPath = profile.getGraphPath(); String rootGraphsPath = getGraphsRootPath(); From 277d2c36dca3d47f2612c016453124c0b4697a5a Mon Sep 17 00:00:00 2001 From: Jochen Haeussler Date: Wed, 27 Mar 2024 18:54:54 +0100 Subject: [PATCH 03/23] feat: adapt conversion to changed application.yml --- .github/utils/yml_config_to_ors_config_conversion.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/utils/yml_config_to_ors_config_conversion.sh b/.github/utils/yml_config_to_ors_config_conversion.sh index 2a73095832..a59c2be124 100755 --- a/.github/utils/yml_config_to_ors_config_conversion.sh +++ b/.github/utils/yml_config_to_ors_config_conversion.sh @@ -18,9 +18,6 @@ cp $input_file $output_file echo "" echo "Replace parameters:" -echo "- enable ors.engine.profiles.car" -yq -i '.ors.engine.profiles.car.enabled = true' "$output_file" || exit 1 - echo "- set ors.engine.source_file to ors-api/src/test/files/heidelberg.osm.gz" yq -i '.ors.engine.source_file = "ors-api/src/test/files/heidelberg.osm.gz"' "$output_file" || exit 1 @@ -37,6 +34,10 @@ echo "- Uncomment ors, engine and source_file" sed -i -e '/^#ors:/s/^#//' -e '/^#.*engine:/s/^#//' -e '/^#.*source_file:/s/^#//' "$output_file" echo "- Uncomment subsequent lines for profiles.car.enabled in ors.engine" -sed -i -e '/^# profiles:/,/^# enabled:/ s/^#//' "$output_file" +sed -i -e 's/^# profiles:/ profiles:/' "$output_file" +sed -i -e 's/^# car:/ car:/' "$output_file" + +echo "- enable ors.engine.profiles.car" +yq -i '.ors.engine.profiles.car.enabled = true' "$output_file" || exit 1 echo "Parsing complete. Result saved to $output_file" From 5755e610e8e823d6ef8c351ea115468d092eb5cb Mon Sep 17 00:00:00 2001 From: Jochen Haeussler Date: Wed, 27 Mar 2024 18:55:30 +0100 Subject: [PATCH 04/23] feat: add config tests for profile_default --- .github/workflows/integration-tests.yml | 2 +- .../debian-12-jar-mvn/files/testfunctions.sh | 32 +++++++++++++++-- .../tests/build-all-graphs.sh | 2 +- .../tests/profile-default-enabled-true.sh | 29 +++++++++++++++ .../profile-default-maximum-properties.sh | 36 +++++++++++++++++++ 5 files changed, 96 insertions(+), 5 deletions(-) create mode 100755 .integration-scenarios/debian-12-jar-mvn/tests/profile-default-enabled-true.sh create mode 100755 .integration-scenarios/debian-12-jar-mvn/tests/profile-default-maximum-properties.sh diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 355f06a397..11bb4f248c 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -62,7 +62,7 @@ jobs: strategy: matrix: runtype: [ '-m' , '-j' ] - testgroup: [ build-all-graphs*, arg-overrides*, check*, config*, lookup*, missing*, specify* ] + testgroup: [ build-all-graphs*, arg-overrides*, check*, config*, lookup*, missing*, specify*, profile-default* ] steps: - uses: actions/checkout@v4 with: diff --git a/.integration-scenarios/debian-12-jar-mvn/files/testfunctions.sh b/.integration-scenarios/debian-12-jar-mvn/files/testfunctions.sh index 85d14536bd..5552fee9ce 100755 --- a/.integration-scenarios/debian-12-jar-mvn/files/testfunctions.sh +++ b/.integration-scenarios/debian-12-jar-mvn/files/testfunctions.sh @@ -85,20 +85,46 @@ function expectOrsStartupFails() { fi } +function assertSortedWordsEquals() { + expected=$1 + received=$2 + sorted_expected=$(echo "$expected" | tr ' ' '\n' | sort | tr '\n' ' ') + sorted_received=$(echo "$received" | tr ' ' '\n' | sort | tr '\n' ' ') + assertEquals "$sorted_expected" "$sorted_received" +} + function assertEquals() { expected=$1 received=$2 + check=$3 + if [ -n "$check" ]; then checkMsg="Checking '$check': "; fi if [ "$expected" != "$received" ]; then - echo -e "${FG_RED}ASSERTION ERROR:${N}" + echo -e "${FG_RED}ASSERTION ERROR:${N} ${checkMsg}" echo -e "expected: '${FG_GRN}${expected}${N}'" echo -e "received: '${FG_RED}${received}${N}'" exit 1 else - echo -e "${FG_GRN}received '$received' as expected${N}" - exit 0 + echo -e "${FG_GRN}${checkMsg}Received '${received}' as expected${N}" + fi +} + +function assertContains() { + expected=$1 + received=$2 + num=$(echo "${received}" | grep -c "${expected}") + if [[ $num -eq 0 ]]; then + echo -e "${FG_RED}ASSERTION ERROR:${N}: '${expected}' not contained as expected${N} $num" + exit 1 + else + echo -e "${FG_GRN}'${expected}' is contained as expected${N}" fi } +function requestStatusString() { + port=$1 + echo $(curl --silent $(getOrsUrl $port)/status | jq . ) +} + function requestEnabledProfiles() { port=$1 echo $(curl --silent $(getOrsUrl $port)/status | jq -r '.profiles[].profiles') diff --git a/.integration-scenarios/debian-12-jar-mvn/tests/build-all-graphs.sh b/.integration-scenarios/debian-12-jar-mvn/tests/build-all-graphs.sh index 792f52b7f1..43c3cea17a 100755 --- a/.integration-scenarios/debian-12-jar-mvn/tests/build-all-graphs.sh +++ b/.integration-scenarios/debian-12-jar-mvn/tests/build-all-graphs.sh @@ -43,4 +43,4 @@ awaitOrsReady 300 "${HOST_PORT}" profiles=$(requestEnabledProfiles ${HOST_PORT}) cleanupTest -assertEquals "foot-walking wheelchair foot-hiking public-transport cycling-electric cycling-mountain driving-car driving-hgv cycling-regular cycling-road" "${profiles}" \ No newline at end of file +assertSortedWordsEquals "foot-walking wheelchair foot-hiking public-transport cycling-electric cycling-mountain driving-car driving-hgv cycling-regular cycling-road" "${profiles}" \ No newline at end of file diff --git a/.integration-scenarios/debian-12-jar-mvn/tests/profile-default-enabled-true.sh b/.integration-scenarios/debian-12-jar-mvn/tests/profile-default-enabled-true.sh new file mode 100755 index 0000000000..ab4ab7e12a --- /dev/null +++ b/.integration-scenarios/debian-12-jar-mvn/tests/profile-default-enabled-true.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +TESTROOT="$( cd "$(dirname "$0")"/.. >/dev/null 2>&1 ; pwd -P )" +source $TESTROOT/files/testfunctions.sh +source $TESTROOT/files/test.conf +prepareTest $(basename $0) $* + +configPT=$(makeTempFile $(basename $0) "\ +ors: + engine: + source_file: ors-api/src/test/files/heidelberg.osm.gz + profile_default: + enabled: true + profiles: + public-transport: + gtfs_file: ors-api/src/test/files/vrn_gtfs_cut.zip +") + +podman run --replace --name "${CONTAINER}" -p "${HOST_PORT}":8082 \ + -v "${M2_FOLDER}":/root/.m2 \ + -v "${TESTROOT}/graphs_volume":"${CONTAINER_WORK_DIR}/graphs" \ + -v "${configPT}":"${CONTAINER_WORK_DIR}/ors-config.yml" \ + "local/${IMAGE}:latest" & + +awaitOrsReady 300 "${HOST_PORT}" +profiles=$(requestEnabledProfiles ${HOST_PORT}) +cleanupTest + +assertSortedWordsEquals "foot-walking wheelchair foot-hiking public-transport cycling-electric cycling-mountain driving-car driving-hgv cycling-regular cycling-road" "${profiles}" \ No newline at end of file diff --git a/.integration-scenarios/debian-12-jar-mvn/tests/profile-default-maximum-properties.sh b/.integration-scenarios/debian-12-jar-mvn/tests/profile-default-maximum-properties.sh new file mode 100755 index 0000000000..0420927f83 --- /dev/null +++ b/.integration-scenarios/debian-12-jar-mvn/tests/profile-default-maximum-properties.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash + +TESTROOT="$( cd "$(dirname "$0")"/.. >/dev/null 2>&1 ; pwd -P )" +source $TESTROOT/files/testfunctions.sh +source $TESTROOT/files/test.conf +prepareTest $(basename $0) $* + +configPT=$(makeTempFile $(basename $0) "\ +ors: + engine: + source_file: ors-api/src/test/files/heidelberg.osm.gz + profile_default: + maximum_distance: 111111 + maximum_distance_dynamic_weights: 111111 + maximum_distance_avoid_areas: 111111 + maximum_waypoints: 11 + profiles: + car: + enabled: true + maximum_waypoints: 55 +") + +podman run --replace --name "${CONTAINER}" -p "${HOST_PORT}":8082 \ + -v "${M2_FOLDER}":/root/.m2 \ + -v "${TESTROOT}/graphs_volume":"${CONTAINER_WORK_DIR}/graphs" \ + -v "${configPT}":"${CONTAINER_WORK_DIR}/ors-config.yml" \ + "local/${IMAGE}:latest" & + +awaitOrsReady 300 "${HOST_PORT}" +statusString=$(requestStatusString ${HOST_PORT}) +cleanupTest + +assertEquals "111111" "$(echo $statusString | jq -r '.profiles."profile 1".limits.maximum_distance')" "maximum_distance" +assertEquals "55" "$(echo $statusString | jq -r '.profiles."profile 1".limits.maximum_waypoints')" "maximum_waypoints" +assertEquals "111111" "$(echo $statusString | jq -r '.profiles."profile 1".limits.maximum_distance_dynamic_weights')" "maximum_distance_dynamic_weights" +assertEquals "111111" "$(echo $statusString | jq -r '.profiles."profile 1".limits.maximum_distance_avoid_areas')" "maximum_distance_avoid_areas" From 75c5d2d88e4c04e9afaf042ee2ee9ebf70e5e651 Mon Sep 17 00:00:00 2001 From: Jochen Haeussler Date: Wed, 27 Mar 2024 19:09:59 +0100 Subject: [PATCH 05/23] fix: do not indent commented lines --- .github/utils/yml_config_to_ors_config_conversion.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/utils/yml_config_to_ors_config_conversion.sh b/.github/utils/yml_config_to_ors_config_conversion.sh index a59c2be124..a3b40cf668 100755 --- a/.github/utils/yml_config_to_ors_config_conversion.sh +++ b/.github/utils/yml_config_to_ors_config_conversion.sh @@ -35,9 +35,6 @@ sed -i -e '/^#ors:/s/^#//' -e '/^#.*engine:/s/^#//' -e '/^#.*source_file:/s/^#// echo "- Uncomment subsequent lines for profiles.car.enabled in ors.engine" sed -i -e 's/^# profiles:/ profiles:/' "$output_file" -sed -i -e 's/^# car:/ car:/' "$output_file" - -echo "- enable ors.engine.profiles.car" -yq -i '.ors.engine.profiles.car.enabled = true' "$output_file" || exit 1 +sed -i -e 's/^# car:/ car:\n enabled: true/' "$output_file" echo "Parsing complete. Result saved to $output_file" From 4b3262467268fd2624b975c3e8f4347d3bbbbf72 Mon Sep 17 00:00:00 2001 From: Jochen Haeussler Date: Wed, 27 Mar 2024 19:15:52 +0100 Subject: [PATCH 06/23] feat: re-generated ors-config.yml --- ors-config.yml | 215 ++++++++++++++++++++++--------------------------- 1 file changed, 98 insertions(+), 117 deletions(-) diff --git a/ors-config.yml b/ors-config.yml index 8474bbb914..b551f30041 100644 --- a/ors-config.yml +++ b/ors-config.yml @@ -44,110 +44,110 @@ # org.heigit: INFO ##### openrouteservice specific settings ##### ors: -# cors: -# allowed_origins: "*" -# allowed_headers: Content-Type, X-Requested-With, accept, Origin, Access-Control-Request-Method, Access-Control-Request-Headers, Authorization -# preflight_max_age: 600 -# messages: -# ##### ORS endpoints settings ##### -# endpoints: -# routing: -# enabled: true -# attribution: openrouteservice.org, OpenStreetMap contributors, tmc - BASt -# gpx_name: ORSRouting -# gpx_description: This is a directions instructions file as GPX, generated from openrouteservice -# gpx_base_url: https://openrouteservice.org/ -# gpx_support_mail: support@openrouteservice.org -# gpx_author: openrouteservice -# gpx_content_licence: LGPL 3.0 -# maximum_avoid_polygon_area: 200000000 -# maximum_avoid_polygon_extent: 20000 -# maximum_alternative_routes: 3 -# matrix: -# enabled: true -# attribution: openrouteservice.org, OpenStreetMap contributors -# maximum_routes: 2500 -# maximum_routes_flexible: 25 -# maximum_visited_nodes: 100000 -# maximum_search_radius: 2000 -# u_turn_costs: -1 -# isochrones: -# enabled: true -# attribution: openrouteservice.org, OpenStreetMap contributors -# maximum_locations: 2 -# maximum_intervals: 1 -# allow_compute_area: true -# maximum_range_distance_default: 50000 -# maximum_range_distance: -# - profiles: driving-car, driving-hgv -# value: 100000 -# maximum_range_time_default: 18000 -# maximum_range_time: -# - profiles: driving-car, driving-hgv -# value: 3600 -# fastisochrones: -# maximum_range_distance_default: 50000 -# maximum_range_distance: -# - profiles: driving-car, driving-hgv -# value: 500000 -# maximum_range_time_default: 18000 -# maximum_range_time: -# - profiles: driving-car, driving-hgv -# value: 10800 -# Snap: -# enabled: true -# attribution: openrouteservice.org, OpenStreetMap contributors -# ##### ORS engine settings ##### + # cors: + # allowed_origins: "*" + # allowed_headers: Content-Type, X-Requested-With, accept, Origin, Access-Control-Request-Method, Access-Control-Request-Headers, Authorization + # preflight_max_age: 600 + # messages: + # ##### ORS endpoints settings ##### + # endpoints: + # routing: + # enabled: true + # attribution: openrouteservice.org, OpenStreetMap contributors, tmc - BASt + # gpx_name: ORSRouting + # gpx_description: This is a directions instructions file as GPX, generated from openrouteservice + # gpx_base_url: https://openrouteservice.org/ + # gpx_support_mail: support@openrouteservice.org + # gpx_author: openrouteservice + # gpx_content_licence: LGPL 3.0 + # maximum_avoid_polygon_area: 200000000 + # maximum_avoid_polygon_extent: 20000 + # maximum_alternative_routes: 3 + # matrix: + # enabled: true + # attribution: openrouteservice.org, OpenStreetMap contributors + # maximum_routes: 2500 + # maximum_routes_flexible: 25 + # maximum_visited_nodes: 100000 + # maximum_search_radius: 2000 + # u_turn_costs: -1 + # isochrones: + # enabled: true + # attribution: openrouteservice.org, OpenStreetMap contributors + # maximum_locations: 2 + # maximum_intervals: 1 + # allow_compute_area: true + # maximum_range_distance_default: 50000 + # maximum_range_distance: + # - profiles: driving-car, driving-hgv + # value: 100000 + # maximum_range_time_default: 18000 + # maximum_range_time: + # - profiles: driving-car, driving-hgv + # value: 3600 + # fastisochrones: + # maximum_range_distance_default: 50000 + # maximum_range_distance: + # - profiles: driving-car, driving-hgv + # value: 500000 + # maximum_range_time_default: 18000 + # maximum_range_time: + # - profiles: driving-car, driving-hgv + # value: 10800 + # Snap: + # enabled: true + # attribution: openrouteservice.org, OpenStreetMap contributors + # ##### ORS engine settings ##### engine: source_file: ors-api/src/test/files/heidelberg.osm.gz -# init_threads: 1 -# preparation_mode: false -# graphs_root_path: ./graphs -# graphs_data_access: RAM_STORE -# elevation: -# preprocessed: false -# data_access: MMAP -# cache_clear: false -# provider: multi -# cache_path: ./elevation_cache -# profile_default: -# enabled: false -# elevation: false -# elevation_smoothing: false -# encoder_flags_size: 8 -# instructions: true -# optimize: false -# traffic: false -# maximum_distance: 100000 -# maximum_distance_dynamic_weights: 100000 -# maximum_distance_avoid_areas: 100000 -# maximum_waypoints: 50 -# maximum_snapping_radius: 400 -# maximum_distance_alternative_routes: 100000 -# maximum_distance_round_trip_routes: 100000 -# maximum_speed_lower_bound: 80 -# maximum_visited_nodes: 1000000 -# location_index_resolution: 500 -# location_index_search_iterations: 4 -# force_turn_costs: false -# interpolate_bridges_and_tunnels: true -# preparation: -# min_network_size: 200 -# methods: -# lm: -# enabled: true -# threads: 1 -# weightings: recommended,shortest -# landmarks: 16 -# execution: -# methods: -# lm: -# active_landmarks: 8 + # init_threads: 1 + # preparation_mode: false + # graphs_root_path: ./graphs + # graphs_data_access: RAM_STORE + # elevation: + # preprocessed: false + # data_access: MMAP + # cache_clear: false + # provider: multi + # cache_path: ./elevation_cache + # profile_default: + # enabled: false + # elevation: true + # elevation_smoothing: false + # encoder_flags_size: 8 + # instructions: true + # optimize: false + # traffic: false + # maximum_distance: 100000 + # maximum_distance_dynamic_weights: 100000 + # maximum_distance_avoid_areas: 100000 + # maximum_waypoints: 50 + # maximum_snapping_radius: 400 + # maximum_distance_alternative_routes: 100000 + # maximum_distance_round_trip_routes: 100000 + # maximum_speed_lower_bound: 80 + # maximum_visited_nodes: 1000000 + # location_index_resolution: 500 + # location_index_search_iterations: 4 + # force_turn_costs: false + # interpolate_bridges_and_tunnels: true + # preparation: + # min_network_size: 200 + # methods: + # lm: + # enabled: true + # threads: 1 + # weightings: recommended,shortest + # landmarks: 16 + # execution: + # methods: + # lm: + # active_landmarks: 8 profiles: + # # All properties defined in ors.engine.profile_default can also be set in each profile to overwrite the defaults profile-specific. car: enabled: true # profile: driving-car -# elevation: true # encoder_options: # turn_costs: true # block_fords: false @@ -183,15 +183,11 @@ ors: # RoadAccessRestrictions: # use_for_warnings: true # hgv: -# enabled: false # profile: driving-hgv -# encoder_flags_size: 8 # encoder_options: # turn_costs: true # block_fords: false # use_acceleration: true -# maximum_distance: 100000 -# elevation: true # preparation: # min_network_size: 200 # methods: @@ -215,85 +211,71 @@ ors: # restrictions: true # WaySurfaceType: # bike-regular: -# enabled: false # profile: cycling-regular # encoder_options: # consider_elevation: true # turn_costs: true # block_fords: false -# elevation: true # ext_storages: # WayCategory: # WaySurfaceType: # HillIndex: # TrailDifficulty: # bike-mountain: -# enabled: false # profile: cycling-mountain # encoder_options: # consider_elevation: true # turn_costs: true # block_fords: false -# elevation: true # ext_storages: # WayCategory: # WaySurfaceType: # HillIndex: # TrailDifficulty: # bike-road: -# enabled: false # profile: cycling-road # encoder_options: # consider_elevation: true # turn_costs: true # block_fords: false -# elevation: true # ext_storages: # WayCategory: # WaySurfaceType: # HillIndex: # TrailDifficulty: # bike-electric: -# enabled: false # profile: cycling-electric # encoder_options: # consider_elevation: true # turn_costs: true # block_fords: false -# elevation: true # ext_storages: # WayCategory: # WaySurfaceType: # HillIndex: # TrailDifficulty: # walking: -# enabled: false # profile: foot-walking # encoder_options: # block_fords: false -# elevation: true # ext_storages: # WayCategory: # WaySurfaceType: # HillIndex: # TrailDifficulty: # hiking: -# enabled: false # profile: foot-hiking # encoder_options: # block_fords: false -# elevation: true # ext_storages: # WayCategory: # WaySurfaceType: # HillIndex: # TrailDifficulty: # wheelchair: -# enabled: false # profile: wheelchair # encoder_options: # block_fords: true -# elevation: true # maximum_snapping_radius: 50 # ext_storages: # WayCategory: @@ -302,7 +284,6 @@ ors: # KerbsOnCrossings: true # OsmId: # public-transport: -# enabled: false # profile: public-transport # encoder_options: # block_fords: false From fa8df6ce45fde8483375bc4066878fd61f2e016e Mon Sep 17 00:00:00 2001 From: Jochen Haeussler Date: Thu, 11 Apr 2024 17:46:42 +0200 Subject: [PATCH 07/23] fix: remove profile definitions from application.yml Moved to additional application-profiles.yml. When running the application with default spring profile, the profile definitions are not included. Run the application with spring profile "profiles" to include this file. --- .../main/resources/application-profiles.yml | 149 +++++++++++++++++ ors-api/src/main/resources/application.yml | 155 +----------------- 2 files changed, 150 insertions(+), 154 deletions(-) create mode 100644 ors-api/src/main/resources/application-profiles.yml diff --git a/ors-api/src/main/resources/application-profiles.yml b/ors-api/src/main/resources/application-profiles.yml new file mode 100644 index 0000000000..5fa153d06c --- /dev/null +++ b/ors-api/src/main/resources/application-profiles.yml @@ -0,0 +1,149 @@ +ors: + engine: + profiles: + # All properties defined in ors.engine.profile_default can also be set in each profile to overwrite the defaults profile-specific. + car: + profile: driving-car + enabled: true + encoder_options: + turn_costs: true + block_fords: false + use_acceleration: true + preparation: + min_network_size: 200 + methods: + ch: + enabled: true + threads: 1 + weightings: fastest + lm: + enabled: false + threads: 1 + weightings: fastest,shortest + landmarks: 16 + core: + enabled: true + threads: 1 + weightings: fastest,shortest + landmarks: 64 + lmsets: highways;allow_all + execution: + methods: + lm: + active_landmarks: 6 + core: + active_landmarks: 6 + ext_storages: + WayCategory: + HeavyVehicle: + WaySurfaceType: + RoadAccessRestrictions: + use_for_warnings: true + hgv: + profile: driving-hgv + encoder_options: + turn_costs: true + block_fords: false + use_acceleration: true + preparation: + min_network_size: 200 + methods: + ch: + enabled: true + threads: 1 + weightings: recommended + core: + enabled: true + threads: 1 + weightings: recommended,shortest + landmarks: 64 + lmsets: highways;allow_all + execution: + methods: + core: + active_landmarks: 6 + ext_storages: + WayCategory: + HeavyVehicle: + restrictions: true + WaySurfaceType: + bike-regular: + profile: cycling-regular + encoder_options: + consider_elevation: true + turn_costs: true + block_fords: false + ext_storages: + WayCategory: + WaySurfaceType: + HillIndex: + TrailDifficulty: + bike-mountain: + profile: cycling-mountain + encoder_options: + consider_elevation: true + turn_costs: true + block_fords: false + ext_storages: + WayCategory: + WaySurfaceType: + HillIndex: + TrailDifficulty: + bike-road: + profile: cycling-road + encoder_options: + consider_elevation: true + turn_costs: true + block_fords: false + ext_storages: + WayCategory: + WaySurfaceType: + HillIndex: + TrailDifficulty: + bike-electric: + profile: cycling-electric + encoder_options: + consider_elevation: true + turn_costs: true + block_fords: false + ext_storages: + WayCategory: + WaySurfaceType: + HillIndex: + TrailDifficulty: + walking: + profile: foot-walking + encoder_options: + block_fords: false + ext_storages: + WayCategory: + WaySurfaceType: + HillIndex: + TrailDifficulty: + hiking: + profile: foot-hiking + encoder_options: + block_fords: false + ext_storages: + WayCategory: + WaySurfaceType: + HillIndex: + TrailDifficulty: + wheelchair: + profile: wheelchair + encoder_options: + block_fords: true + maximum_snapping_radius: 50 + ext_storages: + WayCategory: + WaySurfaceType: + Wheelchair: + KerbsOnCrossings: true + OsmId: + public-transport: + profile: public-transport + encoder_options: + block_fords: false + elevation: true + maximum_visited_nodes: 1000000 + gtfs_file: ors-api/src/test/files/vrn_gtfs_cut.zip diff --git a/ors-api/src/main/resources/application.yml b/ors-api/src/main/resources/application.yml index 6c0801d81b..ef4b2435a2 100644 --- a/ors-api/src/main/resources/application.yml +++ b/ors-api/src/main/resources/application.yml @@ -11,14 +11,12 @@ server: # Keep the context-path at / else the war file run with tomcat will have the context-path of /ors/v2 as well. servlet: context-path: /ors - spring: profiles: active: default mvc: servlet: path: / - ##### Settings related to springdoc ##### springdoc: swagger-ui: @@ -34,7 +32,6 @@ springdoc: version: OPENAPI_3_0 packages-to-scan: org.heigit.ors pathsToMatch: /v2/** - ##### Logging settings ##### logging: file: @@ -45,16 +42,13 @@ logging: level: root: WARN org.heigit: INFO - ##### openrouteservice specific settings ##### ors: cors: allowed_origins: "*" allowed_headers: Content-Type, X-Requested-With, accept, Origin, Access-Control-Request-Method, Access-Control-Request-Headers, Authorization preflight_max_age: 600 - messages: - ##### ORS endpoints settings ##### endpoints: routing: @@ -103,10 +97,9 @@ ors: Snap: enabled: true attribution: openrouteservice.org, OpenStreetMap contributors - ##### ORS engine settings ##### engine: - source_file: + source_file: ors-api/src/test/files/heidelberg.osm.gz init_threads: 1 preparation_mode: false graphs_root_path: ./graphs @@ -150,149 +143,3 @@ ors: methods: lm: active_landmarks: 8 - profiles: - # All properties defined in ors.engine.profile_default can also be set in each profile to overwrite the defaults profile-specific. - car: - profile: driving-car - encoder_options: - turn_costs: true - block_fords: false - use_acceleration: true - preparation: - min_network_size: 200 - methods: - ch: - enabled: true - threads: 1 - weightings: fastest - lm: - enabled: false - threads: 1 - weightings: fastest,shortest - landmarks: 16 - core: - enabled: true - threads: 1 - weightings: fastest,shortest - landmarks: 64 - lmsets: highways;allow_all - execution: - methods: - lm: - active_landmarks: 6 - core: - active_landmarks: 6 - ext_storages: - WayCategory: - HeavyVehicle: - WaySurfaceType: - RoadAccessRestrictions: - use_for_warnings: true - hgv: - profile: driving-hgv - encoder_options: - turn_costs: true - block_fords: false - use_acceleration: true - preparation: - min_network_size: 200 - methods: - ch: - enabled: true - threads: 1 - weightings: recommended - core: - enabled: true - threads: 1 - weightings: recommended,shortest - landmarks: 64 - lmsets: highways;allow_all - execution: - methods: - core: - active_landmarks: 6 - ext_storages: - WayCategory: - HeavyVehicle: - restrictions: true - WaySurfaceType: - bike-regular: - profile: cycling-regular - encoder_options: - consider_elevation: true - turn_costs: true - block_fords: false - ext_storages: - WayCategory: - WaySurfaceType: - HillIndex: - TrailDifficulty: - bike-mountain: - profile: cycling-mountain - encoder_options: - consider_elevation: true - turn_costs: true - block_fords: false - ext_storages: - WayCategory: - WaySurfaceType: - HillIndex: - TrailDifficulty: - bike-road: - profile: cycling-road - encoder_options: - consider_elevation: true - turn_costs: true - block_fords: false - ext_storages: - WayCategory: - WaySurfaceType: - HillIndex: - TrailDifficulty: - bike-electric: - profile: cycling-electric - encoder_options: - consider_elevation: true - turn_costs: true - block_fords: false - ext_storages: - WayCategory: - WaySurfaceType: - HillIndex: - TrailDifficulty: - walking: - profile: foot-walking - encoder_options: - block_fords: false - ext_storages: - WayCategory: - WaySurfaceType: - HillIndex: - TrailDifficulty: - hiking: - profile: foot-hiking - encoder_options: - block_fords: false - ext_storages: - WayCategory: - WaySurfaceType: - HillIndex: - TrailDifficulty: - wheelchair: - profile: wheelchair - encoder_options: - block_fords: true - maximum_snapping_radius: 50 - ext_storages: - WayCategory: - WaySurfaceType: - Wheelchair: - KerbsOnCrossings: true - OsmId: - public-transport: - profile: public-transport - encoder_options: - block_fords: false - elevation: true - maximum_visited_nodes: 1000000 - gtfs_file: ./src/test/files/vrn_gtfs_cut.zip From 97b91a2e5acc8d745ebdad04974adc97f5a82178 Mon Sep 17 00:00:00 2001 From: Jochen Haeussler Date: Thu, 11 Apr 2024 19:32:57 +0200 Subject: [PATCH 08/23] test: add test --- .../debian-12-jar-mvn/files/testfunctions.sh | 9 ++++++ ...ors-config-location-to-nonexisting-file.sh | 32 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100755 .integration-scenarios/debian-12-jar-mvn/tests/ors-config-location-to-nonexisting-file.sh diff --git a/.integration-scenarios/debian-12-jar-mvn/files/testfunctions.sh b/.integration-scenarios/debian-12-jar-mvn/files/testfunctions.sh index 5552fee9ce..9e9d61505f 100755 --- a/.integration-scenarios/debian-12-jar-mvn/files/testfunctions.sh +++ b/.integration-scenarios/debian-12-jar-mvn/files/testfunctions.sh @@ -207,6 +207,15 @@ function makeTempFile() { echo "$tempFile" } +function makeTempCopy() { + script=$1 + sourceFile=$2 + mkdir -p "$TESTROOT/tmp" + tempFile=$(mktemp "${TESTROOT}/tmp/${script}-$(basename $sourceFile).XXXXXXXXX") + cat "$sourceFile" >> $tempFile + echo "$tempFile" +} + function deleteTempFiles() { script=$1 rm "${TESTROOT}/tmp/${script}".* diff --git a/.integration-scenarios/debian-12-jar-mvn/tests/ors-config-location-to-nonexisting-file.sh b/.integration-scenarios/debian-12-jar-mvn/tests/ors-config-location-to-nonexisting-file.sh new file mode 100755 index 0000000000..5a8c0d9e90 --- /dev/null +++ b/.integration-scenarios/debian-12-jar-mvn/tests/ors-config-location-to-nonexisting-file.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +TESTROOT="$( cd "$(dirname "$0")"/.. >/dev/null 2>&1 ; pwd -P )" +source $TESTROOT/files/testfunctions.sh +source $TESTROOT/files/test.conf +prepareTest $(basename $0) $* + +configCar=$(makeTempFile $(basename $0) "\ +ors: + engine: + profiles: + car: + enabled: true") + +# The profile configured as run argument should be preferred over environment variable. +# The default yml file should not be used when ORS_CONFIG_LOCATION is set, +# even if the file does not exist. Fallback to default ors-config.yml is not desired! +podman run --replace --name "${CONTAINER}" -p "${HOST_PORT}":8082 \ + -v "${M2_FOLDER}":/root/.m2 \ + -v "${TESTROOT}/graphs_volume":"${CONTAINER_WORK_DIR}/graphs" \ + -v "${configCar}":${CONTAINER_WORK_DIR}/ors-config.yml \ + --env ORS_CONFIG_LOCATION=${CONTAINER_WORK_DIR}/nonexisting.yml \ + "local/${IMAGE}:latest" \ + $(getProgramArguments ${runType} ${CONTAINER_WORK_DIR}/config-car.yml) & + + +# expect process finished timout +res=$(expectOrsStartupFails 60 "$CONTAINER" ) +# stop container if was not finished +cleanupTest + +assertEquals "terminated" "$res" From 9b614656404ee5c3be903e9de0c59b0d86cb3015 Mon Sep 17 00:00:00 2001 From: Jochen Haeussler Date: Thu, 11 Apr 2024 19:34:27 +0200 Subject: [PATCH 09/23] test: remove no longer required properties --- .../debian-12-jar-mvn/files/.build-graph.sh | 1 - .../debian-12-jar-mvn/tests/build-all-graphs.sh | 2 -- .../debian-12-jar-mvn/tests/check-avoid-area-car.sh | 1 - .../debian-12-jar-mvn/tests/lookup-yml-in-etc.sh | 1 - .../debian-12-jar-mvn/tests/lookup-yml-in-userconf.sh | 1 - .../debian-12-jar-mvn/tests/lookup-yml-in-workdir.sh | 1 - .../tests/lookup-yml-prefer-userconf-over-etc.sh | 2 -- .../tests/lookup-yml-prefer-workdir-over-userconf.sh | 2 -- ...missing-config-but-profile-enabled-as-env-dot-jar-only.sh} | 1 - ...as-arg.sh => missing-config-but-required-params-as-arg.sh} | 1 - ....sh => missing-config-but-required-params-as-env-upper.sh} | 1 - .../debian-12-jar-mvn/tests/profile-default-enabled-true.sh | 4 ---- .../tests/specify-yml-prefer-arg-over-lookup.sh | 2 -- .../tests/specify-yml-prefer-env-over-lookup.sh | 2 -- 14 files changed, 22 deletions(-) rename .integration-scenarios/debian-12-jar-mvn/tests/{_only-jar-missing-config-but-profile-enabled-as-env-dot.sh => missing-config-but-profile-enabled-as-env-dot-jar-only.sh} (90%) rename .integration-scenarios/debian-12-jar-mvn/tests/{missing-config-but-pbf-and-profile-enabled-as-arg.sh => missing-config-but-required-params-as-arg.sh} (91%) rename .integration-scenarios/debian-12-jar-mvn/tests/{missing-config-but-pbf-and-profile-enabled-as-env-upper.sh => missing-config-but-required-params-as-env-upper.sh} (90%) diff --git a/.integration-scenarios/debian-12-jar-mvn/files/.build-graph.sh b/.integration-scenarios/debian-12-jar-mvn/files/.build-graph.sh index 458d1b277a..4874b167f8 100755 --- a/.integration-scenarios/debian-12-jar-mvn/files/.build-graph.sh +++ b/.integration-scenarios/debian-12-jar-mvn/files/.build-graph.sh @@ -13,7 +13,6 @@ prepareTest $callingScript $runType $image orsConfig=$(makeTempFile $callingScript "\ ors: engine: - source_file: ors-api/src/test/files/heidelberg.osm.gz profiles: ${enabledProfile}: enabled: true") diff --git a/.integration-scenarios/debian-12-jar-mvn/tests/build-all-graphs.sh b/.integration-scenarios/debian-12-jar-mvn/tests/build-all-graphs.sh index 43c3cea17a..ea676b11b5 100755 --- a/.integration-scenarios/debian-12-jar-mvn/tests/build-all-graphs.sh +++ b/.integration-scenarios/debian-12-jar-mvn/tests/build-all-graphs.sh @@ -8,7 +8,6 @@ prepareTest $(basename $0) $* configPT=$(makeTempFile $(basename $0) "\ ors: engine: - source_file: ors-api/src/test/files/heidelberg.osm.gz profiles: bike-electric: enabled: true @@ -26,7 +25,6 @@ ors: enabled: true public-transport: enabled: true - gtfs_file: ors-api/src/test/files/vrn_gtfs_cut.zip walking: enabled: true wheelchair: diff --git a/.integration-scenarios/debian-12-jar-mvn/tests/check-avoid-area-car.sh b/.integration-scenarios/debian-12-jar-mvn/tests/check-avoid-area-car.sh index 73e3466dec..8c798b6fe6 100755 --- a/.integration-scenarios/debian-12-jar-mvn/tests/check-avoid-area-car.sh +++ b/.integration-scenarios/debian-12-jar-mvn/tests/check-avoid-area-car.sh @@ -8,7 +8,6 @@ prepareTest $(basename $0) $* configCar=$(makeTempFile $(basename $0) "\ ors: engine: - source_file: ors-api/src/test/files/heidelberg.osm.gz profiles: car: enabled: true") diff --git a/.integration-scenarios/debian-12-jar-mvn/tests/lookup-yml-in-etc.sh b/.integration-scenarios/debian-12-jar-mvn/tests/lookup-yml-in-etc.sh index d4981fce0d..40bde6cb85 100755 --- a/.integration-scenarios/debian-12-jar-mvn/tests/lookup-yml-in-etc.sh +++ b/.integration-scenarios/debian-12-jar-mvn/tests/lookup-yml-in-etc.sh @@ -8,7 +8,6 @@ prepareTest $(basename $0) $* configCar=$(makeTempFile $(basename $0) "\ ors: engine: - source_file: ors-api/src/test/files/heidelberg.osm.gz profiles: car: enabled: true") diff --git a/.integration-scenarios/debian-12-jar-mvn/tests/lookup-yml-in-userconf.sh b/.integration-scenarios/debian-12-jar-mvn/tests/lookup-yml-in-userconf.sh index 9e37a63063..0f3070b7a3 100755 --- a/.integration-scenarios/debian-12-jar-mvn/tests/lookup-yml-in-userconf.sh +++ b/.integration-scenarios/debian-12-jar-mvn/tests/lookup-yml-in-userconf.sh @@ -8,7 +8,6 @@ prepareTest $(basename $0) $* configCar=$(makeTempFile $(basename $0) "\ ors: engine: - source_file: ors-api/src/test/files/heidelberg.osm.gz profiles: car: enabled: true") diff --git a/.integration-scenarios/debian-12-jar-mvn/tests/lookup-yml-in-workdir.sh b/.integration-scenarios/debian-12-jar-mvn/tests/lookup-yml-in-workdir.sh index ae9270c425..810e9f3723 100755 --- a/.integration-scenarios/debian-12-jar-mvn/tests/lookup-yml-in-workdir.sh +++ b/.integration-scenarios/debian-12-jar-mvn/tests/lookup-yml-in-workdir.sh @@ -8,7 +8,6 @@ prepareTest $(basename $0) $* configCar=$(makeTempFile $(basename $0) "\ ors: engine: - source_file: ors-api/src/test/files/heidelberg.osm.gz profiles: car: enabled: true") diff --git a/.integration-scenarios/debian-12-jar-mvn/tests/lookup-yml-prefer-userconf-over-etc.sh b/.integration-scenarios/debian-12-jar-mvn/tests/lookup-yml-prefer-userconf-over-etc.sh index 53ad29ce77..fd56a63a1c 100755 --- a/.integration-scenarios/debian-12-jar-mvn/tests/lookup-yml-prefer-userconf-over-etc.sh +++ b/.integration-scenarios/debian-12-jar-mvn/tests/lookup-yml-prefer-userconf-over-etc.sh @@ -8,7 +8,6 @@ prepareTest $(basename $0) $* configCar=$(makeTempFile $(basename $0) "\ ors: engine: - source_file: ors-api/src/test/files/heidelberg.osm.gz profiles: car: enabled: true") @@ -16,7 +15,6 @@ ors: configHgv=$(makeTempFile $(basename $0) "\ ors: engine: - source_file: ors-api/src/test/files/heidelberg.osm.gz profiles: hgv: enabled: true") diff --git a/.integration-scenarios/debian-12-jar-mvn/tests/lookup-yml-prefer-workdir-over-userconf.sh b/.integration-scenarios/debian-12-jar-mvn/tests/lookup-yml-prefer-workdir-over-userconf.sh index ce4341ec8f..56236d0438 100755 --- a/.integration-scenarios/debian-12-jar-mvn/tests/lookup-yml-prefer-workdir-over-userconf.sh +++ b/.integration-scenarios/debian-12-jar-mvn/tests/lookup-yml-prefer-workdir-over-userconf.sh @@ -8,7 +8,6 @@ prepareTest $(basename $0) $* configCar=$(makeTempFile $(basename $0) "\ ors: engine: - source_file: ors-api/src/test/files/heidelberg.osm.gz profiles: car: enabled: true") @@ -16,7 +15,6 @@ ors: configHgv=$(makeTempFile $(basename $0) "\ ors: engine: - source_file: ors-api/src/test/files/heidelberg.osm.gz profiles: hgv: enabled: true") diff --git a/.integration-scenarios/debian-12-jar-mvn/tests/_only-jar-missing-config-but-profile-enabled-as-env-dot.sh b/.integration-scenarios/debian-12-jar-mvn/tests/missing-config-but-profile-enabled-as-env-dot-jar-only.sh similarity index 90% rename from .integration-scenarios/debian-12-jar-mvn/tests/_only-jar-missing-config-but-profile-enabled-as-env-dot.sh rename to .integration-scenarios/debian-12-jar-mvn/tests/missing-config-but-profile-enabled-as-env-dot-jar-only.sh index 56c06caf43..6395fd6f4e 100755 --- a/.integration-scenarios/debian-12-jar-mvn/tests/_only-jar-missing-config-but-profile-enabled-as-env-dot.sh +++ b/.integration-scenarios/debian-12-jar-mvn/tests/missing-config-but-profile-enabled-as-env-dot-jar-only.sh @@ -11,7 +11,6 @@ podman run --replace --name "${CONTAINER}" -p "${HOST_PORT}":8082 \ -v "${M2_FOLDER}":/root/.m2 \ -v "${TESTROOT}/graphs_volume":"${CONTAINER_WORK_DIR}/graphs" \ --env ors.engine.profiles.hgv.enabled=true \ - --env ors.engine.source_file=ors-api/src/test/files/heidelberg.osm.gz \ "local/${IMAGE}:latest" & awaitOrsReady 60 "${HOST_PORT}" diff --git a/.integration-scenarios/debian-12-jar-mvn/tests/missing-config-but-pbf-and-profile-enabled-as-arg.sh b/.integration-scenarios/debian-12-jar-mvn/tests/missing-config-but-required-params-as-arg.sh similarity index 91% rename from .integration-scenarios/debian-12-jar-mvn/tests/missing-config-but-pbf-and-profile-enabled-as-arg.sh rename to .integration-scenarios/debian-12-jar-mvn/tests/missing-config-but-required-params-as-arg.sh index 0fbeba6206..b5e3a9cb30 100755 --- a/.integration-scenarios/debian-12-jar-mvn/tests/missing-config-but-pbf-and-profile-enabled-as-arg.sh +++ b/.integration-scenarios/debian-12-jar-mvn/tests/missing-config-but-required-params-as-arg.sh @@ -11,7 +11,6 @@ prepareTest $(basename $0) $* podman run --replace --name "${CONTAINER}" -p "${HOST_PORT}":8082 \ -v "${M2_FOLDER}":/root/.m2 \ -v "${TESTROOT}/graphs_volume":"${CONTAINER_WORK_DIR}/graphs" \ - --env ORS_ENGINE_SOURCE_FILE=ors-api/src/test/files/heidelberg.osm.gz \ "local/${IMAGE}:latest" \ $(getProgramArguments ${runType} --ors.engine.profiles.hgv.enabled=true) & diff --git a/.integration-scenarios/debian-12-jar-mvn/tests/missing-config-but-pbf-and-profile-enabled-as-env-upper.sh b/.integration-scenarios/debian-12-jar-mvn/tests/missing-config-but-required-params-as-env-upper.sh similarity index 90% rename from .integration-scenarios/debian-12-jar-mvn/tests/missing-config-but-pbf-and-profile-enabled-as-env-upper.sh rename to .integration-scenarios/debian-12-jar-mvn/tests/missing-config-but-required-params-as-env-upper.sh index da7778f335..e80677bd8a 100755 --- a/.integration-scenarios/debian-12-jar-mvn/tests/missing-config-but-pbf-and-profile-enabled-as-env-upper.sh +++ b/.integration-scenarios/debian-12-jar-mvn/tests/missing-config-but-required-params-as-env-upper.sh @@ -12,7 +12,6 @@ podman run --replace --name "${CONTAINER}" -p "${HOST_PORT}":8082 \ -v "${M2_FOLDER}":/root/.m2 \ -v "${TESTROOT}/graphs_volume":"${CONTAINER_WORK_DIR}/graphs" \ --env ORS_ENGINE_PROFILES_HGV_ENABLED=true \ - --env ORS_ENGINE_SOURCE_FILE=ors-api/src/test/files/heidelberg.osm.gz \ "local/${IMAGE}:latest" & awaitOrsReady 60 "${HOST_PORT}" diff --git a/.integration-scenarios/debian-12-jar-mvn/tests/profile-default-enabled-true.sh b/.integration-scenarios/debian-12-jar-mvn/tests/profile-default-enabled-true.sh index ab4ab7e12a..930331a52a 100755 --- a/.integration-scenarios/debian-12-jar-mvn/tests/profile-default-enabled-true.sh +++ b/.integration-scenarios/debian-12-jar-mvn/tests/profile-default-enabled-true.sh @@ -8,12 +8,8 @@ prepareTest $(basename $0) $* configPT=$(makeTempFile $(basename $0) "\ ors: engine: - source_file: ors-api/src/test/files/heidelberg.osm.gz profile_default: enabled: true - profiles: - public-transport: - gtfs_file: ors-api/src/test/files/vrn_gtfs_cut.zip ") podman run --replace --name "${CONTAINER}" -p "${HOST_PORT}":8082 \ diff --git a/.integration-scenarios/debian-12-jar-mvn/tests/specify-yml-prefer-arg-over-lookup.sh b/.integration-scenarios/debian-12-jar-mvn/tests/specify-yml-prefer-arg-over-lookup.sh index bdb54cb39c..5e0f9542ca 100755 --- a/.integration-scenarios/debian-12-jar-mvn/tests/specify-yml-prefer-arg-over-lookup.sh +++ b/.integration-scenarios/debian-12-jar-mvn/tests/specify-yml-prefer-arg-over-lookup.sh @@ -8,7 +8,6 @@ prepareTest $(basename $0) $* configCar=$(makeTempFile $(basename $0) "\ ors: engine: - source_file: ors-api/src/test/files/heidelberg.osm.gz profiles: car: enabled: true") @@ -16,7 +15,6 @@ ors: configHgv=$(makeTempFile $(basename $0) "\ ors: engine: - source_file: ors-api/src/test/files/heidelberg.osm.gz profiles: hgv: enabled: true") diff --git a/.integration-scenarios/debian-12-jar-mvn/tests/specify-yml-prefer-env-over-lookup.sh b/.integration-scenarios/debian-12-jar-mvn/tests/specify-yml-prefer-env-over-lookup.sh index 7d06a22dbd..68cc1fdb75 100755 --- a/.integration-scenarios/debian-12-jar-mvn/tests/specify-yml-prefer-env-over-lookup.sh +++ b/.integration-scenarios/debian-12-jar-mvn/tests/specify-yml-prefer-env-over-lookup.sh @@ -8,7 +8,6 @@ prepareTest $(basename $0) $* configCar=$(makeTempFile $(basename $0) "\ ors: engine: - source_file: ors-api/src/test/files/heidelberg.osm.gz profiles: car: enabled: true") @@ -16,7 +15,6 @@ ors: configHgv=$(makeTempFile $(basename $0) "\ ors: engine: - source_file: ors-api/src/test/files/heidelberg.osm.gz profiles: hgv: enabled: true") From 267b4069dbea17b8480221a52205ee77daa26888 Mon Sep 17 00:00:00 2001 From: Jochen Haeussler Date: Thu, 11 Apr 2024 19:38:18 +0200 Subject: [PATCH 10/23] test: small improvements and fixes on tests --- .../debian-12-jar-mvn/files/testfunctions.sh | 2 +- .integration-scenarios/debian-12-jar-mvn/run.sh | 5 ++++- .../debian-12-jar-mvn/tests/arg-overrides-default-prop.sh | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.integration-scenarios/debian-12-jar-mvn/files/testfunctions.sh b/.integration-scenarios/debian-12-jar-mvn/files/testfunctions.sh index 9e9d61505f..acf390d450 100755 --- a/.integration-scenarios/debian-12-jar-mvn/files/testfunctions.sh +++ b/.integration-scenarios/debian-12-jar-mvn/files/testfunctions.sh @@ -218,5 +218,5 @@ function makeTempCopy() { function deleteTempFiles() { script=$1 - rm "${TESTROOT}/tmp/${script}".* + rm "${TESTROOT}/tmp/${script}"* } \ No newline at end of file diff --git a/.integration-scenarios/debian-12-jar-mvn/run.sh b/.integration-scenarios/debian-12-jar-mvn/run.sh index 01703a0a46..45076da6a8 100755 --- a/.integration-scenarios/debian-12-jar-mvn/run.sh +++ b/.integration-scenarios/debian-12-jar-mvn/run.sh @@ -11,7 +11,7 @@ mvn=0 verbose=0 pattern="" -function printCliHelp() { # TODO adapt +function printCliHelp() { echo -e "\ ${B}$SCRIPT${N} - run ors tests in containers @@ -140,6 +140,9 @@ if [ -z "$pattern" ]; then echo -e "${B}No tests specified!${N}"; exit 0; fi mkdir -p "${TESTROOT}/graphs_volume" +cp $TESTROOT/../../ors-api/src/main/resources/application.yml $TESTROOT/tmp/ors-config.yml +yq -i '.ors.engine.profiles.car.enabled = true' $TESTROOT/tmp/ors-config.yml + hasErrors=0 passed=0 failed=0 diff --git a/.integration-scenarios/debian-12-jar-mvn/tests/arg-overrides-default-prop.sh b/.integration-scenarios/debian-12-jar-mvn/tests/arg-overrides-default-prop.sh index d4fefc36be..47e9979b34 100755 --- a/.integration-scenarios/debian-12-jar-mvn/tests/arg-overrides-default-prop.sh +++ b/.integration-scenarios/debian-12-jar-mvn/tests/arg-overrides-default-prop.sh @@ -27,4 +27,4 @@ awaitOrsReady 60 "${HOST_PORT}" profiles=$(requestEnabledProfiles ${HOST_PORT}) cleanupTest -assertEquals 'driving-hgv driving-car' "${profiles}" +assertSortedWordsEquals 'driving-hgv driving-car' "${profiles}" From 44b7492b813028c01a13ad86fa295abe79ff9f62 Mon Sep 17 00:00:00 2001 From: Jochen Haeussler Date: Thu, 11 Apr 2024 19:39:12 +0200 Subject: [PATCH 11/23] test: don't use port 8082 to not block local ors runs --- .integration-scenarios/debian-12-jar-mvn/files/testfunctions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.integration-scenarios/debian-12-jar-mvn/files/testfunctions.sh b/.integration-scenarios/debian-12-jar-mvn/files/testfunctions.sh index acf390d450..b4ba34f01c 100755 --- a/.integration-scenarios/debian-12-jar-mvn/files/testfunctions.sh +++ b/.integration-scenarios/debian-12-jar-mvn/files/testfunctions.sh @@ -179,7 +179,7 @@ function prepareTest() { if [ -z "$IMAGE" ]; then printError "missing param 2: docker image"; exit 1; fi CONTAINER=${runType}-$(removeExtension "$(basename $script)") - HOST_PORT=$(findFreePort 8082) + HOST_PORT=$(findFreePort 8083) mkdir -p ~/.m2 M2_FOLDER="$(realpath ~/.m2)" From 5c406571726abcd6991c55a27348ecbe2ab6e968 Mon Sep 17 00:00:00 2001 From: Jochen Haeussler Date: Thu, 11 Apr 2024 19:39:47 +0200 Subject: [PATCH 12/23] test: support for skipping tests --- .integration-scenarios/debian-12-jar-mvn/run.sh | 13 +++++++++---- ...onfig-but-profile-enabled-as-env-dot-jar-only.sh | 5 +++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.integration-scenarios/debian-12-jar-mvn/run.sh b/.integration-scenarios/debian-12-jar-mvn/run.sh index 45076da6a8..fc3b3c6991 100755 --- a/.integration-scenarios/debian-12-jar-mvn/run.sh +++ b/.integration-scenarios/debian-12-jar-mvn/run.sh @@ -69,12 +69,15 @@ function runTest() { else $testscript "${runType}" "${imageName}" 1>/dev/null 2>&1 fi - - if (($?)); then + testStatus=$? + if [ $testStatus -eq 1 ]; then hasErrors=1 ((failed++)) echo -e "${FG_RED}${B}failed${N}" (($failFast)) && exit 1 + elif [ $testStatus -eq 2 ]; then + ((skipped++)) + echo -e "${FG_ORA}${B}skipped${N}" else ((passed++)) echo -e "${FG_GRN}passed${N}" @@ -145,6 +148,7 @@ yq -i '.ors.engine.profiles.car.enabled = true' $TESTROOT/tmp/ors-config.yml hasErrors=0 passed=0 +skipped=0 failed=0 for word in $pattern; do @@ -155,8 +159,9 @@ for word in $pattern; do done (($passed)) && passedText=", ${FG_GRN}${B}${passed} passed${N}" +(($skipped)) && skippedText=", ${FG_ORA}${B}${skipped} skipped${N}" (($failed)) && failedText=", ${FG_RED}${B}${failed} failed${N}" -total=$(($passed + $failed)) -echo -e "${FG_BLU}$(date +%Y-%m-%dT%H:%M:%S)${N} ${B}done, ${total} test$( (($total-1)) && echo "s") executed${passedText}${failedText}" +total=$(($passed + $skipped + $failed)) +echo -e "${FG_BLU}$(date +%Y-%m-%dT%H:%M:%S)${N} ${B}done, ${total} test$( (($total-1)) && echo "s") executed${passedText}${skippedText}${failedText}" exit $hasErrors diff --git a/.integration-scenarios/debian-12-jar-mvn/tests/missing-config-but-profile-enabled-as-env-dot-jar-only.sh b/.integration-scenarios/debian-12-jar-mvn/tests/missing-config-but-profile-enabled-as-env-dot-jar-only.sh index 6395fd6f4e..d78da2cf72 100755 --- a/.integration-scenarios/debian-12-jar-mvn/tests/missing-config-but-profile-enabled-as-env-dot-jar-only.sh +++ b/.integration-scenarios/debian-12-jar-mvn/tests/missing-config-but-profile-enabled-as-env-dot-jar-only.sh @@ -5,6 +5,11 @@ source $TESTROOT/files/testfunctions.sh source $TESTROOT/files/test.conf prepareTest $(basename $0) $* +if [ "$runType" = "mvn" ]; then + echo "skipping - mvn does not support env variables with dot notation" + exit 2; +fi + # Even if no yml config file is present, the ors is runnable # if at least one routing profile is enabled with a environment variable. podman run --replace --name "${CONTAINER}" -p "${HOST_PORT}":8082 \ From 97bc6c26d42b73d7c0f15670a338fe60d55789c2 Mon Sep 17 00:00:00 2001 From: Jochen Haeussler Date: Thu, 11 Apr 2024 19:41:11 +0200 Subject: [PATCH 13/23] fix: add profile names to default application.yml these should not/cannot be changed anyway --- ors-api/src/main/resources/application.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/ors-api/src/main/resources/application.yml b/ors-api/src/main/resources/application.yml index ef4b2435a2..d6a6610ac7 100644 --- a/ors-api/src/main/resources/application.yml +++ b/ors-api/src/main/resources/application.yml @@ -143,3 +143,24 @@ ors: methods: lm: active_landmarks: 8 + profiles: + car: + profile: driving-car + hgv: + profile: driving-hgv + bike-regular: + profile: cycling-regular + bike-mountain: + profile: cycling-mountain + bike-road: + profile: cycling-road + bike-electric: + profile: cycling-electric + walking: + profile: foot-walking + hiking: + profile: foot-hiking + wheelchair: + profile: wheelchair + public-transport: + profile: public-transport From 2b2cb4e9b257bde5b2aa674fb15e5399c087df6d Mon Sep 17 00:00:00 2001 From: Jochen Haeussler Date: Thu, 11 Apr 2024 19:42:10 +0200 Subject: [PATCH 14/23] feat: adapt workflow --- .../yml_config_to_ors_config_conversion.sh | 60 ++++++++++------- .../yml_config_to_properties_conversion.sh | 66 +++++++++---------- .github/utils/yml_config_validation.sh | 27 +++++--- .../config-conversion-automation.yml | 6 +- .github/workflows/integration-tests.yml | 2 +- 5 files changed, 89 insertions(+), 72 deletions(-) diff --git a/.github/utils/yml_config_to_ors_config_conversion.sh b/.github/utils/yml_config_to_ors_config_conversion.sh index a3b40cf668..9b0a0febf8 100755 --- a/.github/utils/yml_config_to_ors_config_conversion.sh +++ b/.github/utils/yml_config_to_ors_config_conversion.sh @@ -1,40 +1,50 @@ #!/bin/bash -if [ "$#" -ne 2 ]; then - echo "Usage: $0 input.yaml output.yaml" +function checkPropertyEq() { + local file=$1 + local path=$2 + local expected=$3 + echo -n "- checking for ${path} = ${expected}:" + if [ "$(yq ".${path}" < ${file})" = "${expected}" ]; then + echo -e "\e[1;32m ok \e[0m" + else + echo -e "\e[1;31m error \e[0m" + hasError=1 + fi +} + +if [ "$#" -ne 3 ]; then + echo "Usage: $0 input-1.yaml input-2.yaml output.yaml" exit 1 fi -input_file=$1 -output_file=$2 +input_file1=$1 +input_file2=$2 +output_file=$3 echo "" -echo "Copy $input_file to $output_file" -cp $input_file $output_file +echo "Merge $input_file1 and $input_file2 to $output_file" +cp $input_file1 $output_file +yq eval-all '. as $item ireduce ({}; . *+ $item)' "$input_file1" "$input_file2" > "$output_file" ########################### ### Replace parameters #### ########################### +#echo "" +#echo "Replace parameters:" +# +#echo "- set ors.engine.source_file to ors-api/src/test/files/heidelberg.osm.gz" +#yq -i '.ors.engine.source_file = "ors-api/src/test/files/heidelberg.osm.gz"' "$output_file" || exit 1 + +############################ +### Validate output file ### +############################ echo "" -echo "Replace parameters:" +echo "Validate output file:" +hasError=0 +checkPropertyEq $output_file "ors.engine.source_file" "ors-api/src/test/files/heidelberg.osm.gz" +checkPropertyEq $output_file "ors.engine.profiles.car.enabled" "true" +(($hasError)) && exit 1 -echo "- set ors.engine.source_file to ors-api/src/test/files/heidelberg.osm.gz" -yq -i '.ors.engine.source_file = "ors-api/src/test/files/heidelberg.osm.gz"' "$output_file" || exit 1 - -########################### -### Convert input file #### -########################### echo "" -echo "Converting input file:" -## Add # to the beginning of each line that is not empty or a comment -echo "- Comment everything" -sed -i '/^\s*[^#]/ s/^/#/' "$output_file" || exit 1 - -echo "- Uncomment ors, engine and source_file" -sed -i -e '/^#ors:/s/^#//' -e '/^#.*engine:/s/^#//' -e '/^#.*source_file:/s/^#//' "$output_file" - -echo "- Uncomment subsequent lines for profiles.car.enabled in ors.engine" -sed -i -e 's/^# profiles:/ profiles:/' "$output_file" -sed -i -e 's/^# car:/ car:\n enabled: true/' "$output_file" - echo "Parsing complete. Result saved to $output_file" diff --git a/.github/utils/yml_config_to_properties_conversion.sh b/.github/utils/yml_config_to_properties_conversion.sh index e93c44bb4b..391b5ae30d 100755 --- a/.github/utils/yml_config_to_properties_conversion.sh +++ b/.github/utils/yml_config_to_properties_conversion.sh @@ -1,29 +1,44 @@ #!/bin/bash -if [ "$#" -ne 2 ]; then - echo "Usage: $0 input.yaml output.properties" +function checkPropertyEq() { + local file=$1 + local path=$2 + local expected=$3 + echo -n "- checking for ${path}=${expected}:" + return_value=$(grep -xc "${path}=${expected}" $file) + if [ $return_value -eq 1 ]; then + echo -e "\e[1;32m ok \e[0m" + else + echo -e "\e[1;31m error \e[0m" + hasError=1 + fi +} + +if [ "$#" -ne 3 ]; then + echo "Usage: $0 input-1.yaml input-2.yaml output.yaml" exit 1 fi -input_file=$1 -output_file=$2 +input_file1=$1 +input_file2=$2 +output_file=$3 echo "" -echo "Copy $input_file to $output_file" -cp $input_file $output_file +echo "Merge $input_file1 and $input_file2 to $output_file" +cp $input_file1 $output_file +yq eval-all '. as $item ireduce ({}; . *+ $item)' "$input_file1" "$input_file2" > "$output_file" ########################### ### Replace parameters #### ########################### -echo "" -echo "Replace parameters:" - -echo "- enable ors.engine.profiles.car" -yq -i '.ors.engine.profiles.car.enabled = true' "$output_file" || exit 1 +#echo "" +#echo "Replace parameters:" -echo "- set ors.engine.source_file to ors-api/src/test/files/heidelberg.osm.gz" -yq -i '.ors.engine.source_file = "ors-api/src/test/files/heidelberg.osm.gz"' "$output_file" || exit 1 +#echo "- enable ors.engine.profiles.car" +#yq -i '.ors.engine.profiles.car.enabled = true' "$output_file" || exit 1 +#echo "- set ors.engine.source_file to ors-api/src/test/files/heidelberg.osm.gz" +#yq -i '.ors.engine.source_file = "ors-api/src/test/files/heidelberg.osm.gz"' "$output_file" || exit 1 ########################### ### Convert input file #### @@ -33,30 +48,15 @@ echo "Convert .yaml to .env/properties file:" echo "- unwrap yaml structure to flat properties" yq -i -o=props --unwrapScalar=false '.. | select(tag != "!!map" and tag != "!!seq") | ( (path | join(".")) + "=" + .)' "$output_file" || exit 1 -## Add # to the beginning of each line that is not empty or a comment -echo "- Comment everything" -sed -i '/^\s*[^#]/ s/^/#/' "$output_file" || exit 1 - -echo "- Uncomment ors.engine.source_file and ors.engine.profiles.car.enabled" -sed -i -e '/^#ors.engine.source_file/s/^#//' -e '/^#ors.engine.profiles.car.enabled/s/^#//' "$output_file" || exit 1 - ############################ ### Validate output file ### ############################ echo "" echo "Validate output file:" -echo "- checking for ors.engine.source_file=ors-api/src/test/files/heidelberg.osm.gz" -return_value=$(sed -n '/^ors.engine.source_file=ors-api\/src\/test\/files\/heidelberg.osm.gz/p' $output_file)|| exit 1 -if [ -z "$return_value" ]; then - echo "ors.engine.source_file=ors-api/src/test/files/heidelberg.osm.gz not found" - exit 1 -fi -echo "- checking for ors.engine.profiles.car.enabled=true" -return_value=$(sed -n '/^ors.engine.profiles.car.enabled=true/p' $output_file) || exit 1 -if [ -z "$return_value" ]; then - echo "ors.engine.profiles.car.enabled=true not found" - exit 1 -fi +hasError=0 +checkPropertyEq $output_file "ors.engine.source_file" "ors-api/src/test/files/heidelberg.osm.gz" +checkPropertyEq $output_file "ors.engine.profiles.car.enabled" "true" +(($hasError)) && exit 1 +echo "" echo "Parsing complete. Result saved to $output_file" - diff --git a/.github/utils/yml_config_validation.sh b/.github/utils/yml_config_validation.sh index fe615b1a7c..0b1a78b143 100755 --- a/.github/utils/yml_config_validation.sh +++ b/.github/utils/yml_config_validation.sh @@ -1,21 +1,28 @@ #!/bin/bash -if [ "$#" -ne 1 ]; then - echo "Usage: $0 input.yaml" +if [ "$#" -ne 2 ]; then + echo "Usage: $0 input-1.yaml input-2.yaml (1 with basic properties, 2 with profiles)" exit 1 fi -input_file=$1 +input_file1=$1 +input_file2=$2 ########################### -### Validate input file ### +### Validate input files ### ########################### -echo "Validate input file:" +echo "Validate input file1:" echo "- checking if the input file is a valid yaml file" -yq 'true' $input_file /dev/null || exit 1 +yq 'true' $input_file1 /dev/null || exit 1 # Fail if ors.engine.profiles.car.enabled='false' can't be found access with schema .result | select(.property_history != null) | .property_history | map(select(.event_name == "Sold"))[0].date' -echo "- checking if ors.engine.source_file exists and has 'source_file' property" -yq --exit-status '.ors.engine | has("source_file")' $input_file > /dev/null || exit 1 +echo "- checking if ors.engine.source_file exists in $input_file1 and has 'source_file' property" +yq --exit-status '.ors.engine | has("source_file")' $input_file1 > /dev/null || exit 1 + + + +echo "Validate input file2:" +echo "- checking if the input file is a valid yaml file" +yq 'true' $input_file2 /dev/null || exit 1 # For profiles section for car with enabled using yq and contains -echo "- checking if ors.engine.profiles.car exists and has 'enabled' property" -yq --exit-status '.ors.engine.profiles.car | has("enabled")' $input_file > /dev/null || exit 1 \ No newline at end of file +echo "- checking if ors.engine.profiles.car exists in $input_file2 and has 'enabled' property" +yq --exit-status '.ors.engine.profiles.car | has("enabled")' $input_file2 > /dev/null || exit 1 diff --git a/.github/workflows/config-conversion-automation.yml b/.github/workflows/config-conversion-automation.yml index 4332104191..ad747e064f 100644 --- a/.github/workflows/config-conversion-automation.yml +++ b/.github/workflows/config-conversion-automation.yml @@ -23,13 +23,13 @@ jobs: - name: yq - portable yaml processor uses: mikefarah/yq@v4.40.5 - name: validate application.yml - run: .github/utils/yml_config_validation.sh ors-api/src/main/resources/application.yml + run: .github/utils/yml_config_validation.sh ors-api/src/main/resources/application.yml ors-api/src/main/resources/application-profiles.yml - name: Convert application.yml to ors-config.yml and ors-config.env run: | # Print yq version yq --version - .github/utils/yml_config_to_ors_config_conversion.sh ors-api/src/main/resources/application.yml ors-config.yml - .github/utils/yml_config_to_properties_conversion.sh ors-api/src/main/resources/application.yml ors-config.env + .github/utils/yml_config_to_ors_config_conversion.sh ors-api/src/main/resources/application.yml ors-api/src/main/resources/application-profiles.yml ors-config.yml + .github/utils/yml_config_to_properties_conversion.sh ors-api/src/main/resources/application.yml ors-api/src/main/resources/application-profiles.yml ors-config.env - uses: MichaelsJP/git-auto-commit-action@v5 with: commit_message: 'chore(config): automatic conversion of application.yml to ors-config.yml and ors-config.env' diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 11bb4f248c..996263a4a1 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -62,7 +62,7 @@ jobs: strategy: matrix: runtype: [ '-m' , '-j' ] - testgroup: [ build-all-graphs*, arg-overrides*, check*, config*, lookup*, missing*, specify*, profile-default* ] + testgroup: [ build-all-graphs*, arg-overrides*, check*, config*, lookup*, missing*, ors-config*, specify*, profile-default* ] steps: - uses: actions/checkout@v4 with: From f9c6204b4f1bf956a1a4a9028d80ca920b5f7ccf Mon Sep 17 00:00:00 2001 From: Jochen Haeussler Date: Thu, 11 Apr 2024 19:42:50 +0200 Subject: [PATCH 15/23] feat: add script to generate ors-config locally by using the same scripts as in the workflow --- gen-ors-configs.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 gen-ors-configs.sh diff --git a/gen-ors-configs.sh b/gen-ors-configs.sh new file mode 100755 index 0000000000..67f66e29f9 --- /dev/null +++ b/gen-ors-configs.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +ts="-$(date +%Y%m%d%H%M)" +err=0 +.github/utils/yml_config_to_ors_config_conversion.sh ors-api/src/main/resources/application.yml ors-api/src/main/resources/application-profiles.yml ors-config${ts}.yml + +((err=$err+$?)) + +.github/utils/yml_config_to_properties_conversion.sh ors-api/src/main/resources/application.yml ors-api/src/main/resources/application-profiles.yml ors-config${ts}.env + +((err=$err+$?)) + +(($err)) && exit 1 + +if [ "$1" = "replace" ]; then + replace=y +else + read -p "Replace ors-config.yml and ors-config.env? " -n 1 replace +fi + +if [[ "$replace" =~ [yYjJ] ]]; then + echo "Replacing ors-config.yml and ors-config.env" + set -o xtrace + mv ors-config${ts}.yml ors-config.yml + mv ors-config${ts}.env ors-config.env + set +o xtrace +fi \ No newline at end of file From 8c4d96ecdf4b5f1a991e79a65af6c8962ad269ec Mon Sep 17 00:00:00 2001 From: Jochen Haeussler Date: Fri, 12 Apr 2024 10:33:58 +0200 Subject: [PATCH 16/23] docs: add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4eead5a187..89d2732ff6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ RELEASING: ### Fixed - preparation mode exiting with code 0 on fail ([#1772](https://github.com/GIScience/openrouteservice/pull/1772)) +- some properties cannot be set in ors-config ors.engine.profile_default (Issue [#1762](https://github.com/GIScience/openrouteservice/issues/1762)) ## [8.0.0] - 2024-03-21 ### Added From c44440e19bb71db9ca0727ac62c49474bb943efe Mon Sep 17 00:00:00 2001 From: Jochen Haeussler Date: Fri, 12 Apr 2024 12:31:55 +0200 Subject: [PATCH 17/23] chore: remove no longer used code --- .integration-scenarios/debian-12-jar-mvn/run.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/.integration-scenarios/debian-12-jar-mvn/run.sh b/.integration-scenarios/debian-12-jar-mvn/run.sh index fc3b3c6991..fe8fb482fb 100755 --- a/.integration-scenarios/debian-12-jar-mvn/run.sh +++ b/.integration-scenarios/debian-12-jar-mvn/run.sh @@ -143,9 +143,6 @@ if [ -z "$pattern" ]; then echo -e "${B}No tests specified!${N}"; exit 0; fi mkdir -p "${TESTROOT}/graphs_volume" -cp $TESTROOT/../../ors-api/src/main/resources/application.yml $TESTROOT/tmp/ors-config.yml -yq -i '.ors.engine.profiles.car.enabled = true' $TESTROOT/tmp/ors-config.yml - hasErrors=0 passed=0 skipped=0 From bac2be93ab6cc799e22e9e852fff802fdf5dabb1 Mon Sep 17 00:00:00 2001 From: Jochen Haeussler Date: Fri, 12 Apr 2024 12:37:11 +0200 Subject: [PATCH 18/23] docs: add hint for removed profile properties --- docs/run-instance/configuration/json.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/run-instance/configuration/json.md b/docs/run-instance/configuration/json.md index e9cb2a578f..fe6fc00530 100644 --- a/docs/run-instance/configuration/json.md +++ b/docs/run-instance/configuration/json.md @@ -10,6 +10,15 @@ but we do **not** recommend using this configuration method. Please consider [migrating your JSON configuration](https://github.com/GIScience/ors-config-migration#usage) to the new style. Note that currently all settings in a provided JSON configuration file will **override** any settings in the YAML file. +:::warning +Since openrouteservice v8.0.1 some profile defaults were removed. +You have to set those properties in you profiles explicitly. +We recommend to [transform the json configuration to YAML](https://github.com/GIScience/ors-config-migration#usage) +and then compare the transformed file with the default `ors-config.yml` for the openrouteservice version you are using (>v8.0.0). +You can download `ors-config.yml` as release asset from [github](https://github.com/GIScience/openrouteservice/releases). +Note, that some profile properties can be defined in the yaml in `ors.engine.profile_default` as default for all profiles, where these properties are not set explicitly. +::: + ## ors The top level element. From 213d11a51fb2ca405d845b1dcf4e8496e0ab7629 Mon Sep 17 00:00:00 2001 From: Jochen Haeussler Date: Fri, 12 Apr 2024 12:40:54 +0200 Subject: [PATCH 19/23] docs: explain unchangeable profile names, clarify profile name and key --- .../configuration/ors/engine/profiles.md | 36 +++++++++++-------- docs/run-instance/running-with-docker.md | 2 +- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/docs/run-instance/configuration/ors/engine/profiles.md b/docs/run-instance/configuration/ors/engine/profiles.md index f88ed8aebc..e612d88874 100644 --- a/docs/run-instance/configuration/ors/engine/profiles.md +++ b/docs/run-instance/configuration/ors/engine/profiles.md @@ -3,20 +3,28 @@ The profiles object contains key-object-pairs for each profile you are using. -Available profiles are: -- `car` -- `hgv` -- `bike-regular` -- `bike-mountain` -- `bike-road` -- `bike-electric` -- `walking` -- `hiking` -- `wheelchair` -- `public-transport` +There are some default profile keys, where flag encoders (specified in `ors.engine.profiles.*.profile`) are predefined and not changeable. +These standard profiles are already predefined in our standard ors-config.yml with recommended default-specific settings: + +| `*` in `ors.engine.profiles.*` | flag encoder `ors.engine.profiles.*.profile` | +|--------------------------------|----------------------------------------------| +| `car` | `driving-car` | +| `hgv` | `driving-hgv` | +| `bike-regular` | `cycling-regular` | +| `bike-mountain` | `cycling-mountain` | +| `bike-road` | `cycling-road` | +| `bike-electric` | `cycling-electric` | +| `walking` | `foot-car` | +| `hiking` | `foot-hgv` | +| `wheelchair` | `wheelchair` | +| `public-transport` | `public-transport` | ::: warning -If you specified `profile_default` settings they might not be taken into account! +In the directions endpoint, the profiles are addressed by their encoder name (e.g. `driving-car`)! +::: + +::: warning +If you specified `profile_default` settings they might not be taken into account (v8.0.0)! This will be fixed in the next patch release. As a workaround, you can move all `profile_default` settings to the specific profile where you need them to work. ::: @@ -27,7 +35,7 @@ Properties for each (enabled) profile are set under `ors.engine.profiles. Date: Fri, 12 Apr 2024 13:24:42 +0200 Subject: [PATCH 20/23] docs: hints about (overriding) profile defaults in application-profiles.yml these hints will also be generated into ors-config.yml --- ors-api/src/main/resources/application-profiles.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ors-api/src/main/resources/application-profiles.yml b/ors-api/src/main/resources/application-profiles.yml index 5fa153d06c..0d98cce519 100644 --- a/ors-api/src/main/resources/application-profiles.yml +++ b/ors-api/src/main/resources/application-profiles.yml @@ -1,7 +1,12 @@ ors: engine: profiles: - # All properties defined in ors.engine.profile_default can also be set in each profile to overwrite the defaults profile-specific. + # All properties defined in `ors.engine.profile_default` can also be set in each profile to overwrite the defaults profile-specific. + # E.g. to enable a profile, add `enabled: true` to the profile. Or to enable all profiles, you could just set `enabled: true` in `ors.engine.profile_default`. + # Recommended profile specific values below. Note, that + # - `encoder_options` and `ext_storages` cannot be set in profile_default + # ` - `profile` cannot be overridden in ors-config.yml/ors-config.env for our standard profile keys: + # car, hgv, bike-regular, bike-mountain, bike-road, bike-electric, walking, hiking, wheelchair, public-transport car: profile: driving-car enabled: true From 38264130d90a307a5b6ed1d789f382067c712324 Mon Sep 17 00:00:00 2001 From: Jochen Haeussler Date: Fri, 12 Apr 2024 13:31:19 +0200 Subject: [PATCH 21/23] docs: explain required config changes in CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89d2732ff6..ce107611c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,8 @@ RELEASING: ### Fixed - preparation mode exiting with code 0 on fail ([#1772](https://github.com/GIScience/openrouteservice/pull/1772)) - some properties cannot be set in ors-config ors.engine.profile_default (Issue [#1762](https://github.com/GIScience/openrouteservice/issues/1762)) + - in existing ors-config.yml / ors-config.env the previously commented defaults have to be un-commented + - in existing json configs, properties have to be added in some cases, see documentation for json config ## [8.0.0] - 2024-03-21 ### Added From 720614836dd573025661b8ca05a78bfff0d159b9 Mon Sep 17 00:00:00 2001 From: Jochen Haeussler Date: Fri, 12 Apr 2024 14:35:27 +0200 Subject: [PATCH 22/23] test: separated yml from json in matrix There seem to be issues when a graph built with yml config is read by ors with json config. So either -C have to be set to clear graphs before each test, which slows down, or to separate the tests. Further investigation needed. --- .github/workflows/integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 996263a4a1..5b54498947 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -62,7 +62,7 @@ jobs: strategy: matrix: runtype: [ '-m' , '-j' ] - testgroup: [ build-all-graphs*, arg-overrides*, check*, config*, lookup*, missing*, ors-config*, specify*, profile-default* ] + testgroup: [ build-all-graphs*, arg-overrides*, check*, config-json*, config-yml*, lookup*, missing*, ors-config*, specify-json*, specify-yml*, profile-default* ] steps: - uses: actions/checkout@v4 with: From 9f825c0ca3ba1e9b6240eb3fe6f7b400d961ae18 Mon Sep 17 00:00:00 2001 From: jhaeu Date: Fri, 12 Apr 2024 13:17:41 +0000 Subject: [PATCH 23/23] chore(config): automatic conversion of application.yml to ors-config.yml and ors-config.env --- ors-config.env | 404 +++++++++++++++++------------------ ors-config.yml | 561 +++++++++++++++++++++++++------------------------ 2 files changed, 475 insertions(+), 490 deletions(-) diff --git a/ors-config.env b/ors-config.env index df38d45b93..1d48aa3638 100644 --- a/ors-config.env +++ b/ors-config.env @@ -1,214 +1,194 @@ -#server.port=8082 -#server.error.whitelabel.enabled=false -#server.servlet.context-path=/ors -#spring.profiles.active=default -#spring.mvc.servlet.path=/ -#springdoc.swagger-ui.enabled=true -#springdoc.swagger-ui.path=/swagger-ui -#springdoc.swagger-ui.tryItOutEnabled=true -#springdoc.swagger-ui.filter=false -#springdoc.swagger-ui.syntaxHighlight.activated=true -#springdoc.swagger-ui.showExtensions=true -#springdoc.api-docs.path=/v2/api-docs -#springdoc.api-docs.version=OPENAPI_3_0 -#springdoc.packages-to-scan=org.heigit.ors -#springdoc.pathsToMatch=/v2/** -#logging.file.name=./logs/ors.log -#logging.pattern.console=%d{yyyy-MM-dd HH:mm:ss} %highlight{%-7p} %style{%50t}{Cyan} %style{[ %-40.40c{1.} ]}{Bright Cyan} %m%n -#logging.pattern.file=%d{yyyy-MM-dd HH:mm:ss} %p [%-40.40c{1.}] - %m%n -#logging.level.root=WARN -#logging.level.org.heigit=INFO -#ors.cors.allowed_origins=* -#ors.cors.allowed_headers=Content-Type, X-Requested-With, accept, Origin, Access-Control-Request-Method, Access-Control-Request-Headers, Authorization -#ors.cors.preflight_max_age=600 -#ors.messages= -#ors.endpoints.routing.enabled=true -#ors.endpoints.routing.attribution=openrouteservice.org, OpenStreetMap contributors, tmc - BASt -#ors.endpoints.routing.gpx_name=ORSRouting -#ors.endpoints.routing.gpx_description=This is a directions instructions file as GPX, generated from openrouteservice -#ors.endpoints.routing.gpx_base_url=https://openrouteservice.org/ -#ors.endpoints.routing.gpx_support_mail=support@openrouteservice.org -#ors.endpoints.routing.gpx_author=openrouteservice -#ors.endpoints.routing.gpx_content_licence=LGPL 3.0 -#ors.endpoints.routing.maximum_avoid_polygon_area=200000000 -#ors.endpoints.routing.maximum_avoid_polygon_extent=20000 -#ors.endpoints.routing.maximum_alternative_routes=3 -#ors.endpoints.matrix.enabled=true -#ors.endpoints.matrix.attribution=openrouteservice.org, OpenStreetMap contributors -#ors.endpoints.matrix.maximum_routes=2500 -#ors.endpoints.matrix.maximum_routes_flexible=25 -#ors.endpoints.matrix.maximum_visited_nodes=100000 -#ors.endpoints.matrix.maximum_search_radius=2000 -#ors.endpoints.matrix.u_turn_costs=-1 -#ors.endpoints.isochrones.enabled=true -#ors.endpoints.isochrones.attribution=openrouteservice.org, OpenStreetMap contributors -#ors.endpoints.isochrones.maximum_locations=2 -#ors.endpoints.isochrones.maximum_intervals=1 -#ors.endpoints.isochrones.allow_compute_area=true -#ors.endpoints.isochrones.maximum_range_distance_default=50000 -#ors.endpoints.isochrones.maximum_range_distance.0.profiles=driving-car, driving-hgv -#ors.endpoints.isochrones.maximum_range_distance.0.value=100000 -#ors.endpoints.isochrones.maximum_range_time_default=18000 -#ors.endpoints.isochrones.maximum_range_time.0.profiles=driving-car, driving-hgv -#ors.endpoints.isochrones.maximum_range_time.0.value=3600 -#ors.endpoints.isochrones.fastisochrones.maximum_range_distance_default=50000 -#ors.endpoints.isochrones.fastisochrones.maximum_range_distance.0.profiles=driving-car, driving-hgv -#ors.endpoints.isochrones.fastisochrones.maximum_range_distance.0.value=500000 -#ors.endpoints.isochrones.fastisochrones.maximum_range_time_default=18000 -#ors.endpoints.isochrones.fastisochrones.maximum_range_time.0.profiles=driving-car, driving-hgv -#ors.endpoints.isochrones.fastisochrones.maximum_range_time.0.value=10800 -#ors.endpoints.Snap.enabled=true -#ors.endpoints.Snap.attribution=openrouteservice.org, OpenStreetMap contributors +server.port=8082 +server.error.whitelabel.enabled=false +server.servlet.context-path=/ors +spring.profiles.active=default +spring.mvc.servlet.path=/ +springdoc.swagger-ui.enabled=true +springdoc.swagger-ui.path=/swagger-ui +springdoc.swagger-ui.tryItOutEnabled=true +springdoc.swagger-ui.filter=false +springdoc.swagger-ui.syntaxHighlight.activated=true +springdoc.swagger-ui.showExtensions=true +springdoc.api-docs.path=/v2/api-docs +springdoc.api-docs.version=OPENAPI_3_0 +springdoc.packages-to-scan=org.heigit.ors +springdoc.pathsToMatch=/v2/** +logging.file.name=./logs/ors.log +logging.pattern.console=%d{yyyy-MM-dd HH:mm:ss} %highlight{%-7p} %style{%50t}{Cyan} %style{[ %-40.40c{1.} ]}{Bright Cyan} %m%n +logging.pattern.file=%d{yyyy-MM-dd HH:mm:ss} %p [%-40.40c{1.}] - %m%n +logging.level.root=WARN +logging.level.org.heigit=INFO +ors.cors.allowed_origins=* +ors.cors.allowed_headers=Content-Type, X-Requested-With, accept, Origin, Access-Control-Request-Method, Access-Control-Request-Headers, Authorization +ors.cors.preflight_max_age=600 +ors.messages= +ors.endpoints.routing.enabled=true +ors.endpoints.routing.attribution=openrouteservice.org, OpenStreetMap contributors, tmc - BASt +ors.endpoints.routing.gpx_name=ORSRouting +ors.endpoints.routing.gpx_description=This is a directions instructions file as GPX, generated from openrouteservice +ors.endpoints.routing.gpx_base_url=https://openrouteservice.org/ +ors.endpoints.routing.gpx_support_mail=support@openrouteservice.org +ors.endpoints.routing.gpx_author=openrouteservice +ors.endpoints.routing.gpx_content_licence=LGPL 3.0 +ors.endpoints.routing.maximum_avoid_polygon_area=200000000 +ors.endpoints.routing.maximum_avoid_polygon_extent=20000 +ors.endpoints.routing.maximum_alternative_routes=3 +ors.endpoints.matrix.enabled=true +ors.endpoints.matrix.attribution=openrouteservice.org, OpenStreetMap contributors +ors.endpoints.matrix.maximum_routes=2500 +ors.endpoints.matrix.maximum_routes_flexible=25 +ors.endpoints.matrix.maximum_visited_nodes=100000 +ors.endpoints.matrix.maximum_search_radius=2000 +ors.endpoints.matrix.u_turn_costs=-1 +ors.endpoints.isochrones.enabled=true +ors.endpoints.isochrones.attribution=openrouteservice.org, OpenStreetMap contributors +ors.endpoints.isochrones.maximum_locations=2 +ors.endpoints.isochrones.maximum_intervals=1 +ors.endpoints.isochrones.allow_compute_area=true +ors.endpoints.isochrones.maximum_range_distance_default=50000 +ors.endpoints.isochrones.maximum_range_distance.0.profiles=driving-car, driving-hgv +ors.endpoints.isochrones.maximum_range_distance.0.value=100000 +ors.endpoints.isochrones.maximum_range_time_default=18000 +ors.endpoints.isochrones.maximum_range_time.0.profiles=driving-car, driving-hgv +ors.endpoints.isochrones.maximum_range_time.0.value=3600 +ors.endpoints.isochrones.fastisochrones.maximum_range_distance_default=50000 +ors.endpoints.isochrones.fastisochrones.maximum_range_distance.0.profiles=driving-car, driving-hgv +ors.endpoints.isochrones.fastisochrones.maximum_range_distance.0.value=500000 +ors.endpoints.isochrones.fastisochrones.maximum_range_time_default=18000 +ors.endpoints.isochrones.fastisochrones.maximum_range_time.0.profiles=driving-car, driving-hgv +ors.endpoints.isochrones.fastisochrones.maximum_range_time.0.value=10800 +ors.endpoints.Snap.enabled=true +ors.endpoints.Snap.attribution=openrouteservice.org, OpenStreetMap contributors ors.engine.source_file=ors-api/src/test/files/heidelberg.osm.gz -#ors.engine.init_threads=1 -#ors.engine.preparation_mode=false -#ors.engine.graphs_root_path=./graphs -#ors.engine.graphs_data_access=RAM_STORE -#ors.engine.elevation.preprocessed=false -#ors.engine.elevation.data_access=MMAP -#ors.engine.elevation.cache_clear=false -#ors.engine.elevation.provider=multi -#ors.engine.elevation.cache_path=./elevation_cache -#ors.engine.profile_default.enabled=false -#ors.engine.profile_default.elevation=false -#ors.engine.profile_default.elevation_smoothing=false -#ors.engine.profile_default.encoder_flags_size=8 -#ors.engine.profile_default.instructions=true -#ors.engine.profile_default.optimize=false -#ors.engine.profile_default.traffic=false -#ors.engine.profile_default.maximum_distance=100000 -#ors.engine.profile_default.maximum_distance_dynamic_weights=100000 -#ors.engine.profile_default.maximum_distance_avoid_areas=100000 -#ors.engine.profile_default.maximum_waypoints=50 -#ors.engine.profile_default.maximum_snapping_radius=400 -#ors.engine.profile_default.maximum_distance_alternative_routes=100000 -#ors.engine.profile_default.maximum_distance_round_trip_routes=100000 -#ors.engine.profile_default.maximum_speed_lower_bound=80 -#ors.engine.profile_default.maximum_visited_nodes=1000000 -#ors.engine.profile_default.location_index_resolution=500 -#ors.engine.profile_default.location_index_search_iterations=4 -#ors.engine.profile_default.force_turn_costs=false -#ors.engine.profile_default.interpolate_bridges_and_tunnels=true -#ors.engine.profile_default.preparation.min_network_size=200 -#ors.engine.profile_default.preparation.methods.lm.enabled=true -#ors.engine.profile_default.preparation.methods.lm.threads=1 -#ors.engine.profile_default.preparation.methods.lm.weightings=recommended,shortest -#ors.engine.profile_default.preparation.methods.lm.landmarks=16 -#ors.engine.profile_default.execution.methods.lm.active_landmarks=8 +ors.engine.init_threads=1 +ors.engine.preparation_mode=false +ors.engine.graphs_root_path=./graphs +ors.engine.graphs_data_access=RAM_STORE +ors.engine.elevation.preprocessed=false +ors.engine.elevation.data_access=MMAP +ors.engine.elevation.cache_clear=false +ors.engine.elevation.provider=multi +ors.engine.elevation.cache_path=./elevation_cache +ors.engine.profile_default.enabled=false +ors.engine.profile_default.elevation=true +ors.engine.profile_default.elevation_smoothing=false +ors.engine.profile_default.encoder_flags_size=8 +ors.engine.profile_default.instructions=true +ors.engine.profile_default.optimize=false +ors.engine.profile_default.traffic=false +ors.engine.profile_default.maximum_distance=100000 +ors.engine.profile_default.maximum_distance_dynamic_weights=100000 +ors.engine.profile_default.maximum_distance_avoid_areas=100000 +ors.engine.profile_default.maximum_waypoints=50 +ors.engine.profile_default.maximum_snapping_radius=400 +ors.engine.profile_default.maximum_distance_alternative_routes=100000 +ors.engine.profile_default.maximum_distance_round_trip_routes=100000 +ors.engine.profile_default.maximum_speed_lower_bound=80 +ors.engine.profile_default.maximum_visited_nodes=1000000 +ors.engine.profile_default.location_index_resolution=500 +ors.engine.profile_default.location_index_search_iterations=4 +ors.engine.profile_default.force_turn_costs=false +ors.engine.profile_default.interpolate_bridges_and_tunnels=true +ors.engine.profile_default.preparation.min_network_size=200 +ors.engine.profile_default.preparation.methods.lm.enabled=true +ors.engine.profile_default.preparation.methods.lm.threads=1 +ors.engine.profile_default.preparation.methods.lm.weightings=recommended,shortest +ors.engine.profile_default.preparation.methods.lm.landmarks=16 +ors.engine.profile_default.execution.methods.lm.active_landmarks=8 +ors.engine.profiles.car.profile=driving-car ors.engine.profiles.car.enabled=true -#ors.engine.profiles.car.profile=driving-car -#ors.engine.profiles.car.elevation=true -#ors.engine.profiles.car.encoder_options.turn_costs=true -#ors.engine.profiles.car.encoder_options.block_fords=false -#ors.engine.profiles.car.encoder_options.use_acceleration=true -#ors.engine.profiles.car.preparation.min_network_size=200 -#ors.engine.profiles.car.preparation.methods.ch.enabled=true -#ors.engine.profiles.car.preparation.methods.ch.threads=1 -#ors.engine.profiles.car.preparation.methods.ch.weightings=fastest -#ors.engine.profiles.car.preparation.methods.lm.enabled=false -#ors.engine.profiles.car.preparation.methods.lm.threads=1 -#ors.engine.profiles.car.preparation.methods.lm.weightings=fastest,shortest -#ors.engine.profiles.car.preparation.methods.lm.landmarks=16 -#ors.engine.profiles.car.preparation.methods.core.enabled=true -#ors.engine.profiles.car.preparation.methods.core.threads=1 -#ors.engine.profiles.car.preparation.methods.core.weightings=fastest,shortest -#ors.engine.profiles.car.preparation.methods.core.landmarks=64 -#ors.engine.profiles.car.preparation.methods.core.lmsets=highways;allow_all -#ors.engine.profiles.car.execution.methods.lm.active_landmarks=6 -#ors.engine.profiles.car.execution.methods.core.active_landmarks=6 -#ors.engine.profiles.car.ext_storages.WayCategory= -#ors.engine.profiles.car.ext_storages.HeavyVehicle= -#ors.engine.profiles.car.ext_storages.WaySurfaceType= -#ors.engine.profiles.car.ext_storages.RoadAccessRestrictions.use_for_warnings=true -#ors.engine.profiles.hgv.enabled=false -#ors.engine.profiles.hgv.profile=driving-hgv -#ors.engine.profiles.hgv.encoder_flags_size=8 -#ors.engine.profiles.hgv.encoder_options.turn_costs=true -#ors.engine.profiles.hgv.encoder_options.block_fords=false -#ors.engine.profiles.hgv.encoder_options.use_acceleration=true -#ors.engine.profiles.hgv.maximum_distance=100000 -#ors.engine.profiles.hgv.elevation=true -#ors.engine.profiles.hgv.preparation.min_network_size=200 -#ors.engine.profiles.hgv.preparation.methods.ch.enabled=true -#ors.engine.profiles.hgv.preparation.methods.ch.threads=1 -#ors.engine.profiles.hgv.preparation.methods.ch.weightings=recommended -#ors.engine.profiles.hgv.preparation.methods.core.enabled=true -#ors.engine.profiles.hgv.preparation.methods.core.threads=1 -#ors.engine.profiles.hgv.preparation.methods.core.weightings=recommended,shortest -#ors.engine.profiles.hgv.preparation.methods.core.landmarks=64 -#ors.engine.profiles.hgv.preparation.methods.core.lmsets=highways;allow_all -#ors.engine.profiles.hgv.execution.methods.core.active_landmarks=6 -#ors.engine.profiles.hgv.ext_storages.WayCategory= -#ors.engine.profiles.hgv.ext_storages.HeavyVehicle.restrictions=true -#ors.engine.profiles.hgv.ext_storages.WaySurfaceType= -#ors.engine.profiles.bike-regular.enabled=false -#ors.engine.profiles.bike-regular.profile=cycling-regular -#ors.engine.profiles.bike-regular.encoder_options.consider_elevation=true -#ors.engine.profiles.bike-regular.encoder_options.turn_costs=true -#ors.engine.profiles.bike-regular.encoder_options.block_fords=false -#ors.engine.profiles.bike-regular.elevation=true -#ors.engine.profiles.bike-regular.ext_storages.WayCategory= -#ors.engine.profiles.bike-regular.ext_storages.WaySurfaceType= -#ors.engine.profiles.bike-regular.ext_storages.HillIndex= -#ors.engine.profiles.bike-regular.ext_storages.TrailDifficulty= -#ors.engine.profiles.bike-mountain.enabled=false -#ors.engine.profiles.bike-mountain.profile=cycling-mountain -#ors.engine.profiles.bike-mountain.encoder_options.consider_elevation=true -#ors.engine.profiles.bike-mountain.encoder_options.turn_costs=true -#ors.engine.profiles.bike-mountain.encoder_options.block_fords=false -#ors.engine.profiles.bike-mountain.elevation=true -#ors.engine.profiles.bike-mountain.ext_storages.WayCategory= -#ors.engine.profiles.bike-mountain.ext_storages.WaySurfaceType= -#ors.engine.profiles.bike-mountain.ext_storages.HillIndex= -#ors.engine.profiles.bike-mountain.ext_storages.TrailDifficulty= -#ors.engine.profiles.bike-road.enabled=false -#ors.engine.profiles.bike-road.profile=cycling-road -#ors.engine.profiles.bike-road.encoder_options.consider_elevation=true -#ors.engine.profiles.bike-road.encoder_options.turn_costs=true -#ors.engine.profiles.bike-road.encoder_options.block_fords=false -#ors.engine.profiles.bike-road.elevation=true -#ors.engine.profiles.bike-road.ext_storages.WayCategory= -#ors.engine.profiles.bike-road.ext_storages.WaySurfaceType= -#ors.engine.profiles.bike-road.ext_storages.HillIndex= -#ors.engine.profiles.bike-road.ext_storages.TrailDifficulty= -#ors.engine.profiles.bike-electric.enabled=false -#ors.engine.profiles.bike-electric.profile=cycling-electric -#ors.engine.profiles.bike-electric.encoder_options.consider_elevation=true -#ors.engine.profiles.bike-electric.encoder_options.turn_costs=true -#ors.engine.profiles.bike-electric.encoder_options.block_fords=false -#ors.engine.profiles.bike-electric.elevation=true -#ors.engine.profiles.bike-electric.ext_storages.WayCategory= -#ors.engine.profiles.bike-electric.ext_storages.WaySurfaceType= -#ors.engine.profiles.bike-electric.ext_storages.HillIndex= -#ors.engine.profiles.bike-electric.ext_storages.TrailDifficulty= -#ors.engine.profiles.walking.enabled=false -#ors.engine.profiles.walking.profile=foot-walking -#ors.engine.profiles.walking.encoder_options.block_fords=false -#ors.engine.profiles.walking.elevation=true -#ors.engine.profiles.walking.ext_storages.WayCategory= -#ors.engine.profiles.walking.ext_storages.WaySurfaceType= -#ors.engine.profiles.walking.ext_storages.HillIndex= -#ors.engine.profiles.walking.ext_storages.TrailDifficulty= -#ors.engine.profiles.hiking.enabled=false -#ors.engine.profiles.hiking.profile=foot-hiking -#ors.engine.profiles.hiking.encoder_options.block_fords=false -#ors.engine.profiles.hiking.elevation=true -#ors.engine.profiles.hiking.ext_storages.WayCategory= -#ors.engine.profiles.hiking.ext_storages.WaySurfaceType= -#ors.engine.profiles.hiking.ext_storages.HillIndex= -#ors.engine.profiles.hiking.ext_storages.TrailDifficulty= -#ors.engine.profiles.wheelchair.enabled=false -#ors.engine.profiles.wheelchair.profile=wheelchair -#ors.engine.profiles.wheelchair.encoder_options.block_fords=true -#ors.engine.profiles.wheelchair.elevation=true -#ors.engine.profiles.wheelchair.maximum_snapping_radius=50 -#ors.engine.profiles.wheelchair.ext_storages.WayCategory= -#ors.engine.profiles.wheelchair.ext_storages.WaySurfaceType= -#ors.engine.profiles.wheelchair.ext_storages.Wheelchair.KerbsOnCrossings=true -#ors.engine.profiles.wheelchair.ext_storages.OsmId= -#ors.engine.profiles.public-transport.enabled=false -#ors.engine.profiles.public-transport.profile=public-transport -#ors.engine.profiles.public-transport.encoder_options.block_fords=false -#ors.engine.profiles.public-transport.elevation=true -#ors.engine.profiles.public-transport.maximum_visited_nodes=1000000 -#ors.engine.profiles.public-transport.gtfs_file=./src/test/files/vrn_gtfs_cut.zip +ors.engine.profiles.car.encoder_options.turn_costs=true +ors.engine.profiles.car.encoder_options.block_fords=false +ors.engine.profiles.car.encoder_options.use_acceleration=true +ors.engine.profiles.car.preparation.min_network_size=200 +ors.engine.profiles.car.preparation.methods.ch.enabled=true +ors.engine.profiles.car.preparation.methods.ch.threads=1 +ors.engine.profiles.car.preparation.methods.ch.weightings=fastest +ors.engine.profiles.car.preparation.methods.lm.enabled=false +ors.engine.profiles.car.preparation.methods.lm.threads=1 +ors.engine.profiles.car.preparation.methods.lm.weightings=fastest,shortest +ors.engine.profiles.car.preparation.methods.lm.landmarks=16 +ors.engine.profiles.car.preparation.methods.core.enabled=true +ors.engine.profiles.car.preparation.methods.core.threads=1 +ors.engine.profiles.car.preparation.methods.core.weightings=fastest,shortest +ors.engine.profiles.car.preparation.methods.core.landmarks=64 +ors.engine.profiles.car.preparation.methods.core.lmsets=highways;allow_all +ors.engine.profiles.car.execution.methods.lm.active_landmarks=6 +ors.engine.profiles.car.execution.methods.core.active_landmarks=6 +ors.engine.profiles.car.ext_storages.WayCategory= +ors.engine.profiles.car.ext_storages.HeavyVehicle= +ors.engine.profiles.car.ext_storages.WaySurfaceType= +ors.engine.profiles.car.ext_storages.RoadAccessRestrictions.use_for_warnings=true +ors.engine.profiles.hgv.profile=driving-hgv +ors.engine.profiles.hgv.encoder_options.turn_costs=true +ors.engine.profiles.hgv.encoder_options.block_fords=false +ors.engine.profiles.hgv.encoder_options.use_acceleration=true +ors.engine.profiles.hgv.preparation.min_network_size=200 +ors.engine.profiles.hgv.preparation.methods.ch.enabled=true +ors.engine.profiles.hgv.preparation.methods.ch.threads=1 +ors.engine.profiles.hgv.preparation.methods.ch.weightings=recommended +ors.engine.profiles.hgv.preparation.methods.core.enabled=true +ors.engine.profiles.hgv.preparation.methods.core.threads=1 +ors.engine.profiles.hgv.preparation.methods.core.weightings=recommended,shortest +ors.engine.profiles.hgv.preparation.methods.core.landmarks=64 +ors.engine.profiles.hgv.preparation.methods.core.lmsets=highways;allow_all +ors.engine.profiles.hgv.execution.methods.core.active_landmarks=6 +ors.engine.profiles.hgv.ext_storages.WayCategory= +ors.engine.profiles.hgv.ext_storages.HeavyVehicle.restrictions=true +ors.engine.profiles.hgv.ext_storages.WaySurfaceType= +ors.engine.profiles.bike-regular.profile=cycling-regular +ors.engine.profiles.bike-regular.encoder_options.consider_elevation=true +ors.engine.profiles.bike-regular.encoder_options.turn_costs=true +ors.engine.profiles.bike-regular.encoder_options.block_fords=false +ors.engine.profiles.bike-regular.ext_storages.WayCategory= +ors.engine.profiles.bike-regular.ext_storages.WaySurfaceType= +ors.engine.profiles.bike-regular.ext_storages.HillIndex= +ors.engine.profiles.bike-regular.ext_storages.TrailDifficulty= +ors.engine.profiles.bike-mountain.profile=cycling-mountain +ors.engine.profiles.bike-mountain.encoder_options.consider_elevation=true +ors.engine.profiles.bike-mountain.encoder_options.turn_costs=true +ors.engine.profiles.bike-mountain.encoder_options.block_fords=false +ors.engine.profiles.bike-mountain.ext_storages.WayCategory= +ors.engine.profiles.bike-mountain.ext_storages.WaySurfaceType= +ors.engine.profiles.bike-mountain.ext_storages.HillIndex= +ors.engine.profiles.bike-mountain.ext_storages.TrailDifficulty= +ors.engine.profiles.bike-road.profile=cycling-road +ors.engine.profiles.bike-road.encoder_options.consider_elevation=true +ors.engine.profiles.bike-road.encoder_options.turn_costs=true +ors.engine.profiles.bike-road.encoder_options.block_fords=false +ors.engine.profiles.bike-road.ext_storages.WayCategory= +ors.engine.profiles.bike-road.ext_storages.WaySurfaceType= +ors.engine.profiles.bike-road.ext_storages.HillIndex= +ors.engine.profiles.bike-road.ext_storages.TrailDifficulty= +ors.engine.profiles.bike-electric.profile=cycling-electric +ors.engine.profiles.bike-electric.encoder_options.consider_elevation=true +ors.engine.profiles.bike-electric.encoder_options.turn_costs=true +ors.engine.profiles.bike-electric.encoder_options.block_fords=false +ors.engine.profiles.bike-electric.ext_storages.WayCategory= +ors.engine.profiles.bike-electric.ext_storages.WaySurfaceType= +ors.engine.profiles.bike-electric.ext_storages.HillIndex= +ors.engine.profiles.bike-electric.ext_storages.TrailDifficulty= +ors.engine.profiles.walking.profile=foot-walking +ors.engine.profiles.walking.encoder_options.block_fords=false +ors.engine.profiles.walking.ext_storages.WayCategory= +ors.engine.profiles.walking.ext_storages.WaySurfaceType= +ors.engine.profiles.walking.ext_storages.HillIndex= +ors.engine.profiles.walking.ext_storages.TrailDifficulty= +ors.engine.profiles.hiking.profile=foot-hiking +ors.engine.profiles.hiking.encoder_options.block_fords=false +ors.engine.profiles.hiking.ext_storages.WayCategory= +ors.engine.profiles.hiking.ext_storages.WaySurfaceType= +ors.engine.profiles.hiking.ext_storages.HillIndex= +ors.engine.profiles.hiking.ext_storages.TrailDifficulty= +ors.engine.profiles.wheelchair.profile=wheelchair +ors.engine.profiles.wheelchair.encoder_options.block_fords=true +ors.engine.profiles.wheelchair.maximum_snapping_radius=50 +ors.engine.profiles.wheelchair.ext_storages.WayCategory= +ors.engine.profiles.wheelchair.ext_storages.WaySurfaceType= +ors.engine.profiles.wheelchair.ext_storages.Wheelchair.KerbsOnCrossings=true +ors.engine.profiles.wheelchair.ext_storages.OsmId= +ors.engine.profiles.public-transport.profile=public-transport +ors.engine.profiles.public-transport.encoder_options.block_fords=false +ors.engine.profiles.public-transport.elevation=true +ors.engine.profiles.public-transport.maximum_visited_nodes=1000000 +ors.engine.profiles.public-transport.gtfs_file=ors-api/src/test/files/vrn_gtfs_cut.zip diff --git a/ors-config.yml b/ors-config.yml index b551f30041..ac2861154c 100644 --- a/ors-config.yml +++ b/ors-config.yml @@ -3,290 +3,295 @@ # For a full list of possible parameters see https://giscience.github.io/openrouteservice/run-instance/configuration/ ##### General server settings ##### -#server: -# port: 8082 -# error: -# whitelabel: -# enabled: false -# # Keep the context-path at / else the war file run with tomcat will have the context-path of /ors/v2 as well. -# servlet: -# context-path: /ors -#spring: -# profiles: -# active: default -# mvc: -# servlet: -# path: / +server: + port: 8082 + error: + whitelabel: + enabled: false + # Keep the context-path at / else the war file run with tomcat will have the context-path of /ors/v2 as well. + servlet: + context-path: /ors +spring: + profiles: + active: default + mvc: + servlet: + path: / ##### Settings related to springdoc ##### -#springdoc: -# swagger-ui: -# enabled: true -# path: /swagger-ui -# tryItOutEnabled: true -# filter: false -# syntaxHighlight: -# activated: true -# showExtensions: true -# api-docs: -# path: /v2/api-docs -# version: OPENAPI_3_0 -# packages-to-scan: org.heigit.ors -# pathsToMatch: /v2/** +springdoc: + swagger-ui: + enabled: true + path: /swagger-ui + tryItOutEnabled: true + filter: false + syntaxHighlight: + activated: true + showExtensions: true + api-docs: + path: /v2/api-docs + version: OPENAPI_3_0 + packages-to-scan: org.heigit.ors + pathsToMatch: /v2/** ##### Logging settings ##### -#logging: -# file: -# name: ./logs/ors.log -# pattern: -# console: "%d{yyyy-MM-dd HH:mm:ss} %highlight{%-7p} %style{%50t}{Cyan} %style{[ %-40.40c{1.} ]}{Bright Cyan} %m%n" -# file: "%d{yyyy-MM-dd HH:mm:ss} %p [%-40.40c{1.}] - %m%n" -# level: -# root: WARN -# org.heigit: INFO +logging: + file: + name: ./logs/ors.log + pattern: + console: "%d{yyyy-MM-dd HH:mm:ss} %highlight{%-7p} %style{%50t}{Cyan} %style{[ %-40.40c{1.} ]}{Bright Cyan} %m%n" + file: "%d{yyyy-MM-dd HH:mm:ss} %p [%-40.40c{1.}] - %m%n" + level: + root: WARN + org.heigit: INFO ##### openrouteservice specific settings ##### ors: - # cors: - # allowed_origins: "*" - # allowed_headers: Content-Type, X-Requested-With, accept, Origin, Access-Control-Request-Method, Access-Control-Request-Headers, Authorization - # preflight_max_age: 600 - # messages: - # ##### ORS endpoints settings ##### - # endpoints: - # routing: - # enabled: true - # attribution: openrouteservice.org, OpenStreetMap contributors, tmc - BASt - # gpx_name: ORSRouting - # gpx_description: This is a directions instructions file as GPX, generated from openrouteservice - # gpx_base_url: https://openrouteservice.org/ - # gpx_support_mail: support@openrouteservice.org - # gpx_author: openrouteservice - # gpx_content_licence: LGPL 3.0 - # maximum_avoid_polygon_area: 200000000 - # maximum_avoid_polygon_extent: 20000 - # maximum_alternative_routes: 3 - # matrix: - # enabled: true - # attribution: openrouteservice.org, OpenStreetMap contributors - # maximum_routes: 2500 - # maximum_routes_flexible: 25 - # maximum_visited_nodes: 100000 - # maximum_search_radius: 2000 - # u_turn_costs: -1 - # isochrones: - # enabled: true - # attribution: openrouteservice.org, OpenStreetMap contributors - # maximum_locations: 2 - # maximum_intervals: 1 - # allow_compute_area: true - # maximum_range_distance_default: 50000 - # maximum_range_distance: - # - profiles: driving-car, driving-hgv - # value: 100000 - # maximum_range_time_default: 18000 - # maximum_range_time: - # - profiles: driving-car, driving-hgv - # value: 3600 - # fastisochrones: - # maximum_range_distance_default: 50000 - # maximum_range_distance: - # - profiles: driving-car, driving-hgv - # value: 500000 - # maximum_range_time_default: 18000 - # maximum_range_time: - # - profiles: driving-car, driving-hgv - # value: 10800 - # Snap: - # enabled: true - # attribution: openrouteservice.org, OpenStreetMap contributors - # ##### ORS engine settings ##### + cors: + allowed_origins: "*" + allowed_headers: Content-Type, X-Requested-With, accept, Origin, Access-Control-Request-Method, Access-Control-Request-Headers, Authorization + preflight_max_age: 600 + messages: + ##### ORS endpoints settings ##### + endpoints: + routing: + enabled: true + attribution: openrouteservice.org, OpenStreetMap contributors, tmc - BASt + gpx_name: ORSRouting + gpx_description: This is a directions instructions file as GPX, generated from openrouteservice + gpx_base_url: https://openrouteservice.org/ + gpx_support_mail: support@openrouteservice.org + gpx_author: openrouteservice + gpx_content_licence: LGPL 3.0 + maximum_avoid_polygon_area: 200000000 + maximum_avoid_polygon_extent: 20000 + maximum_alternative_routes: 3 + matrix: + enabled: true + attribution: openrouteservice.org, OpenStreetMap contributors + maximum_routes: 2500 + maximum_routes_flexible: 25 + maximum_visited_nodes: 100000 + maximum_search_radius: 2000 + u_turn_costs: -1 + isochrones: + enabled: true + attribution: openrouteservice.org, OpenStreetMap contributors + maximum_locations: 2 + maximum_intervals: 1 + allow_compute_area: true + maximum_range_distance_default: 50000 + maximum_range_distance: + - profiles: driving-car, driving-hgv + value: 100000 + maximum_range_time_default: 18000 + maximum_range_time: + - profiles: driving-car, driving-hgv + value: 3600 + fastisochrones: + maximum_range_distance_default: 50000 + maximum_range_distance: + - profiles: driving-car, driving-hgv + value: 500000 + maximum_range_time_default: 18000 + maximum_range_time: + - profiles: driving-car, driving-hgv + value: 10800 + Snap: + enabled: true + attribution: openrouteservice.org, OpenStreetMap contributors + ##### ORS engine settings ##### engine: source_file: ors-api/src/test/files/heidelberg.osm.gz - # init_threads: 1 - # preparation_mode: false - # graphs_root_path: ./graphs - # graphs_data_access: RAM_STORE - # elevation: - # preprocessed: false - # data_access: MMAP - # cache_clear: false - # provider: multi - # cache_path: ./elevation_cache - # profile_default: - # enabled: false - # elevation: true - # elevation_smoothing: false - # encoder_flags_size: 8 - # instructions: true - # optimize: false - # traffic: false - # maximum_distance: 100000 - # maximum_distance_dynamic_weights: 100000 - # maximum_distance_avoid_areas: 100000 - # maximum_waypoints: 50 - # maximum_snapping_radius: 400 - # maximum_distance_alternative_routes: 100000 - # maximum_distance_round_trip_routes: 100000 - # maximum_speed_lower_bound: 80 - # maximum_visited_nodes: 1000000 - # location_index_resolution: 500 - # location_index_search_iterations: 4 - # force_turn_costs: false - # interpolate_bridges_and_tunnels: true - # preparation: - # min_network_size: 200 - # methods: - # lm: - # enabled: true - # threads: 1 - # weightings: recommended,shortest - # landmarks: 16 - # execution: - # methods: - # lm: - # active_landmarks: 8 + init_threads: 1 + preparation_mode: false + graphs_root_path: ./graphs + graphs_data_access: RAM_STORE + elevation: + preprocessed: false + data_access: MMAP + cache_clear: false + provider: multi + cache_path: ./elevation_cache + profile_default: + enabled: false + elevation: true + elevation_smoothing: false + encoder_flags_size: 8 + instructions: true + optimize: false + traffic: false + maximum_distance: 100000 + maximum_distance_dynamic_weights: 100000 + maximum_distance_avoid_areas: 100000 + maximum_waypoints: 50 + maximum_snapping_radius: 400 + maximum_distance_alternative_routes: 100000 + maximum_distance_round_trip_routes: 100000 + maximum_speed_lower_bound: 80 + maximum_visited_nodes: 1000000 + location_index_resolution: 500 + location_index_search_iterations: 4 + force_turn_costs: false + interpolate_bridges_and_tunnels: true + preparation: + min_network_size: 200 + methods: + lm: + enabled: true + threads: 1 + weightings: recommended,shortest + landmarks: 16 + execution: + methods: + lm: + active_landmarks: 8 profiles: - # # All properties defined in ors.engine.profile_default can also be set in each profile to overwrite the defaults profile-specific. + # All properties defined in `ors.engine.profile_default` can also be set in each profile to overwrite the defaults profile-specific. + # E.g. to enable a profile, add `enabled: true` to the profile. Or to enable all profiles, you could just set `enabled: true` in `ors.engine.profile_default`. + # Recommended profile specific values below. Note, that + # - `encoder_options` and `ext_storages` cannot be set in profile_default + # ` - `profile` cannot be overridden in ors-config.yml/ors-config.env for our standard profile keys: + # car, hgv, bike-regular, bike-mountain, bike-road, bike-electric, walking, hiking, wheelchair, public-transport car: + profile: driving-car enabled: true -# profile: driving-car -# encoder_options: -# turn_costs: true -# block_fords: false -# use_acceleration: true -# preparation: -# min_network_size: 200 -# methods: -# ch: -# enabled: true -# threads: 1 -# weightings: fastest -# lm: -# enabled: false -# threads: 1 -# weightings: fastest,shortest -# landmarks: 16 -# core: -# enabled: true -# threads: 1 -# weightings: fastest,shortest -# landmarks: 64 -# lmsets: highways;allow_all -# execution: -# methods: -# lm: -# active_landmarks: 6 -# core: -# active_landmarks: 6 -# ext_storages: -# WayCategory: -# HeavyVehicle: -# WaySurfaceType: -# RoadAccessRestrictions: -# use_for_warnings: true -# hgv: -# profile: driving-hgv -# encoder_options: -# turn_costs: true -# block_fords: false -# use_acceleration: true -# preparation: -# min_network_size: 200 -# methods: -# ch: -# enabled: true -# threads: 1 -# weightings: recommended -# core: -# enabled: true -# threads: 1 -# weightings: recommended,shortest -# landmarks: 64 -# lmsets: highways;allow_all -# execution: -# methods: -# core: -# active_landmarks: 6 -# ext_storages: -# WayCategory: -# HeavyVehicle: -# restrictions: true -# WaySurfaceType: -# bike-regular: -# profile: cycling-regular -# encoder_options: -# consider_elevation: true -# turn_costs: true -# block_fords: false -# ext_storages: -# WayCategory: -# WaySurfaceType: -# HillIndex: -# TrailDifficulty: -# bike-mountain: -# profile: cycling-mountain -# encoder_options: -# consider_elevation: true -# turn_costs: true -# block_fords: false -# ext_storages: -# WayCategory: -# WaySurfaceType: -# HillIndex: -# TrailDifficulty: -# bike-road: -# profile: cycling-road -# encoder_options: -# consider_elevation: true -# turn_costs: true -# block_fords: false -# ext_storages: -# WayCategory: -# WaySurfaceType: -# HillIndex: -# TrailDifficulty: -# bike-electric: -# profile: cycling-electric -# encoder_options: -# consider_elevation: true -# turn_costs: true -# block_fords: false -# ext_storages: -# WayCategory: -# WaySurfaceType: -# HillIndex: -# TrailDifficulty: -# walking: -# profile: foot-walking -# encoder_options: -# block_fords: false -# ext_storages: -# WayCategory: -# WaySurfaceType: -# HillIndex: -# TrailDifficulty: -# hiking: -# profile: foot-hiking -# encoder_options: -# block_fords: false -# ext_storages: -# WayCategory: -# WaySurfaceType: -# HillIndex: -# TrailDifficulty: -# wheelchair: -# profile: wheelchair -# encoder_options: -# block_fords: true -# maximum_snapping_radius: 50 -# ext_storages: -# WayCategory: -# WaySurfaceType: -# Wheelchair: -# KerbsOnCrossings: true -# OsmId: -# public-transport: -# profile: public-transport -# encoder_options: -# block_fords: false -# elevation: true -# maximum_visited_nodes: 1000000 -# gtfs_file: ./src/test/files/vrn_gtfs_cut.zip + encoder_options: + turn_costs: true + block_fords: false + use_acceleration: true + preparation: + min_network_size: 200 + methods: + ch: + enabled: true + threads: 1 + weightings: fastest + lm: + enabled: false + threads: 1 + weightings: fastest,shortest + landmarks: 16 + core: + enabled: true + threads: 1 + weightings: fastest,shortest + landmarks: 64 + lmsets: highways;allow_all + execution: + methods: + lm: + active_landmarks: 6 + core: + active_landmarks: 6 + ext_storages: + WayCategory: + HeavyVehicle: + WaySurfaceType: + RoadAccessRestrictions: + use_for_warnings: true + hgv: + profile: driving-hgv + encoder_options: + turn_costs: true + block_fords: false + use_acceleration: true + preparation: + min_network_size: 200 + methods: + ch: + enabled: true + threads: 1 + weightings: recommended + core: + enabled: true + threads: 1 + weightings: recommended,shortest + landmarks: 64 + lmsets: highways;allow_all + execution: + methods: + core: + active_landmarks: 6 + ext_storages: + WayCategory: + HeavyVehicle: + restrictions: true + WaySurfaceType: + bike-regular: + profile: cycling-regular + encoder_options: + consider_elevation: true + turn_costs: true + block_fords: false + ext_storages: + WayCategory: + WaySurfaceType: + HillIndex: + TrailDifficulty: + bike-mountain: + profile: cycling-mountain + encoder_options: + consider_elevation: true + turn_costs: true + block_fords: false + ext_storages: + WayCategory: + WaySurfaceType: + HillIndex: + TrailDifficulty: + bike-road: + profile: cycling-road + encoder_options: + consider_elevation: true + turn_costs: true + block_fords: false + ext_storages: + WayCategory: + WaySurfaceType: + HillIndex: + TrailDifficulty: + bike-electric: + profile: cycling-electric + encoder_options: + consider_elevation: true + turn_costs: true + block_fords: false + ext_storages: + WayCategory: + WaySurfaceType: + HillIndex: + TrailDifficulty: + walking: + profile: foot-walking + encoder_options: + block_fords: false + ext_storages: + WayCategory: + WaySurfaceType: + HillIndex: + TrailDifficulty: + hiking: + profile: foot-hiking + encoder_options: + block_fords: false + ext_storages: + WayCategory: + WaySurfaceType: + HillIndex: + TrailDifficulty: + wheelchair: + profile: wheelchair + encoder_options: + block_fords: true + maximum_snapping_radius: 50 + ext_storages: + WayCategory: + WaySurfaceType: + Wheelchair: + KerbsOnCrossings: true + OsmId: + public-transport: + profile: public-transport + encoder_options: + block_fords: false + elevation: true + maximum_visited_nodes: 1000000 + gtfs_file: ors-api/src/test/files/vrn_gtfs_cut.zip