JOSM/Advanced Tricks

From OpenStreetMap Wiki
Jump to: navigation, search
Available languages — JOSM/Advanced Tricks
English polski

  1. Got multiple objects on top of each other and can't see them properly? The middle-click mouse button displays a dialog with all the objects under the mouse (On Apple/Mac OS X, this ability varies with the mouse type. This does not appear to be possible with a one-button mouse. With the Mighty Mouse, the scroll ball can be configured as "Button 3" to make this work.)
  2. In addition to the prior trick, if you hold down the Control key (after you did the middle-click), it keeps the window, allowing you to select objects from the list. You may have to hold down the Alt key in addition to the Control key when selecting.
  3. If you hold down the ALT key while deleting a way, JOSM will keep the nodes of the way
  4. Use the command stack window to keep an eye on what's happening. It's very handy to noticing you've accidentally moved a way you didn't intend.
  5. You can look for mistyped tags by selecting everything (Ctrl-A) and then looking at the tag list. If you select a row and hit edit, the dropdown contains all the variations used. Don't actually hit OK here, that would change everything. Instead, use the Search tool to find the bad tags.
  6. Some window managers in linux (kde, enlightenment) catch the alt-mousebutton combination. This can be very disturbing if you want to create a new way that is attached to another one. This can be worked around by first clicking the mousebutton, then hitting alt, then releasing the mousebutton and then release alt. Sometimes you can also press another, unused, modifier together with alt to keep the window manager from grabbing it.
  7. If the default node-movement delay settings get annoying, they can be overridden with the advanced settings edit.initial-move-delay (in milliseconds, defaults to 200) and edit.initial-move-threshold (in pixels, defaults to 15). Both these can be entered using the "Einstein Tab" of the JOSM preferences panel.
  8. Got an .osm file from which you want to remove stuff? JOSM will normally not remove things but mark them with "action=delete" in the saved file. However, if you first change the file to use only negative IDs (sed -e 's/id="/id="-/' or similar), then JOSM will actually delete the items you delete, and write a reduced file when you save it. Alternatively, use XMLStarlet.
  9. Save current session (if it takes 5 minutes to open all layers): in JOSM advanced preferences (expert mode), modify the "session" attribute into "true" (without the quotes), then restart.
  10. Create a URL of the current location that you're editing in JOSM by right-clicking on the longitude/latitude (found in bottom, left area of JOSM).
  11. Did you accidentally move a way and then realized you forgot where it originally went, and don't want to upload that change to the server? You can remove it from your local layer but NOT delete it from the server. To do this, select the way that you'd like to forget about, and press Ctrl+Shift+P. In JOSM, this is called purging.
  12. Did you want to change a bit of the appearance of the editor map? For example to highlight untagged nodes in highways which are no connections between different ways? Create a bit of your custom MapCSS style and insert into JOSM. Solution to the mentioned example. More on styles.
  13. Do you feel that manually sorting relation member ways (e.g. for bicycle routes) is too slow and dull? JOSM has an automatic sorting built-in! Use the "A-Z" button in the relation editor window! Of course, take care to not mess up parts of the relation which you do not want to touch … You could also only sort a selection of relation members: select some relation members in the left list first. Getting that selection right also works by selecting ways on the map and then using the "← selection" button in the relation editor window or by selecting ways on the map first and then starting the relation editor.

Irregular Bookmarks

JOSM has built-in support for bookmarks covering a rectangular area. But what if you want to "bookmark" a complex shape?

  1. Manually download the data you want in multiple steps.
  2. Save to .osm file.
  3. Open .osm file in text editor, remove all nodes, ways, and relations, so that the remaining structure consists of one <osm> element and a number of <bounds> elements only.
  4. Keep this modified file in a safe location. Every time you want to download the area, open the file and select "update" from the File menu.