Version 41 (modified by 9 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, see sections below for details - add toolbar button covered in section [Help/Action/Search#SavesearchqueryinMaintoolbar] |
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
Save search query in Main toolbar
To save search as a button if you check add toolbar button checkbox, 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.
Toolbar Customization will let you modify icon, search query and an icon.
As with any "button" you can always assign shortcut to it.
Regular expressions
JOSM supports Java regex syntax.
MapCSS syntax
See Help/Styles/MapCSSImplementation.
Fetch external file and replace selection
A very under-used 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 (clarify? examples?), and use their id attribute . 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).
Similar thing is possible via command line parameter during JOSM start-up. Similar thing is possible via Remote control command.
See also
- [Help/Dialog/Filter] allows you to save and combine multiple search patterns between your JOSM sessions
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