Skip to content

Commit 1e0770c

Browse files
authored
Merge branch 'master' into bugfix#939-use_speed_limit_definitions_from_json_files
2 parents 9e6744e + b742818 commit 1e0770c

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ RELEASING:
3838
- Time-dependent core-based routing algorithms
3939
- Option to disable edge-based routing in core for a single weighting ([#928](https://github.com/GIScience/openrouteservice/issues/928))
4040
### Fixed
41+
- Do not consider ill-defined "maxspeed = 0" OSM tags ([#940](https://github.com/GIScience/openrouteservice/issues/940))
4142
- Use JSON definitions of country-specific speed limits ([#939](https://github.com/GIScience/openrouteservice/issues/939))
4243
- Config file parameter to set the number of active landmarks for core routing ([#930](https://github.com/GIScience/openrouteservice/issues/930))
4344
- Make sure A* with beeline approximation is used as default fallback algorithm ([#926](https://github.com/GIScience/openrouteservice/issues/926))

openrouteservice/src/main/java/org/heigit/ors/routing/graphhopper/extensions/flagencoders/VehicleFlagEncoder.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,12 @@ protected String getHighway(ReaderWay way) {
370370
return highwayValue;
371371
}
372372

373+
@Override
374+
protected double applyMaxSpeed(ReaderWay way, double speed) {
375+
double maxSpeed = this.getMaxSpeed(way);
376+
return maxSpeed > 0.0D ? maxSpeed * 0.9D : speed;
377+
}
378+
373379
/**
374380
* @param way: needed to retrieve tags
375381
* @param speed: speed guessed e.g. from the road type or other tags

openrouteservice/src/main/java/org/heigit/ors/routing/graphhopper/extensions/flagencoders/bike/CommonBikeFlagEncoder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ public long handleRelationTags(long oldRelationFlags, ReaderRelation relation) {
395395
@Override
396396
protected double applyMaxSpeed(ReaderWay way, double speed) {
397397
double maxSpeed = getMaxSpeed(way);
398-
if (maxSpeed >= 0 && maxSpeed < speed) {
398+
if (maxSpeed > 0 && maxSpeed < speed) {
399399
return maxSpeed;
400400
}
401401
return speed;

0 commit comments

Comments
 (0)