Some of the maps I am using have very low maxspeed
values, for example:
Osterstr in Hamburg
maxspeed = 1
and
Creutzigerstr in Leipzig
maxspeed = 2
The result is that shortest routing requests fail if they use these streets with the zero-speed-error, see Zero speed error when calculating shortest distance
I know the speed is not actually zero but somehow these streets trigger the zero speed error. I am wondering if I can increase the speed values for streets with maxspeed < 10 during import?
this happens for maxspeed values <= 2
Can you try overwriting applyMaxSpeed?
throw new IllegalStateException("Speed was negative!? " + speedVal);
return speedVal;
}
/**
* @param way needed to retrieve tags
* @param speed speed guessed e.g. from the road type or other tags
* @return The assumed speed.
*/
protected double applyMaxSpeed(ReaderWay way, double speed) {
double maxSpeed = getMaxSpeed(way);
// We obey speed limits
if (maxSpeed >= 0) {
// We assume that the average speed is 90% of the allowed maximum
return maxSpeed * 0.9;
}
return speed;
}
protected String getPropertiesString() {