JOSM Tagging Presets

If you’re creating many similar objects in OpenStreetMap using the JOSM editor – in my case it was rooms inside the library building, but it could be streets or buildings or parking meters – it can be handy to set up a “tagging preset,” a template that lets you automatically fill in some tags for the objects you’re creating, and prompt you for others. There’s out of date documentation for this in the JOSM wiki, but the concept hasn’t changed much, and the defaultpresets.xml file is well-commented and a good model to follow.

New tagging presets are created by crafting an XML file; mine looks like this:


  
    

When I install this preset, and then use it to tag an object, it presents me with a dialog that looks like this:

JOSM Tagging Preset Dialog

The buildingpart and indoor tags are filled automatically, I’m prompted for a required ref tag, and an optional name tag.

To install a new tagging preset XML file, in the JOSM preferences, select Map Settings and then Tagging Presets and click on the plus (+) sign beside “Active Presets” and select the XML file you saved. Once added, you’ll need to restart JOSM for it to take effect.

Once the new tagging preset file is installed, just select an object on your map and then Presets on the JOSM menu and select the name of the preset you created, like this:

Selecting a JOSM tagging preset.

By setting up a tagging preset like this, I was able to quickly make work of drawing and tagging the rooms and corridors of the main level of Robertson Library, to the point where it now looks like this:

Main Level Robertson Library in JOSM