[[TranslatedPages]] = Search = [[Image(source:trunk/images/dialogs/search.png,middle)]] ''Keyboard shortcut'': '''{{{Ctrl+F}}}''' '''Search [wiki:/Help/Concepts/Object objects] in the current data layer using query language'''. This tool have different look, depending on your expert setting: Hover over keyword in search menu to get textual explanation with simple example! || [Help/ExpertMode Expert mode off]: [[br]] [[Image(9229-search-expert-false-with-tooltip.png)]] || . || || [Help/ExpertMode Expert mode on]: [[br]] [[Image(9229-search-expert-true.png)]] || - '''standard/regular expression/MapCSS selector''' radio button. '''regular expression''' mode is selected any key or value field may be replaced with a regular expression enclosed in quotes.[[br]] - to [#AddSearchToMainToolbar save search] if you check '''add toolbar button''' checkbox, as soon as you click on [[Image(source:trunk/images/dialogs/search.png,middle)]] '''Start Search''', a button will be added to the [wiki:Help/MainToolbar Main Toolbar] which will execute the defined search expression each time, you press the button. You can also set an own icon for this button in the [wiki:Help/Preferences/Toolbar Toolbar Preferences]. As with any "button" [Help/Preferences/Shortcuts you can always assign shortcut to it]. || == Keywords == || Keyword || Supports ranges || Range separator || Description || || id || yes || - || Search for objects with specific ids ([Help/Concepts/Object#Objectids]) || || version || yes || - || Search for objects with specific version ([Help/Concepts/Object#Objectversions]). `version:0` is equivalent to keyword `new`. Note that `version:-1` will match `new` objects. || || type || no || n/a || Only 3 possible values: `type:node`, `type:way`, `type:relation` ([Help/Concepts/Object#NodesWaysRelations]) || || user || no || n/a || "anonymous" is a special word? i.e. `user:anonymous` || role || || || changeset || yes || - || || || nodes || yes || - || Search for objects with number of nodes within range. Note that `nodes:-2` query won't match single nodes! || || ways || || || tags || yes || - || Search for objects with tag count of tags within range, regardless of "discardable tags" and "uninteresting tags" ([Help/Concepts/Object#Tags]). Note that `tags:-1` will also match tagless objects! || || areasize || || || waylength || || || modified || no || n/a || Confusing name: will select (old and modified objects) or (completely new objects). || || selected || || || incomplete || || || untagged || no || n/a || This modifier differs from `tags:0` since it will ignore all "discardable" and "uninteresting tags" (description, attribution, source, source_ref, source:, comment, converted_by, watch, watch:,)! [https://josm.openstreetmap.de/browser/josm/trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java#L678 more info] || || closed || || || new || || || indownloadedarea || || || allindownloadedarea || || || inview || || || allinview || || || timestamp || yes || / || min/max pair with two notes. If min timestap is empty: use lowest possible date (1980). If max timestamp is empty: use current time. || || nth || || || nth% || || || hasRole || || || parent || || || child || || == Examples == Some examples of queries: * `type:way` selects all ways * `name:Herrengasse` selects all elements with the given name * `name=Herrengasse` same as above, but case sensitive * `"name"="Baker Street"` same as above, but works also with special characters like white spaces in the value * `tag1=yes tag2=yes` is equivalent to `tag1=yes & tag2=yes` * `type:way name:-` selects all ways that do not have a name * `id:123465678` selects an object (way or node) with a particular id * `timestamp:2010-11-01/2010-12-01` selects object with last change in November 2010 * See also [[Help/Dialog/Filter#Examples]] There is also a very under-used and under-documented feature that lets you enter a web URL (`file://`, `http://`, `https://`, `ftp://`) in the search field. JOSM will then attempt to load that URL, and select any objects that it finds referenced in that file. JOSM will look for XML tags "way", "node", and "relation" in the document, and use their id attribute. This means you can access another OSM file on your hard disk this way and have JOSM select all objects that are present in the file (provided they are present in JOSM's dataset too). == See also == * [wiki:Help/Concepts/Object Objects] * [Help/Dialog/Filter] allows you to save and combine multiple search patterns between your JOSM sessions * JOSM supports Java Regex. For detailed Information see http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html * mapcss selector syntax see [wiki:Help/Styles/MapCSSImplementation] ---- Back to [wiki:/Help/Menu/Edit Menu Edit][[Br]] Back to [wiki:/Help Main Help]