Changes between Version 31 and Version 92 of Help/Dialog/Filter


Ignore:
Timestamp:
(multiple changes)
Author:
(multiple changes)
Comment:
(multiple changes)

Legend:

Unmodified
Added
Removed
Modified
  • Help/Dialog/Filter

    v31 v92  
    1 [[TranslatedPages]]
     1[[TranslatedPages(outdated= This page is incomplete. See "TODO"s. Screenshot is outdated.)]]
     2[[PageOutline(2-9,Table of Contents)]]
    23
    3 = Filter dialog =
     4= Filter panel =
    45
    5 [[Image(source:/trunk/images/dialogs/filter.png)]] ''Keyboard shortcut:''''' {{{Alt+Shift+F}}}'''
     6[[JOSMImage(dialogs/filter,middle,48,link=,margin-right=20)]] ''Keyboard shortcut:'' **`Alt+Shift+F`** — one of the [wikitr:/Help/ToggleDialogs#Toactivateawindow JOSM panels]
    67
    7 The filter dialog allows the user to disable or temporarily hide (hidden) from display certain types of objects on the JOSM screen. The usage is to enter any property or just text in the text box. Objects complying with that text or property will be hidden on your JOSM screen. This allows for easier editing in areas with densely located objects or infrastructure.
     8The 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.
    89
    9 == Filter warning ==
    1010
    11 If any filter is active, a transparent message box will appear so you don't forget. It is only visible if at least one object was disabled or hidden.
     11== Filtered objects ==
     12* not selectable using [wikitr:/Help/Action/Select selection tools] (with few minor exceptions in #4929, see [ticket:4929#comment:14 comment 14])
     13* not returned during [wikitr:/Help/Action/Search Search] action
     14* will disappear from several menus until filters are disabled ([wikitr:/Help/Dialog/SelectionList#SmalltriangleinSelectbutton example])
     15
    1216
    1317== Use cases ==
    14 * DIY validator rules
     18Simple usage is to enter single tag (or more complex expression similar to search) in "Text" column: objects complying with that text will be disabled.
     19
     20More complex scenarios include filters as quick way to develop and test custom [wikitr:/Rules validator rules].
    1521
    1622=== Usability ===
    17 * De-clutter the map by (de-)activating features only when you need them
    18 * Completely hide features you don't use
    19 * Avoid unnecessary or accidental edits
     23* 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.
     24* Completely hide features you don't use.
     25* Avoid unnecessary or accidental edits.
    2026
    2127=== Productivity ===
    2228* Disable/separate objects that were fully tagged (using tag count and custom filters) from incomplete objects
    2329* Disable recently modified objects (and it is irrelevant: if it modified by you or another person)
    24 * Untagged objects {{{untagged}}} can be used instead of Notes at osm.org. It is faster than to set/remove {{{fixme=resurvey}}} - please don't overuse this principle
     30* 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
    2531
    26 === Filter and columns ===
     32=== Overview ===
     33The filter lines are evaluated from top down, with respect to values in [#Columns Columns].
    2734
    28 The filter lines are evaluated from top down, with respect to values in [[#Columns]].
     35[[Image(filterdialog.png,link=)]]
    2936
    30 [[Image(filterdialog.png)]]
     37=== Columns ===#Columns
     38 * **E** (''Enable''): Enable or disable this filter line.
     39 * **H** (''Hide elements'' from [wikitr:/Help/MapView main view]): normally, all matched objects are disabled, but you can completely hide them:
     40  * disabled - visible and displayed as grey
     41  * hidden - the chosen objects are completely hidden
     42 * **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:
     43  * standard substring search (or exact search with "quotes")
     44  * Regular expressions ([https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/regex/Pattern.html Java Regex])
     45  * MapCSS syntax
     46 * **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.
     47 * **M** (''Filter Mode'') - how a ''filter line'' is combined with ''filter lines'' above ''filter line'' in question:
     48  * R (''replace selection'') - effectively disable all ''filter lines'' above
     49  * A (''add to selection'') - most users want this, ''filter lines'' with this mode are independent of each other
     50  * D (''remove from selection'') - un-filter all elements matched
     51  * F (''find in selection'') - TODO
    3152
    32 The ''E'' till ''I'' options are selected in the Filter box (normally at the right of your screen) by ticking the appropriate box. Note that the text line above the click boxes may contain dots in your particular version of JOSM. This will probably be fixed.
    33 The order of the ticks from left to right means: Enable this filter line / Hide the filtered items / Your search-filter text / The inverse filter / Mode letter.
     53The list can by ordered by clicking on the table headers.
    3454
    35  * '''E''' (''Enable''): Enable or disable this filter line.
    36  * '''H''' (''Hide elements''): If this option is ticked, the chosen objects are completely hidden. Otherwise they are disabled and shown in a shade of gray.
    37  * '''Text''': The search term or property that defines the objects that are filtered.
    38  * '''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.
    39  * '''M''' (''Filter Mode'') - [#Filtermode see below]
     55=== Control buttons ===
     56TODO explain 7 buttons.
    4057
    41 ==== Filter mode ====
    42 This mode selector defines how a filter is combined with the previous filter.
     58=== Keyboard shortcuts ===
     59Additional 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.
    4360
    4461
    45 The filter '''Mode''' options are set in the pop-up window, where you will also enter the search text. A number of examples is provided.
    46 ===== replace selection (R) =====
    47 Will effectively disable all filters above.
     62== Filter warning ==
     63[[Image(filters warning.png,link=,right,margin-left=20,margin-right=100)]]
    4864
    49 ===== replace selection (A) =====
    50 You most likely want this mode. Filters with this mode are independent of each other.
    51 
    52 ===== remove from selection (D) =====
    53 Will un-filter all elements matched
    54 
    55 ===== find in selection (F) =====
     65If 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].
     66 The message has the title **Filter active** and displays the number of disabled objects.
    5667
    5768
    58 === Examples ===
     69== Examples ==#Examples
     70||= Filter text =||= Description or note =||
     71|| `((landuse: | natural: | leisure: | building:) | (role:outer | role:inner))` || Doesn't handle relations perfectly ||
     72|| `shop=* opening_hours=*` || shop= + opening_hours= tagged objects ||
     73|| `shop=* name=*` || shop= + name= tagged objects ||
     74|| `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`)) ||
     75|| `(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) ||
     76|| `-highway:` || Everything except highway= tagged objects ||
     77|| `man_made=pipeline` || Pipelines ||
     78|| `natural=water` || Water objects ||
     79|| `admin_level:` || Admin boundaries ||
     80|| `boundary: | leisure: | landuse: | waterway: | amenity: | natural: | building:` || De-clutters map, aggressive (sometimes you may want to keep buildings or amenity key) ||
     81|| `type:node & untagged` || Make it easier to select ways ||
     82|| `modified` || Quickly see your changes ||
     83|| `child (type:way & highway:)` || All nodes that's part of a highway ||
     84|| `child (type:relation & (natural: | landuse:))` || All natural and landuse areas formed by relations ||
     85|| `-((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. ||
     86|| `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 ||
     87|| `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 ||
     88|| `(highway:)  & ("^width$") &  -(("^width$":"^(([0-9]|[1-5][0-9])\.[0-9][0-9])$") | ("^width$":"^(([0-9]|[1-5][0-9])\.[0-9])$") | ("^width$":"^([0-9]|[1-5][0-9])$"))` || regex example to filter all roads with a width but not formatted 0.00; 00.00; 0.0; 00.0; 0 or 00 (anything that's not really a proper value or exceeds 59m for width) ||
    5989
    60 ||Filter text                                                                  ||Description or note||
    61 ||{{{ ((landuse:|natural:|leisure:|building:) | (role:outer|role:inner))}}}    ||Doesn't handle relations perfectly||
    62 ||{{{ shop=* opening_hours=* }}}                                               ||shop= + opening_hours= tagged objects||
    63 ||{{{ shop=* name=* }}}                                                        ||shop= + name= tagged objects ||
    64 ||{{{ type:node -shop=* }}}                                                    ||All nodes expect shops. Geometry modification using mouse move disabled, but possible using other modes (ex. - [Action/ImproveWayAccuracy Improve Way Accuracy mode (W)])||
    65 ||{{{ (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)||
    66 ||{{{ -highway: }}}                                                            ||Everything except highway= tagged objecets||
    67 ||{{{ man_made=pipeline }}}                                                    ||Pipelines||
    68 ||{{{ natural=water }}}                                                        ||Water objects||
    69 ||{{{ admin_level: }}}                                                         ||Admin boundaries||
    70 ||{{{ boundary: | leisure: | landuse: | waterway: | amenity: | natural: | building: }}} ||De-clutters map, aggressive (sometimes you may want to keep buildings or amenity key)||
    71 ||{{{ type:node & untagged }}}                                                 ||Make it easier to select ways||
    72 ||{{{ modified }}}                                                             ||Quickly see your changes||
    73 ||{{{ child (type:way & highway:) }}}                                          ||All nodes that's part of a highway||
    74 ||{{{ child (type:relation & (natural:|landuse:)) }}}                          ||All natural and landuse areas formed by relations||
    75 ||{{{ -((highway | child highway | untagged | public_transport) & -(highway=footway | highway=path | highway=steps | highway=track)) }}} || Only roads for public transport. Good for mapping bus networks.||
     90See also other [wikitr:/Help/Action/Search#Examples examples]. If you have some clever filters, add them here.
    7691
    77 See also [[Help/Action/Search#Examples]] other examples. If you have some clever filters, add them here.
    7892
    79 == Regular Expressions ==
     93== Auto filters ==#Autofilters
     94Auto 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.
    8095
    81 The filter supports Java Regex. For detailed Information see http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html
     96[[Image(autofilter.gif,link=)]]
    8297
    83 === Old JOSM versions ===
    84 If the symbol [[Image(source:/trunk/images/dialogs/filter.png)]]  is not there, check if your JOSM version is >= 3189. If it is still not visible, you can try setting {{{displayfilter=true}}} in the advanced preferences (and restart).
    8598
    8699----
    87 Back to [wiki:/Help/ToggleDialogs Toggle Dialogs][[BR]]
    88 Back to [wiki:/Help Main Help]
     100Back to [wikitr:/Help/ToggleDialogs Sidebar] \\
     101Back to [wikitr:/Help/Menu/Windows Windows menu] \\
     102Back to [wikitr:/Help Main Help]