Skip to main content
13 votes

Using Overpass Turbo to return all peaks over certain elevation

I was able to get it to work with this code: ( node[natural=peak]({{bbox}}) (if:t["ele"] > 4269.2); ); out;
Patrick McGranaghan's user avatar
11 votes

Is it possible to get OSM data in geojson via overpass api using ipython?

Overpass API doesn't support GeoJSON. You have to perform the conversion from JSON to GeoJSON yourself. For converting JSON into GeoJSON see this answer. It even contains a solution in Python. ...
scai's user avatar
  • 6,215
11 votes

Saving Overpass query results to GeoJSON file with Python

You could do this using overpass that already returns a geojson object and then, if you want, you can use the geojson package to convert this object into str (string object) or save it in a file. ...
carpinchosaurio's user avatar
9 votes
Accepted

How to download all OSM data within a boundingbox with Overpass?

See the Overpass API Language Guide. Basically you seem to want all data in a bounding box. Depending on your use-case you might want to download nodes, ways and relations. overpass turbo already has ...
scai's user avatar
  • 6,215
9 votes
Accepted

Finding residential buildings with overpass-turbo?

Not all buildings have a corresponding typology tag. Many are just tagged with building=yes (currently 81% of all buildings). Some might have an additional building:use=residential tag. Remember that ...
scai's user avatar
  • 6,215
9 votes
Accepted

Query for WAY that connects two INTERSECTIONS

The following description assumes that you have a list of GPS positions, as well as the OSRM map matching service and Overpass API available. (1) Use OSRM Map Matching service to identify nearest ...
mmd's user avatar
  • 4,597
8 votes

Is it possible to get OSM data in geojson via overpass api using ipython?

