Overpass turbo

From OpenStreetMap Wiki
Jump to: navigation, search
Available languages
Deutsch English español 日本語
Overpass turbo in action

Overpass turbo is a web based data mining tool for OpenStreetMap. You find it at http://overpass-turbo.eu.

It runs any kind of Overpass API query and shows the results on an interactive map.

This project is maintained by Martin Raifer. The source code is found on github. A huge thanks goes to Roland who created the Overpass API, without which this tool wouldn't exist.

Powered by Overpass API.png

Use cases

For the mapper

The Overpass API can be a great tool for mapping, as it is very powerful at filtering OSM data. With overpass turbo, there is an easy way to quickly run any Overpass query and inspect the results in a user friendly manner. Here are some ideas where using overpass turbo can be a handy tool while mapping:

  • Searching for (rare) spelling mistakes or breaks with naming conventions over a large area.
  • Looking for special POIs which are not drawn on the map.
  • Inspecting POIs (e.g. place nodes) which are distributed evenly over large areas.
  • Showing spatially large features (boundaries, rivers, complete motorways, PT-networks, ...) and loading them directly into an editor.
  • when you only need a filtered portion of OSM data.

For the developer

Overpass turbo can be a tool for developers, too:

  • Testing and developing more or less complicated Overpass API queries.
  • Converting OSM data to the geoJSON data format.
  • Creation of mock-ups of clickable or static maps highlighting selected OSM features.

Running queries

Put your Overpass API query (see Language Guide) into the editor, hit the Run button, and get amazed by the goodness of the OSM data displayed ;)

overpass turbo displays as much data as possible (see map key below). When clicking on an object, a popup shows all the information of the selected node, way or relation: type and id, tags, coordinates, relationship memberships and meta data are shown, if available.

Please note that you need a somewhat recent web browser for using overpass turbo. Opera, Chrome and Firefox have been tested and work.

Query wizard

Using the Query Wizard

There is a Query Wizard that assists one with the writing of Overpass queries. It is designed to transform simple, human-readable search terms into functional Overpass queries. Here is an example: To get restaurants, now all you have to do is fire up the Wizard and enter Restaurant. Alternatively, one can also type in the appropriate tag amenity=restaurant.

Read more about the Query Wizard on its own subpage.

Map key

Various map features (position number from left to right in parentheses in text below)
  • objects:
    • (1,2) POIs (nodes with tags) are shown as circles with a yellow filling and a thin blue outline,
    • (2,3,4) ways as bold blue lines and
    • (5,6,7) areas as yellow polygons with a thin blue outline.
  • (2,5,8) Pink lines and outlines mean that an object is part of at least one relation.
  • (4,7) Dashed lines mean that a line or area has an incomplete geometry (most likely because some of its nodes have not been loaded).
  • (9) Circles with a red filling represent ways or polygons that are too small to be displayed normally (to switch this off and show the small feature instead: Settings → Map → "Don't display small features as POIs.").

Query shortcuts

One can use handy shortcuts in the query which are auto-expanded during the execution of the query:

  • {{bbox}} - the bounding box coordinates of the current map view.
  • {{center}} - the center coordinates of the current view.
  • Arbitrary shortcuts can be defined easily: just put {{shortcut=value}} somewhere in the script.
  • more shortcuts

Map controls

(1) zoom (2) search locations

Keyboard shortcuts

General
ctrl+enter Run the current query
ctrl+I Start the Query Wizard
ctrl+O / ctrl+S Load (open) / Save a query
ctrl+H Open help dialog
esc Close/dismiss dialogs or message boxes
Query Editor
ctrl+Z / crtl+Y Undo / Redo
ctrl+C / crtl+X / crtl+V Copy / Cut / Paste

Saving and sharing queries

Saving and loading

It is possible to save queries on your browser for later reuse. Queries are saved directly in your browser using the JavaScript Web Storage API. So, you will have a separate set of stored queries for each Browser (and turbo-instance) you are using.

Examples

For a start, there are a few example queries preloaded in the Examples section of the Load tool. Take a look at them for a short glimpse of what overpass can do. You can find some more examples on the following page.

Sharing

You can also share your queries with other people via permalinks. The Share tool gives you a link for your query which you can send to a friend or post somewhere.

Example: This link is going to display all peaks of the Dolomites.

Templates

Overpass turbo also comes with a preloaded set of templates, which can be used instead of share-links for simple use cases (like a simple key-value search).

Styling

It is possible to style the results of an Overpass query with MapCSS. Stylesheets can be included with a special "mustache"-tag: {{style: ... your mapcss stylesheet here ... }}. Read more about this feature on its own subpage.

Exporting Results

The export dialog holds a variety of modes. Here, the data has been exported as a Gist.
Example of the "as png image" export of overpass turbo. Shown is the hiking route "Meraner Höhenweg". Try it yourself in turbo.

The Export dialog holds various export options for the query and/or data loaded by the query. For example, you can convert the current map view to a static png image or a (fullscreen) interactive map, or do some things with the raw query like converting between the query languages or instruct JOSM to load the data returned by a query.

Data

  • as geoJSON
    OSM data after converted to geoJSON. Read more.
  • as GPX
    Useful for uploading waypoints to a GPS device.
  • raw data
    The raw OSM data (in XML or JSON).
  • raw data from Overpass API interpreter
    A direct link to the result of the query returned by the Overpass-API interpreter.
  • load into JOSM
    Instructs JOSM (or any other editor supporting the RemoteControl protocol) to load the result of the current query. Note that this only works for queries returning valid OSM-XML with meta data.
  • save as gist
    Publishes the data directly as a Gist (the pastebin service by Github that loves maps). Provides a link to edit an OSM dataset with geojson.io, the online geojson editor.

Map

  • as png image
    The current map including the displayed data as a png image. By default, The exported png includes a scale and an osm attribution string.
  • as interactive Map
    A fullscreen, clickable map showing the results of the current query. POIs and Ways are clickable, just like in overpass turbo itself.
  • get current map state
    Prints bbox, center and zoom information of the current map view.

Query

  • as text
    The current query as a text file
  • convert to xml
    The current query converted to an OverpassXML-formated query.
  • convert to (compact) OverpassQL
    The current query converted to a (compact) OverpassQL query.

Settings

There are some settings for customizing turbo. For example, one can activate alternative Overpass-API servers or set a custom background map.

  • General Settings - contains settings about the Overpass-API server.
  • Editor - some GUI customizations.
  • Map - options for the background tile source and the appearance of the map.
  • Sharing - settings regarding the generation of permalinks.
  • Export - e.g., what to include on exported png-images

Feedback, bug reports, feature requests

If you would like to give feedback, report issues or ask for a particular feature, please use the issue tracker on github or the discussion page on this wiki.