Languages:
- dansk
- English
- español
- français
- 日本語
- Nederlands
- русский
- українська
Table of Content
Search
Keyboard shortcut: Ctrl+F
Search objects in the current data layer using query language.
This windows has different looks, depending on your Expert Mode setting, see below:
- The search action will respect the current filters meaning it wouldn't return any of the filtered objects.
- Colons (
:
) within keys and values need to be wrapped with quotation marks ("
). - Hover over a keyword in the search hints section to get a explanation and special examples.
- Double click on a preset listed in the search window to add the query to search for objects that match this preset.
Expert mode
In expert mode, the following options are added:
- more keywords are listed (they work also in non-expert mode, but are hidden in the dialog)
- standard/regular expression/MapCSS selector radio button, see sections below for details
- all objects check box to include deleted and incomplete objects in the search
- add toolbar button see save search query in main toolbar below.
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"addr:street"="Baker Street"
if special characters (in this case:
in the key and white space in the value) are used, the key resp. the value needs to be enclosed in""
tag1=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 2010preset:"Craft/Beekeeper"
selects objects that match the beekeeper preset- See also 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 tooltip.
- As with any button you can always assign a shortcut to it in Shortcut Preferences.
Regular expressions
JOSM supports Java regex syntax.
MapCSS syntax
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
- Remote control command
See also
- Filters allow you to save and combine multiple search patterns between your JOSM sessions
Attachments (5)
- 9229-search-expert-true.png (30.6 KB ) - added by 9 years ago.
- 9229-search-expert-false.png (18.8 KB ) - added by 9 years ago.
- 9229-search-expert-false-with-tooltip.png (17.4 KB ) - added by 9 years ago.
- Search.png (32.8 KB ) - added by 7 years ago.
- Search_expert.png (44.8 KB ) - added by 7 years ago.
Download all attachments as: .zip