It is possible now to retrieve a GeoJSON object of OSM relation with Overpass convert function, here is an example: [out:json]; ( way(51.477,-0.001,51.478,0.001)[name="Blackheath Avenue"]; ...
Murz's user avatar
  • 201
8 votes
Accepted

Getting list of all embassies using Overpass API?

It's because you are expecting that embassy tags are set on a relation. Looking at TagInfo for amenity=embassy, you will see that nearly no relations were set with this key/value combination. It's in ...
ThomasG77's user avatar
  • 31k
8 votes
Accepted

Overpass API Boolean Filtering?

We can formulate the answer in different ways: Option 1: Basically, you want to remove those amenity=embassy from your current result list, which have a diplomatic value that is not embassy (...
mmd's user avatar
  • 4,597
7 votes

Listing churches with their administrative location using Overpass

Similar to an example in the Overpass by Example library, I'd suggest to use the following query: [timeout:60]; area["name"="Mayenne"]->.boundaryarea; way(area.boundaryarea)[&...
mmd's user avatar
  • 4,597
7 votes

Extracting admin boundary data from OpenStreetMap

If it's for specific cities and regions, you can use Overpass Turbo to create queries like admin_level=6 to find border ways. You'll want to consult the Tag:boundary=administrative wiki page to make ...
jcarlson's user avatar
  • 3,900
6 votes

Difference between Nominatim and Overpass-Api?

Nominatim is a geocoder and reverse-geocoder. You can search for an address and it will return the location. Likewise you can search for a location and it will return its full address hierarchy. ...
scai's user avatar
  • 6,215
6 votes
Accepted

Missing/inconsistent River Thames map data in Overpass Turbo

The river Thames is too large to digitize it in one single Openstreetmap way element. Therefore, a relation is created to group all riverbanks belonging to it. You can query that relation directly ...
AndreJ's user avatar
  • 76.7k
6 votes
Accepted

Using Overpass Turbo to return all peaks over certain elevation

Overpass turbo wizard doesn't yet support numerical comparison. However, Overpass Api, the engine powering overpass turbo, already covers this feature. This means that you need to provide the query ...
mmd's user avatar
  • 4,597
6 votes
Accepted

Overpass / Overpy: Getting Way IDs from Nodes

A little more digging found me the answer. Executing e.g. vars(result.get_way(4755884)) gives the internal structure of the way object: {'_attribute_modifiers': {'changeset': int, 'timestamp': &...
Matti Wens's user avatar
6 votes
Accepted

Overpy or Overpass Turbo: How to get nodes by their IDs

I didn't get any answers or hints, nor could I find any examples of doing this (except in Overpass API, which has a slightly different syntax), but by trial and error I discovered the answer (which is ...
Aaron Bramson's user avatar
6 votes
Accepted

Finding the nearest named highway way id

Overpass API doesn't support a "nearest neighbor"-like query at the moment. While I don't really understand your workaround, you can certainly limit the output to a max of 1 entry: [out:json]...
mmd's user avatar
  • 4,597
5 votes

Comma separated list of valid amenity values

You can also take a look at the most popular amenity values at taginfo. This list is available via JSON. Moreover taginfo offers downloads for all databases.
scai's user avatar
  • 6,215
5 votes
Accepted

Is there a Service to get only nodes from OSM?

With Overpass API use out center;. See the documentation about Geometry attribute and Print (out) for more information.
scai's user avatar
  • 6,215
5 votes

OSM: Getting the correct Overpass Turbo query using a keyword (and values)

In overpass turbo, click on "Wizard", enter tourism=* in the search field and then click on "build and run query" to execute your query. You may of course navigate to your area of interest and hit ...
mmd's user avatar
  • 4,597
5 votes
Accepted

Finding all airports in given country or region using Overpass API?

The best starting point for overpass queries is the Openstreetmap wiki, follow the overpass-turbo link on the left. It generates the following query: [out:json][timeout:25]; // gather results ( // ...
AndreJ's user avatar
  • 76.7k
5 votes
Accepted

Query Overpass Turbo for postal code boundaries

You can only get out of Openstreetmap what others have put into the database. If you look at https://taginfo.openstreetmap.org/tags/boundary=postal_code#map, you will see that boundaries of type ...
AndreJ's user avatar
  • 76.7k
5 votes

Overpass API query error: query ran out of memory

By default Overpass API has a certain memory limit in place, to control the overall memory consumption of queries. However, you can easily override that default by providing the maxsize parameter, ...
mmd's user avatar
  • 4,597
5 votes
Accepted

Overpass API: Select all building polygons (excluding POIs and lines) within certain area

I would try the following query, which excludes building:part ways. That may still not be exactly what you're looking for, but it should give you an idea how to exclude some of the ways. In any case, ...
mmd's user avatar
  • 4,597
5 votes
Accepted

Can you restrict which OSM tags are returned by Overpass API?

You can easily achieve this via CSV output. Read more about it in the Overpass QL documentation. [out:csv(::id, ::lat, ::lon, name)]; area["ISO3166-1"="AD"][admin_level=2]; node[place=town](area); ...
mmd's user avatar
  • 4,597
5 votes

How to query Overpass API with Postman?

If you want to learn fishing: Go to https://overpass-turbo.eu/ Then enter the overpass query (QL/XML doesn't matter) that you like to check. Before running the query, open your browser network tab ...
Hou's user avatar
  • 51
5 votes
Accepted

Overpass API: Find road intersection points with defined line

You can use following examples from Overpass API by Example as a starting point to easily achieve what you're looking for. Find intersections of major and minor roads: [bbox:{{bbox}}]; way[highway~"^...
mmd's user avatar
  • 4,597
5 votes
Accepted

Exclude elements from overpass query

In this case, I would use the difference statement and simply substract buildings with a given id. The following example excludes way ids 93778916 and 209000787. [out:json][timeout:25]; (way[building=...
mmd's user avatar
  • 4,597
5 votes
Accepted

Overpass query: Search range of integers not working for 2 digit numbers

Using regular expressions for numeric comparisons is no longer needed since release 0.7.55 and discouraged these days. Instead you can use numeric comparisons like described in the following blog post:...
mmd's user avatar
  • 4,597
5 votes
Accepted

QGIS 3.8 - forest leaftype symbols

There's a github repository with all the symbols OSM uses, the following one of particular interest: https://github.com/gravitystorm/openstreetmap-carto/tree/master/symbols The specific symbols can ...
beribazoo's user avatar
  • 191

Only top scored, non community-wiki answers of a minimum length are eligible