New JOSM plugin KindaHackedInUtils

I think you misunderstand how the direction for traffic signs and traffic signals work. When forward/backward is used it’s based on the movement of the traffic. So if you drive on the road from B to A over the point in the middle the direction is forward for every traffic sign or traffic light you see the front side of. If you drive from B to A over the point in the middle and see the front side of a traffic sign or traffic light, the direction for them is backward.

Pointing the mouse in the forward area or at A results in forward. Pointing the mouse in the backward area or at B results in backward. This is consistent for traffic signs and traffic signals.

Only for traffic signs that are at the start/end node (or are on a separate node) this will differ such as that the direction is the opposite of the traffic travelling on a road.

It’s just like the wiki description for traffic_signals:direction explains.

traffic_signals:direction=forward Only traffic which passes in the same direction as the way is affected.

https://wiki.openstreetmap.org/wiki/Key:traffic_signals:direction

For forward/backward this is never true. You have to point the mouse in the forward area which means the side that is on the back of the traffic sign (the direction the traffic is travelling to for signs that affect the traffic that travels on the road in the direction of the way) if you want to get forward as a result. For the degree value it’s also not true if natural direction is enabled in the settings. Which means the degree value will be calculated the same way it would be if forward/backward would be used. So pointing behind the sign in travelling direction will give you the degree the sign is facing, which is how traffic signs are mapped. If you disable natural direction the user has to know that traffic signs are mapped different and has to point away from the front side which is confusing because it would be exactly the opposite of the mouse position a user has to point for forward/backward directions.

If you don’t get the same result for the direction of a node inside a way with highway=traffic_signals or traffic_sign=* I’ve no idea why. For me this works just like I want it to.

I find this really hard to explain but pointing on the part of the way affected by the sign should be the easiest way to grasp. Especially for speed limits this is intuitive, you have a road sign that causes a speed limit on the part of a road behind the sign. Pointing on the part that has the speed limit and pressing H seems to be the easiest to grasp. Everything else follows from this one decision I’ve made.

This principle is good to see if you put a traffic sign on an end/start node inside a road or a junction (at which all ways end or start). The plugin will show a popup menu for all possible degree values for that node and when you hover over a menu entry with a degree value it will highlight the part of the road that is affected by the sign, so in the speed limit example it would be the part of the street with the speed limit.

Regardless of all that I’ve released an update which switches the key I with the key K, which should not be used by JOSM by default. All other keys are the same but all now can be changed in the keyboard settings of JOSM. If 2 or more plugins use the same key JOSM will switch them out with an unused keyboard shortcut for one of them. So B or K might be something completely different depending on which other plugins are installed that use those keys also.