OSCAR is a system to search the OpenStreetMap data set for items with matching tags.
A query consists of query statements which are strings an item needs to have. Each query statement can be viewed as producing the set of items matching it. You can then make the usual operations with these sets like intersecting them. There is some special syntax to define the type of match and the set operation. See the table below for an overview. Some examples are listed underneath it. You may also make spatial queries which select all items in the vicinity of the given query rectangle.
The result is clustered and visualized in a hierarchy which you can find on the left side. In order to view the items within an entry of the hierarchy, you have to click on its name. The items will then be presented below the hierarchy.
If you click on an item in this list, the map will zoom to it and the item will be highlighted. If you activate the visualize results checkbox, then all items in the result list will be drawn on the map. You can click on a blue item to scroll to its definition in the result list.
If you enable the Show item's parents checkbox, then a list of intersecting regions will be presented on right for the currently selected item
If you enable the Full CQR checkbox, then the complete hierarchy will be transfered instead of the currently viewed regions. Don't enable this if you want to make queries with a large result on a small bandwidth device. Large queries may transfer up to 10 Megabytes of data and take multiple seconds to analyze by the browser since all data is transfered in binary. Furthermore if you click on a region of the hierarchy, then its complete item index will be loaded, though the items themselves will be loaded dynamically.
You can further improve the query by adding more statements for example by clicking on the key or values of items in the result list. This will add the key or key:value to the query. Some keys are special like the wikipedia or url key. Clicking on the value will take you to the respective wikipedia entry or the url defined as value.
|Strings||STRING||A single query statement. i.e. Stuttgart. Spaces need to be escaped or the query needs to be surrounded with apostrophes and explicit match request|
|Tags||@key:value||You can search for tags with the special prefix @key:value. i.e. @waterway:waterfall|
|Region||$region:id||Search for region with id=id|
|Cell||$cell:id||Search for cell with id=id|
|Exact match||"STRING"||Matching elements exactly. i.e. "Stuttgart"|
|Suffix match||?STRING or ?"STRING"||Matching elements with STRING as suffix. i.e. ?"uttgart"|
|Prefix match||STRING? or "STRING"?||Matching elements with STRING as prefix. i.e. "Stutt"?|
|Substring match||STRING or ?STRING? or ?"STRING"?||Matching elements with STRING as substring. i.e. ?"uttgar"?|
|Intersection||SPACE or / surrounded by spaces|
|Union||+ surrounded by spaces|
|Difference||- surrounded by spaces|
|Symmetric-Difference||^ surrounded by spaces|
|Braces||()||You can nest queries with braces|
|@waterway:waterfall germany||List all waterfalls in Germany|
|"Yosemite National Park" @highway||List all higways in Yosemite National Park|
|@amenity:restaurant + @amenity:fast_food miami||List all restaurants and fast-food places in Miami|
|@tourism:hotel "new york"||List all hotels in New York|
|@amenity:restaurant (@cuisine:italian + @cuisine:french) munich||List all restaurants with italian or french cuisine in Munich|
|@amenity:fast_food munich - (burger? ?king) - (mc? ?donald?)||List all fast food places in Munich excluding burger king and McDonald. Here the braces are important to filter only those items that have "burger" as prefix and "king" as suffix in their name tags.|