Skip to content

Commit

Permalink
fix(fastisochrones): use ORSFastestWeighting in cell computations
Browse files Browse the repository at this point in the history
Avoids speed reduction on ways tagged with `access=destination`.
  • Loading branch information
aoles committed Feb 22, 2024
1 parent f991bf8 commit 01b2283
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,7 @@ protected void postProcessing(boolean closeEarly) {
calculateContours();
List<Profile> profiles = fastIsochroneFactory.getFastIsochroneProfiles();
for (Profile profile : profiles) {
Weighting weighting = ((ORSWeightingFactory) createWeightingFactory()).createIsochroneWeighting(profile, new PMap(profile.getName()).putObject("isochroneWeighting", "true"));

Weighting weighting = ((ORSWeightingFactory) createWeightingFactory()).createIsochroneWeighting(profile);
for (FlagEncoder encoder : super.getEncodingManager().fetchEdgeEncoders()) {
calculateCellProperties(weighting, partitioningEdgeFilter, encoder, fastIsochroneFactory.getIsochroneNodeStorage(), fastIsochroneFactory.getCellStorage());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ private Weighting createTimeDependentAccessWeighting(Weighting weighting) {
return weighting;
}

public Weighting createIsochroneWeighting(Profile profile, PMap requestHints) {
public Weighting createIsochroneWeighting(Profile profile) {
FlagEncoder encoder = this.encodingManager.getEncoder(profile.getVehicle());
String weightingStr = toLowerCase(profile.getWeighting());
Weighting result = null;
Expand All @@ -136,7 +136,7 @@ public Weighting createIsochroneWeighting(Profile profile, PMap requestHints) {
|| "priority".equalsIgnoreCase(weightingStr)
|| "recommended_pref".equalsIgnoreCase(weightingStr)
|| "recommended".equalsIgnoreCase(weightingStr)) {
result = new FastestWeighting(encoder, requestHints);
result = new ORSFastestWeighting(encoder);
}

return result;
Expand Down

0 comments on commit 01b2283

Please sign in to comment.