I’ve been using JOSM for a while to make edits and add details to OpenStreetMap, but only recently discovered the power and usefulness of its filters feature. Filters allow you to disable, hide, select, and highlight specific groups of objects based on flexible custom parameters.

Now that I know how to use them effectively, I find myself toggling multiple custom filters throughout an editing session to focus my work - avoiding mistakes and helping me visualize my progress. If you use JOSM to work with OpenStreetMap data and are not yet utilizing filters, read on for details on what you can do with the feature.

Add a new filter

To work with filters, turn on the filters panel (Windows→Filter from the menu, or Alt+Shift+F from the keyboard). Use the +Add button on this panel to create a new filter. The filter creation window looks like this:

The Filter string text box is the search that will take place using a specific syntax to dig into various object properties and conditions. The buttons below help you build up your search with the correct syntax.

Hide tagless nodes

The thing that drove me to discover filters is the JOSM’s default display of nodes. In densely mapped areas these thousands of tiny yellow squares were making it impossible for me to make sense of the data. I searched out a way to hide them, and a filter is the answer.

The yellow squares are how JOSM styles nodes that don’t have any tags of their own. You can create a new filter with the configuration type:node untagged to filter these objects. By default, a filter only disables an object (greying it out and making it unselectable). To make a filter hide objects completely, check the ‘H’ column of the filters panel.

This single filter made me fall in love with the feature instantly:

So much more readable

Top: all objects shown. Bottom: tagless nodes hidden.

Remind yourself what you’ve edited

A filter of new modified will filter out any new or edited objects that you have not yet uploaded back to OpenStreetMap. But it’s probably more interesting to highlight these than hide them - check the box in the ‘I’ column of the filters panel to inverse its effect and filter out all of the unmodified objects.

Objects I still need to upload

Find potentially stale information (or fresh edits)

You can also filter objects based on their most recent timestamp. A filter of timestamp:2009-08-15/ will hide any objects that were last modified after August 15, 2009. You could use such a filter to find potentially stale information in your area.

You can also use this feature to highlight recent edits, or even look for things within a specific data range. For example, objects in Port au Prince that were last edited less than 3 months after the 2010 earthquake could be highlighted with an inversed filter of timestamp:2010-01-12/2010-04-12. Here’s what that looks like as of today:

Other uses

You may find that some of the more useful filters for you will be extremely specific to the type of editing you are doing. While tracing landuse areas, I found that rivers and borders were getting in my way a lot. Since I didn’t I didn’t need to interact with them, I added the filter waterway | boundary to disable any objects with a water way or boundary tag. I could also be more specific and change that to waterway | boundary=administrative if I decide I do need to work with other types of boundaries such as national parks or protected areas.

Hopefully this is helpful for those of you using JOSM regularly. Filters are extremely flexible and powerful, and I’ve only covered a few basic use cases here. There’s a lot to experiment with and find other ways to make your JOSM editing more effective with filters.

For more documentation on JOSM and working with OpenStreetMap, check out the LearnOSM Beginner’s Guide and the JOSM reference guide on the OpenStreetMap wiki.