osmscout-server
osmscout-server copied to clipboard
Add speed cameras (including average speed ranges)
Hi,
I've noticed that once I've enabled offline maps & routing in uNav app, calculated route no longer have speed cameras displayed on it.
uNav developer states that offline routing API does not provide that info: https://github.com/costales/unav/issues/51
Could it be done in osmscout setup? I'm not sure how all of this works, what limitations it might have.
I imagine, once route is calculated, route legs could be checked from the OSM-based databas if:
- There's
highway=speed_cameranode on that route leg (way).maxspeed=...key should be set, that could be shown on map/warning. - There's relation with
type=enforcement, withenforcement=maxspeedorenforcement=average_speed, where route leg (way) is part of that relation assegment, or at leastfromanttonodes are on that calculated route. This relation must havehighway=speed_cameranode, but it might be near the way, not part of the way. In other words ifhighway=speed_camerais not on the way itself, there must be enforcement relation.
see https://wiki.openstreetmap.org/wiki/Relation:enforcement and https://wiki.openstreetmap.org/wiki/Key:maxspeed
Showing speed cameras are important especially for people who drive in new unfamiliar places, there you can overspeed simply accidentally...
Indeed, OSM Scout Server does not provide speed cameras info. I actually don't know what are the legal aspects of showing such data. Quick search found info from TomTom (https://help.tomtom.com/hc/en-us/articles/360013899980-TomTom-Speed-Camera-service-and-the-law).
There is a general data regarding current speed limit - unrelated to cameras. But that is available through map matching at DBus, which wouldn't work on Ubuntu Touch (works on Sailfish and should on other mobile Linux distros).
I actually don't know what are the legal aspects of showing such data
OSMAnd allows to remove speed camera data. Probably there could be separate data set (download) that user could decide to download or not, depending on is legality.
I see. That is probably a way to do it. I will keep this issue open, just in case if someone wants to work on it. However, before any active work, it would make sense to agree on exported API.