I’ve long contemplated if I should even release this plugin since it’s kind of hacky. But it’s very useful for me, so maybe for others too.
First the hacky functions:
- creating a new point under the mouse pointer with pressing B on the keyboard
- splitting a way under the mouse pointer with pressing I
- option to get JOSM to foreground (make it the active window) when the mouse enters the map view
- getting the direction for a node (for instance for a traffic sign) from the mouse position relative to the node and ways the mouse points to or not, more about it below
The B and I functions just simulate activating the draw/split mode and then clicking with the mouse at the desired position.
Additionally there is one non hacky action to detach nodes of a closed way from a way and move them away from the existing nodes.
So for example look at this situation:
The areas are ending with the way, not where they really end. The function to detach the nodes is triggered with pressing Z or selecting the action from the more tools menu and will result in the following:
In this example 2 new nodes were created and they move inwards the area. The nodes are detached from the selected way for all closed ways that share the node. It’s also possible to select the closed way and press Z, it will result in detaching only the nodes of the selected closed way from not closed ways they share, nodes only shared with other closed ways will not be detached.
Further explanation of the direction function, first look at this situation:
The traffic sign city limit has a direction set to forward. But does this identify the ways that are outside/inside the city? It clearly doesn’t. It could either mean the street that goes to the upper left or the one that goes to the upper right. A possible solution would be to add more than one city limit traffic sign to the ways affected, another to map the city limit exactly where it is placed besides the street with a separate node or just use the degrees value for the node in the middle. It will make clear which parts of the streets are outside the city and which are inside. And this is where the direction function comes in handy. Instead of using the draw mode to get the degree value and then manually add it to the node just select the node and point the mouse behind the traffic sign in the direction it’s placed and press H on the keyboard and the direction value will be the correct degree value taking into account that it is mapped with the opposite direction.
So the values forward and backward for a traffic sign should only be used when they are unambiguous, which means when they are inside a way, not at the end or start and no other way is intersecting the node.
The H action will check this for you, whenever forward/backward can be used, it will be used (if you don’t disable this function in the settings). For 2 ways that share the last and the first node the direction is automatically set to a degree value even if you use forward/backward as long as it unambiguous in the situation. If it’s not you will be see a popup menu for selecting the possible directions for that node. For more complicated intersections it might not be working and you will need to add the degree value like described above with pointing the mouse and pressing H.
For example this speed limit sign is inside the way because it is only a reminder, so forward/backward works:
The same sign at the start of the speed limit can be ambiguous in some situations like this:
Here forward will not work because both affected ways fit that value. Using the degree value get’s around that problem, especially in situations in which the direction of the ways itself cannot or should not be changed.