JOSM hacking: deleting multiple tags, deleting nodes with IWA, and plugin search operators
於 2012年一月16日 由 JoshD 以English發表。I've been hacking recently on JOSM and a few of its plugins, but the changes aren't quite worthy of an entry in the news page of JOSM.
Delete multiple tags at once
The lack of this functionality was bothering me for a while, especially while editing TIGER data and removing all the superfluous tags. It's pretty intuitive, just use Ctrl+A to select all tags, or use Shift and Ctrl to select a subset, then press or click Delete. For some reason Home and End don't work, they must be caught by some other component. This functionality is in JOSM 4773 and above. (ticket)
Delete nodes with ImproveWayAccuracy
Sometimes roads are way over-noded and have bad alignment, so you can use this plugin (IWA) to fix the alignment, but then there's often a few nodes which you don't want to keep. It's tedious to switch into select mode, delete the node(s), then back to IWA. Note you cannot delete nodes with tags or that belong to other ways or relations. ToeBee did most of the work on this one, but I added in the preview drawing, added some mode hints, committed the patch, and updated the wiki. (ticket, wiki)
JOSM plugins can provide search operators
This one's working, but isn't cleaned up enough to commit quite yet. The patch to JOSM allows plugins to register new search operators. To demonstrate this I modified utilsplugin2 to provide inside, intersecting, and allintersecting. This allows searches like leisure=pitch inside amenity=school to find all sport pitches inside school grounds. Once the API is finalized and committed I'll add other operators like adjacent. (ticket)
If there's anything you've found missing in JOSM or the plugins, and you know a bit of Java, why not try fixing the problem yourself! It can be quite fun.
討論