Geolocation with the Overpass API

Easy Muffin

Senior Member
The Overpass API lets you query OpenSteetMap (OSM) data in a variety of ways. It heavily depends on the quality of the data but if you search in well-covered areas then this is a very powerful tool indeed. It can save you literally hours over manual searching.

It's available via https://overpass-turbo.eu

Unfortunately the script language may take some reading and practice. The OpenStreetMap Wiki is a good place to start - https://wiki.openstreetmap.org/wiki/Overpass_API

For searchable items look around here - https://wiki.openstreetmap.org/wiki/Tags

What's probably the most powerful function for geolocating is its ability to chain clauses so that you can rule out an increasing number of possible locations as you add more things you see in the picture(s) you're trying to locate.

As an example, (from https://www.metabunk.org/threads/help-to-debunk-737-flies-backward.12208/) this is what happens when you drag the map to Albany and query for anything that has the name 'Plaza' in it.
Code:
way
  [name~"Plaza"]({{bbox}});(._;>;);
out;
overpass1.jpg

Too many results to do much with it yet, so narrow them down to show only those that are also within 200 metres of a bus stop.
Code:
way
  [name~"Plaza"]({{bbox}});(._;>;);
    node(around:200)
        [highway=bus_stop];
out;
overpass2.jpg

Starting to look better.
Some more refining returns this:
Code:
way
  [name~"Plaza"]({{bbox}});(._;>;);
    node(around:200)
        [highway=bus_stop][shelter=yes];
    way(around:25)
        [amenity=parking][parking=surface];(._;>;);
out;
overpass3.jpg

This shows surface parking lots that are within 25 metres of a sheltered bus stop and also within 200 metres of a 'Plaza'. There are only three results so we are now well within manageable numbers. A few minutes in Google Streetview will most likely confirm one of these. Turns out it's the one northeast of the airport.
This can at first all feel rather clunky but once you're comfortable with the scripting and you know how to best utilise the different search items then you can quite often pinpoint these kind of pictures in a matter of minutes.
 
Last edited by a moderator:
Top