[[TranslatedPages(outdated= This page is incomplete. See "TODO"s. Screenshot is outdated.)]] [[PageOutline(2-9,Table of Contents)]] = Filter panel = [[JOSMImage(dialogs/filter,middle,48,link=,margin-right=20)]] ''Keyboard shortcut:'' **`Alt+Shift+F`** — one of the [wikitr:/Help/ToggleDialogs#Toactivateawindow JOSM panels] The filter panel allows the user to temporarily disable and optionally hide certain types of [wikitr:/Help/Concepts/Object objects] based on one (or multiple) filters. == Filtered objects == * not selectable using [wikitr:/Help/Action/Select selection tools] (with few minor exceptions in #4929, see [ticket:4929#comment:14 comment 14]) * not returned during [wikitr:/Help/Action/Search Search] action * will disappear from several menus until filters are disabled ([wikitr:/Help/Dialog/SelectionList#SmalltriangleinSelectbutton example]) == Use cases == Simple usage is to enter single tag (or more complex expression similar to search) in "Text" column: objects complying with that text will be disabled. More complex scenarios include filters as quick way to develop and test custom [wikitr:/Rules validator rules]. === Usability === * De-clutter main view by (de-)activating features only when you need them. This allows for easier editing in areas with densely located objects or infrastructure. * Completely hide features you don't use. * Avoid unnecessary or accidental edits. === Productivity === * Disable/separate objects that were fully tagged (using tag count and custom filters) from incomplete objects * Disable recently modified objects (and it is irrelevant: if it modified by you or another person) * Untagged objects `untagged` can be used instead of Notes at [osmwww: openstreetmap.org]. It is faster than to set/remove `fixme=resurvey` - please don't overuse this principle === Overview === The filter lines are evaluated from top down, with respect to values in [#Columns Columns]. [[Image(filterdialog.png,link=)]] === Columns ===#Columns * **E** (''Enable''): Enable or disable this filter line. * **H** (''Hide elements'' from [wikitr:/Help/MapView main view]): normally, all matched objects are disabled, but you can completely hide them: * disabled - visible and displayed as grey * hidden - the chosen objects are completely hidden * **Text**: The search term or property that defines the objects that are filtered. Every search query from [wikitr:/Help/Action/Search Search] action is supported: * standard substring search (or exact search with "quotes") * Regular expressions ([https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html Java Regex]) * MapCSS syntax * **I** (''Inverse Filter''): Normally, the specified objects are hidden and the rest is shown. If this option is activated, only the specified objects are shown and the rest is hidden. * **M** (''Filter Mode'') - how a ''filter line'' is combined with ''filter lines'' above ''filter line'' in question: * R (''replace selection'') - effectively disable all ''filter lines'' above * A (''add to selection'') - most users want this, ''filter lines'' with this mode are independent of each other * D (''remove from selection'') - un-filter all elements matched * F (''find in selection'') - TODO The list can by ordered by clicking on the table headers. === Control buttons === TODO explain 7 buttons. === Keyboard shortcuts === Additional to the checkbox in the filter panel, enabling or disabling filters is possible with keyboard shortcuts. `Ctrl+Alt+E` plus `[1-9,0,A-Z]` toggles the corresponding filter on or off, counting from the top of the list. If unsure, `Ctrl+Alt+E` only, without addition, will show a list of available shortcuts. == Filter warning == [[Image(filters warning.png,link=,right,margin-left=20,margin-right=100)]] If any filter is active, and at least one object was filtered, a transparent message box will appear in the top right corner of [wikitr:/Help/MapView main view]. The message has the title **Filter active** and displays the number of disabled objects. == Examples ==#Examples ||= Filter text =||= Description or note =|| || `((landuse: | natural: | leisure: | building:) | (role:outer | role:inner))` || Doesn't handle relations perfectly || || `shop=* opening_hours=*` || shop= + opening_hours= tagged objects || || `shop=* name=*` || shop= + name= tagged objects || || `type:node -shop=*` || All nodes except shops. Geometry modification using mouse move disabled, but possible using other modes (ex. - [wikitr:/Help/Action/ImproveWayAccuracy Improve Way Accuracy mode] (`W`)) || || `(type:node | type:way | type:relation) (modified | user:Steve)` || Hide objects if you are the latest editor (useful during mass re-tagging and semi-mechanical edits) || || `-highway:` || Everything except highway= tagged objects || || `man_made=pipeline` || Pipelines || || `natural=water` || Water objects || || `admin_level:` || Admin boundaries || || `boundary: | leisure: | landuse: | waterway: | amenity: | natural: | building:` || De-clutters map, aggressive (sometimes you may want to keep buildings or amenity key) || || `type:node & untagged` || Make it easier to select ways || || `modified` || Quickly see your changes || || `child (type:way & highway:)` || All nodes that's part of a highway || || `child (type:relation & (natural: | landuse:))` || All natural and landuse areas formed by relations || || `-((highway | child highway | untagged | public_transport) & -(highway=footway | highway=path | highway=steps | highway=track))` || Only roads that can be used by public transport. Good for mapping bus networks. || || `public_transport | puj\:platform | ((public_transport | highway) & -(highway=footway | highway=steps | highway=track | highway=street_lamp | highway=path | highway=crossing | highway=turning_circle) & (nth%:1 & (role: | role:stop | role:platform | role:hail_and_ride)))` || Shows only currently being used ways/nodes/areas of public transport by checking the options "H" and "I". Good for reviewing the current network || || `child (type:relation & (boundary:administrative)) & (-barrier & -highway)` || Select all ways that are part of an administrative boundary aka child, but not part of a highway or barrier by selecting Hide, Inverse and as mode choose Add to show only these || See also other [wikitr:/Help/Action/Search#Examples examples]. If you have some clever filters, add them here. == Auto filters ==#Autofilters Auto filters automatically adds filter buttons in the top left corner of the [wikitr:/Help/MapView map view] for special keys. This needs to be enabled in the [wikitr:/Help/Preferences/DrawingPreference OSM Data settings]. These buttons only appear if there is at least one object tagged with the respective tag within the mapview. See the following screencast on how to enable and use the filter buttons. Above the filter buttons the key which is currently used for the autofilter is displayed (not yet shown in the screencast). A click on that button leads to the preferences where you can change the key. [[Image(autofilter.gif,link=)]] ---- Back to [wikitr:/Help/ToggleDialogs Sidebar] \\ Back to [wikitr:/Help/Menu/Windows Windows menu] \\ Back to [wikitr:/Help Main Help]