| Version 34 (modified by , 10 years ago) ( diff ) |
|---|
Languages:
Search
Search objects in the current data layer using query language. This tool have different look, depending on your expert setting:
If you check add toolbar button, as soon as you click on
Start Search, a button will be added to the 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 Toolbar Preferences. As with any "button" you can always assign shortcut to it.
Keywords
Hover over keyword in search menu to get textual explanation with simple example, some additional info below:
| 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 ([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 count all "discardable" and "uninteresting tags" (description, attribution, source, source_ref, source:, comment, converted_by, watch, watch:,)! 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:wayselects all waysname:Herrengasseselects all elements with the given namename=Herrengassesame as above, but case sensitive"name"="Baker Street"same as above, but works also with special characters like white spaces in the valuetag1=yes tag2=yesis equivalent totag1=yes & tag2=yestype:way name:-selects all ways that do not have a nameid:123465678selects an object (way or node) with a particular idtimestamp:2010-11-01/2010-12-01selects 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).
The special expressions selected and modified select all currently selected resp. all objects modified in the current session.
More examples are here
Some examples and search functions are only shown in expert mode. This includes the standard/regular expression/MapCSS selector radio button. When regular expression mode is selected any key or value field may be replaced with a regular expression enclosed in quotes.
See also
- 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 Help/Styles/MapCSSImplementation
Attachments (5)
- 9229-search-expert-true.png (30.6 KB ) - added by 10 years ago.
- 9229-search-expert-false.png (18.8 KB ) - added by 10 years ago.
- 9229-search-expert-false-with-tooltip.png (17.4 KB ) - added by 10 years ago.
- Search.png (32.8 KB ) - added by 8 years ago.
- Search_expert.png (44.8 KB ) - added by 8 years ago.
Download all attachments as: .zip




