Closed dvent7 closed 6 years ago
There is a default value for maximum speed of a road. The question is: Why and where is your road's maximum speed is set to '0'?
Where can in find the default value of maxspeed in the BFMapWriter? I made a mistake and did not put a new element in the barefoot/map/tools/road-types.json
https://github.com/bmwcarit/barefoot/blob/master/map/tools/road-types.json#L1-L106
Unfortunately, that's not a supported feature right now. The default value is used when road data is read initially from the database if a road's maximum speed is set to NULL. After that, road's have a fix assignment of maximum speed such that it's not a supported feature to rewrite the value. Therefore, best way is to delete bfmap file and reread the data from the database (barefoot map server) with the correct road-types.json defined.
OK thank you, iam wondering what is your default value when priority and maximum speed is set to NULL? I could not find part in the code.
Sorry, forgot to mention that. That's not in the code, it's part of road-types.json file. This file is used at two separate points in the Barefoot tool chain. First, to filter road types when parsing OSM data. Second, to use default values when Barefoot reads data from the database.
Oh ok, so unclassified
is the default value. Thank you
I got a NaN exception in filtprob when the maxspeed of a road is 0. Due to not setting the maxspeed of a road the line: the
road.maxspeed()
becomes 0 and the return value NaNhttps://github.com/bmwcarit/barefoot/blob/c7b55daab5fe14c3e0b02f9e76e22ca509633ac4/src/main/java/com/bmwcarit/barefoot/roadmap/Time.java#L32
In my opinion here should a default value be applied when maxspeed is not set.
For example 80km/h.
https://github.com/bmwcarit/barefoot/blob/c7b55daab5fe14c3e0b02f9e76e22ca509633ac4/src/main/java/com/bmwcarit/barefoot/roadmap/Road.java#L95-L101