/** * Apply maxspeed: In contrast to the implementation of the AbstractFlagEncoder, we assume that * we can reach the maxspeed for bicycles in case that the road type speed is higher and not * just only 90%. * <p> * * @param way needed to retrieve tags * @param speed speed guessed e.g. from the road type or other tags * @return The assumed average speed. */ @Override protected double applyMaxSpeed(ReaderWay way, double speed) { double maxSpeed = getMaxSpeed(way); if (maxSpeed >= 0) { // We strictly obay speed limits, see #600 if (maxSpeed < speed) { return maxSpeed; } } return speed; }
double maxSpeed = getMaxSpeed(way); if (preferHighwayTags.contains(highway) || maxSpeed > 0 && maxSpeed <= 30) { if (maxSpeed < avoidSpeedLimit) {
/** * Apply maxspeed: In contrast to the implementation of the AbstractFlagEncoder, we assume that * we can reach the maxspeed for bicycles in case that the road type speed is higher and not * just only 90%. * <p> * * @param way: needed to retrieve tags * @param speed: speed guessed e.g. from the road type or other tags * @return The assumed average speed. */ @Override protected double applyMaxSpeed(ReaderWay way, double speed) { double maxSpeed = getMaxSpeed(way); if (maxSpeed >= 0) { // We strictly obay speed limits, see #600 if (maxSpeed < speed) { return maxSpeed; } } return speed; }
/** * Apply maxspeed: In contrast to the implementation of the AbstractFlagEncoder, we assume that * we can reach the maxspeed for bicycles in case that the road type speed is higher and not * just only 90%. * <p> * * @param way needed to retrieve tags * @param speed speed guessed e.g. from the road type or other tags * @return The assumed average speed. */ @Override protected double applyMaxSpeed(ReaderWay way, double speed) { double maxSpeed = getMaxSpeed(way); if (maxSpeed >= 0) { // We strictly obay speed limits, see #600 if (maxSpeed < speed) { return maxSpeed; } } return speed; }
/** * Apply maxspeed: In contrast to the implementation of the AbstractFlagEncoder, we assume that * we can reach the maxspeed for bicycles in case that the road type speed is higher and not * just only 90%. * <p> * @param way: needed to retrieve OSM tags * @param speed: speed guessed e.g. from the road type or other tags * @return The assumed avererage speed. */ @Override protected double applyMaxSpeed( OSMWay way, double speed ) { double maxSpeed = getMaxSpeed(way); if (maxSpeed >= 0) { // We strictly obay speed limits, see #600 if (maxSpeed < speed) { return maxSpeed; } } return speed; }
weightToPrioMap.put(100d, VERY_NICE.getValue()); double maxSpeed = getMaxSpeed(way); if (preferHighwayTags.contains(highway) || maxSpeed > 0 && maxSpeed <= 30)
double maxSpeed = getMaxSpeed(way); if (preferHighwayTags.contains(highway) || maxSpeed > 0 && maxSpeed <= 30) { if (maxSpeed < avoidSpeedLimit) {
double maxSpeed = getMaxSpeed(way); if (preferHighwayTags.contains(highway) || maxSpeed > 0 && maxSpeed <= 30) { if (maxSpeed < avoidSpeedLimit) {