Version 37 (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:
Hover over keyword in search menu to get textual explanation with simple example!
Expert mode off: ![]() | . |
Expert mode on: ![]() | - 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. - to save search if you check add toolbar button checkbox, as soon as you click on ![]() |
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:,)! 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 waysname:Herrengasse
selects all elements with the given namename=Herrengasse
same 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=yes
is equivalent totag1=yes & tag2=yes
type:way name:-
selects all ways that do not have a nameid:123465678
selects an object (way or node) with a particular idtimestamp: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
- 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