diff --git a/ors-api/pom.xml b/ors-api/pom.xml
index 9861111898..d323bf2aca 100644
--- a/ors-api/pom.xml
+++ b/ors-api/pom.xml
@@ -30,7 +30,7 @@
../pom.xml
openrouteservice
org.heigit.ors
- 9.3.0
+ 9.4.0-SNAPSHOT
4.0.0
diff --git a/ors-api/src/test/java/org/heigit/ors/apitests/routing/ResultTest.java b/ors-api/src/test/java/org/heigit/ors/apitests/routing/ResultTest.java
index 19a25efb27..c68d890d7f 100644
--- a/ors-api/src/test/java/org/heigit/ors/apitests/routing/ResultTest.java
+++ b/ors-api/src/test/java/org/heigit/ors/apitests/routing/ResultTest.java
@@ -222,8 +222,8 @@ void testSimpleGetRoute() {
.body("any { it.key == 'features' }", is(true))
.body("features[0].containsKey('properties')", is(true))
.body("features[0].properties.containsKey('summary')", is(true))
- .body("features[0].properties.summary.distance", is(closeTo(1046.2, 1)))
- .body("features[0].properties.summary.duration", is(closeTo(215.0, 1)))
+ .body("features[0].properties.summary.distance", is(closeTo(1142.9, 1)))
+ .body("features[0].properties.summary.duration", is(closeTo(255.2, 1)))
.statusCode(200);
}
diff --git a/ors-benchmark/pom.xml b/ors-benchmark/pom.xml
index 18829fb883..956c835457 100644
--- a/ors-benchmark/pom.xml
+++ b/ors-benchmark/pom.xml
@@ -7,7 +7,7 @@
../pom.xml
openrouteservice
org.heigit.ors
- 9.3.0
+ 9.4.0-SNAPSHOT
ors-benchmark
diff --git a/ors-engine/pom.xml b/ors-engine/pom.xml
index 95389ba71f..66c666fd69 100644
--- a/ors-engine/pom.xml
+++ b/ors-engine/pom.xml
@@ -30,7 +30,7 @@
../pom.xml
openrouteservice
org.heigit.ors
- 9.3.0
+ 9.4.0-SNAPSHOT
4.0.0
diff --git a/ors-engine/src/main/java/org/heigit/ors/matrix/MatrixRequest.java b/ors-engine/src/main/java/org/heigit/ors/matrix/MatrixRequest.java
index ac60f78b51..f1c62c31d8 100644
--- a/ors-engine/src/main/java/org/heigit/ors/matrix/MatrixRequest.java
+++ b/ors-engine/src/main/java/org/heigit/ors/matrix/MatrixRequest.java
@@ -201,25 +201,25 @@ public MatrixResult computeMatrix(RoutingProfile routingProfile) throws Exceptio
String encoderName = RoutingProfileType.getEncoderName(getProfileType());
FlagEncoder flagEncoder = gh.getEncodingManager().getEncoder(encoderName);
PMap hintsMap = new PMap();
+ boolean hasTurnCosts = Boolean.TRUE.equals(routingProfile.getProfileProperties().getBuild().getEncoderOptions().getTurnCosts());
ProfileTools.setWeightingMethod(hintsMap, getWeightingMethodOrDefault(), getProfileType(), false);
ProfileTools.setWeighting(hintsMap, getWeightingMethodOrDefault(), getProfileType(), false);
- String chProfileName = ProfileTools.makeProfileName(encoderName, hintsMap.getString("weighting", ""), false);
- String coreProfileName = ProfileTools.makeProfileName(encoderName, hintsMap.getString("weighting", ""), true);
+ String profileName = ProfileTools.makeProfileName(encoderName, hintsMap.getString("weighting", ""), hasTurnCosts);
//TODO Refactoring : probably remove MatrixAlgorithmFactory alltogether as the checks for algorithm choice have to be performed here again. Or combine in a single check nicely
try {
// RPHAST
- if (!getFlexibleMode() && gh.getCHPreparationHandler().isEnabled() && routingProfile.hasCHProfile(chProfileName)) {
- return computeRPHASTMatrix(gh, flagEncoder, chProfileName);
+ if (!getFlexibleMode() && gh.getCHPreparationHandler().isEnabled() && routingProfile.hasCHProfile(profileName)) {
+ return computeRPHASTMatrix(gh, flagEncoder, profileName);
}
// Core
- else if (getSearchParameters().getDynamicSpeeds() && routingProfile.getGraphhopper().isCoreAvailable(coreProfileName)) {
- return computeCoreMatrix(gh, flagEncoder, hintsMap, coreProfileName, routingProfile);
+ else if (getSearchParameters().getDynamicSpeeds() && routingProfile.getGraphhopper().isCoreAvailable(profileName)) {
+ return computeCoreMatrix(gh, flagEncoder, hintsMap, profileName, routingProfile);
}
// Dijkstra
else {
// use CHProfileName (w/o turn costs) since Dijkstra is node-based so turn restrictions are not used.
- return computeDijkstraMatrix(gh, flagEncoder, hintsMap, chProfileName);
+ return computeDijkstraMatrix(gh, flagEncoder, hintsMap, profileName.replace("_with_turn_costs", ""));
}
} catch (PointNotFoundException e) {
throw e;
diff --git a/ors-engine/src/main/java/org/heigit/ors/routing/RoutingRequest.java b/ors-engine/src/main/java/org/heigit/ors/routing/RoutingRequest.java
index fee33b12ca..d27d90d6bc 100644
--- a/ors-engine/src/main/java/org/heigit/ors/routing/RoutingRequest.java
+++ b/ors-engine/src/main/java/org/heigit/ors/routing/RoutingRequest.java
@@ -925,7 +925,7 @@ public void setSpeedups(GHRequest req, boolean useCH, boolean useCore, boolean u
ORSGraphHopper gh = profile().getGraphhopper();
- useCH = useCH && gh.isCHAvailable(profileNameCH);
+ useCH = useCH && gh.isCHAvailable(requestProfileName);
useCore = useCore && !useCH && (gh.isCoreAvailable(requestProfileName) || gh.isCoreAvailable(profileNameNoTC));
useALT = useALT && !useCH && !useCore && gh.isLMAvailable(requestProfileName);
@@ -934,8 +934,8 @@ public void setSpeedups(GHRequest req, boolean useCH, boolean useCore, boolean u
req.getHints().putObject(ProfileTools.KEY_LM_DISABLE, !useALT);
if (useCH) {
- req.setAlgorithm(Parameters.Algorithms.DIJKSTRA_BI);
- req.setProfile(profileNameCH);
+ // either Dijkstra or AStar is selected downstream depending on whether node- or egde-based CH is being used
+ req.setAlgorithm("");
}
if (useCore && !gh.isCoreAvailable(requestProfileName) && gh.isCoreAvailable(profileNameNoTC))
// fallback to a core profile without turn costs if one is available
diff --git a/ors-engine/src/main/java/org/heigit/ors/routing/graphhopper/extensions/ORSGraphHopperConfig.java b/ors-engine/src/main/java/org/heigit/ors/routing/graphhopper/extensions/ORSGraphHopperConfig.java
index c74379c9ba..a23b11efbd 100644
--- a/ors-engine/src/main/java/org/heigit/ors/routing/graphhopper/extensions/ORSGraphHopperConfig.java
+++ b/ors-engine/src/main/java/org/heigit/ors/routing/graphhopper/extensions/ORSGraphHopperConfig.java
@@ -128,7 +128,7 @@ public static ORSGraphHopperConfig createGHSettings(ProfileProperties profile, E
List chProfiles = new ArrayList<>();
String chWeightingsString = StringUtility.trimQuotes(chOpts.getWeightings());
for (String weighting : chWeightingsString.split(","))
- chProfiles.add(new CHProfile(ProfileTools.makeProfileName(vehicle, weighting, false)));
+ chProfiles.add(new CHProfile(ProfileTools.makeProfileName(vehicle, weighting, hasTurnCosts)));
ghConfig.setCHProfiles(chProfiles);
}
}
diff --git a/ors-report-aggregation/pom.xml b/ors-report-aggregation/pom.xml
index d58a71d6c7..6cb2b6b8c4 100644
--- a/ors-report-aggregation/pom.xml
+++ b/ors-report-aggregation/pom.xml
@@ -3,7 +3,7 @@
../pom.xml
openrouteservice
org.heigit.ors
- 9.3.0
+ 9.4.0-SNAPSHOT
4.0.0
diff --git a/ors-test-scenarios/pom.xml b/ors-test-scenarios/pom.xml
index 76f6c53d53..44747e6aff 100644
--- a/ors-test-scenarios/pom.xml
+++ b/ors-test-scenarios/pom.xml
@@ -7,7 +7,7 @@
../pom.xml
openrouteservice
org.heigit.ors
- 9.3.0
+ 9.4.0-SNAPSHOT
ors-test-scenarios
diff --git a/pom.xml b/pom.xml
index 25744fe524..6534174f8d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,7 +11,7 @@
4.0.0
org.heigit.ors
openrouteservice
- 9.3.0
+ 9.4.0-SNAPSHOT
pom
openrouteservice
https://openrouteservice.org