JOSM search and filter expressions

Sep 4th, 2020 (edited)
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!

JOSM search and filter expressions

JOSM search is a fairly advanced system which first takes your string, compiles it into a tree structure and runs that over the data. At the base level there are matching tokens, which can then be combined to form complex searches. To access the search dialog, press Ctrl-F, or click the Edit menu, then Search.

There is provision for case-sensitive matches, directly activated from the search dialog.

Expression examples

Search or Filter Expression Description
building inview nodes:4- Buildings in view with more than 4 nodes
highway=* name: Highways that have a name
type:way name:- Ways that do not have a name
type:node untagged Nodes that are not tagged
type:node untagged -child Nodes that are not tagged neither part of a way
new tags:0-0 nodes:3- New objects with no tags with more than three nodes
nodes:3- -(building=*) Objects with more than three nodes that are not buildings
nodes:3- -(building=*) -(highway=*) As the previous excluding highways
type:node -highway=stop Nodes excluding stop signs
type:node new "addr:housenumber" Nodes with new house numbers tags
type:node is_in: Nodes with an is_in tag set
new modified Objects that are in state new or modified
timestamp:2020-01-15/ Objects that were last modified after the YYYY-MM-DD date given
timestamp:2020-01-01/2020-04-30 Objects that were last modified in the date range given
waterway | boundary=administrative Objects that are a waterway or an administrative boundary
type:relation admin_level=10 Relations that have an administrative level equal to 10
child(type:relation id:<ID>) waterway=river Children of the relation (the members) with the id <ID> tagged waterway=river
closed areasize:-200 Closed ways (areas) with areas up to 200m² in size
closed waylength:1000- Closed ways with perimeters greater than 1000m in length
type:node -untagged child closed Tagged nodes which are part of closed ways
parent(child(selected)) type:way Neighbouring ways of a selected way
parent child selected type:way Same as above. Parentheses are optional for single-argument expressions
parent(type:node highway:stop) highway:residential Residential ways that have a stop sign in a child node
RAW Paste Data