OpenStreetMap logo OpenStreetMap

One of the things that you can do with a Garmin GPS is use waypoints as the basis to generate speed and proximity alerts (http://www.gpsbabel.org/htmldoc-development/fmt_garmin_gpi.html).

Anybody attempting to do this for themselves should make sure that using an automated means to warn you about enforcement measures is legal in your jurisdiction, first; I understand there are some states and countries that frown on or prohibit the practice I'm outlining. For the sake of this post, we'll assume that someone trying to do this either has no legal barrier from doing so, or understands the consequences and is taking an educated risk.

Rationale: In unfamiliar territory, it's often nice to have warning about speed limits and enforcement measures in advance, because speed limits often protect zones prone to congestion or sharp/blind curves or hills, and photo stoplight operations tend to be located at high-crash locations.

Here's some of the things I would like to do:

1) Take a given .osm, search for ways with maxspeed tags. Create waypoints at either end of the way with the name "Maximum@nn" where nn is the number equal to the maxspeed= tag, in the local unit of measure (ie, we don't care if it's km/h, mph, mach, warp, whatever). If two ways meet and have different maxspeed= tags, the lower of the two figures should be used. If one two ways meet and one has a maxspeed= tag and the other does not, the existing maxspeed= tag is used. Any spot where an enforcement relation is used to indicate a speed enforcement location should have a similar node created on the way at the enforcement location.

2) Take a given .osm, and look for relations indicating signal enforcement, similar to above. The node should be created at the traffic signal being enforced, named "Signal Enforcement."

3) Take a given .osm, and look for other hazards where advanced warning is handy because you may need to stop unexpectedly, such as border control and customs plazas, toll plazas, traffic signals on ways tagged highway=motorway or highway=motorway_link, permanent highway checkpoints, school crossings on major routes or four-way stops in rural areas. Nodes should be named descriptively.

Hopefully, this is something that is easily accomplished. I imagine I'm only missing something fairly basic in getting 2) and 3) done, but I assume 1) is going to be more tricky.

How would you do this?

Email icon Bluesky Icon Facebook Icon LinkedIn Icon Mastodon Icon Telegram Icon X Icon

Discussion

Log in to leave a comment