pfeiferj / mapd

MIT License
1 stars 5 forks source link

Possibility of using conditional speed limit? #50

Open AravindaDP opened 4 months ago

AravindaDP commented 4 months ago

OpenStreetMap allows defining conditional speed limits. https://wiki.openstreetmap.org/wiki/Key:maxspeed:conditional

Is it possible to add this to Ways returned? https://github.com/pfeiferj/mapd/blob/main/generate_offline.go#L150 And then in https://github.com/pfeiferj/mapd/blob/main/mapd.go#L179 can we alter the MAP_SPEED_LIMIT based on current time and if conditional speed applies. Also NEXT_MAP_SPEED_LIMIT can be adjusted based on current time as well (For the brevity omitting the complexity of considering what will be the time when we reach next way) https://github.com/pfeiferj/mapd/blob/main/mapd.go#L249

This would make it necessary to mapsd to read current local time which I assume is a fair dependency.

If contributions are accepted, I can give it a try.

pfeiferj commented 4 months ago

@AravindaDP yeah, feel free to create something, but throw it behind an option in a param so it can be enabled or disabled