Open karussell opened 9 years ago
Since there are so rare, may be break them in osm?
Also, there is possible to split them on reading process
Yeah, good idea to split the edges in the import process.
hah, I am so lazy.
Hmmh, such ferries should be normally tagged as route relationes i.e. the way should be splitted in OSM itself I think. As the wiki says: "The relation approach [...] is useful for very long ferry routes. The relation approach is standard across other types of transportation routes."
Removing the bug label, as this is more an OSM issue. Still we need to think about if we should return a very large distance instead of infinity.
I included a workaround for this (no way splitting for now) as the work to do this splitting properly is not worth the effort (at least not at the current time). But at the same time it is critical to throw an exception in setDistance if the distance is too large.
The problem is now that for CH preparation we set the distance and it can easily grow over int max for some shortcuts when processing world wide data.
As a workaround we should just return max int. In the future we have to decide if we remove the distance data from the CH graph (then certain applications would slow down) or how we fix this properly. Maybe we should make the multiplication factor smaller?
I think we should reduce the distance from currently mm
to 0.1m
.
As the distance for every edge can be roughly max 1000km we have two OSM way where this is exceeded (ferries!) and we need to deal with this:
The problem is that we currently return Double.Infinity if Integer.max is reached but math operations with infinity can lead to NaN which makes nearly every operation with them invalid.
A quick workaround would be to use all 32 bits instead of only the positive range of int as it is currently done.