How to geolocate public transport photo using OverPass Turbo and AI

cyb_detective
OSINT Ambition
Published in
4 min readJan 5, 2024

--

In the last article, I told you how to use two snippets of establishment names and OverPass Turbo (OpenStreetMap Search) to determine the exact location of the photo (country and city were detecting using GeoSpy AI).

Only tree letters and one word. But this enough!

Today we’re going to talk about another important detail that you should pay attention to first when locating a photo. These are the numbers of public transport routes.

It is much more difficult to work with them than with street boards, as a bus, tram or train with a certain number can be on a track tens, hundreds and sometimes thousands of kilometres long.

Here’s a picture from Google Street View. In it we see a bus going towards a typical city bridge. The bus route number is A1. What can we do with this?

The first thing we need to do is to roughly define the country and city where the picture can be taken. Since OverPass Turbo cannot make requests to big areas.

Then we need to find there all routes numbered A1 and find places where these routes cross the bridge.

Looking at the picture, I can only assume that this is a major city in Eastern Europe (or in the former USSR). But this is not at all certain. Therefore, let’s try to use the help of AI.

Open https://geospy.web.app/ and upload photo.

Ada Huja Bridge, Belgrade, Serbia… Let’s check coordinates in Google Maps.

Unfortunately, AI got it wrong. There are no bridges near the location it suggested at all.

And the Ada Huja Bridge is almost nothing like the bridge pictured. But…

Let’s test the hypothesis with Belgrade and make a request to OverPass Turbo.

Open https://overpass-turbo.eu/. And run query:

[bbox:{{bbox}}];
(
rel[type=route][name~”А1"];
);
out meta;
>;
out qt;

With this query, we find all routes whose name is roughly similar to A1 (use the sign ~).

Good news: there is such a route in Belgrade!

Very good news: this route crosses a big river.

Let’s check coordinates 44.8115968, 20.4405139 in Google Maps.

I walked forward a bit (it took less than half a minute) and found the place where the image was taken.

View on Google Maps

Okay, finding where the bus route passes over the bridge is too easy. But searching for routes in OverPass Turbo can be combined with searching for all other types of objects.

Let’s try to find buildings with the words “НИС Газпром Нефт” in their names, which the A1 bus passes by:

[bbox:{{bbox}}];
(
rel[type=route][name~”А1"];
way[building][name~”НИС Газпром Нефт”];
);
out meta;
>;
out qt;

Similarly, you can search for traffic lights, pedestrian crossings, trees, water, buildings with a certain number of floors, and much more.

It is often the case that on public transport, the photo does not show the number plate, but the name of the final stop is visible. In this case, the request will look like this:

[bbox:{{bbox}}];
(
rel[type=route][to~”Аеродром Никола Тесла”];
);
out meta;
>;
out qt;

As you can see, this query already finds more routes that follow to the aerodrome.

If you don’t see a route number or end stops in the photo, but you see public transport travelling down that street, that’s a very good thing too. This is an important fact that can be used to refine queries in combination with other details.

[bbox:{{bbox}}];
(
rel[type=route][route=”tram”];
);
out meta;
>;
out qt;

This query shows all Belgrade tram routes. As you can see, there are not that many of them.

Even if the picture doesn’t show anything except that a tram sometimes runs along this street, that’s enough to narrow it down to the number of places one person can see in a couple of hours (assuming the city or region is known).

Read more about OverPass Turbo query syntax here (https://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide).

--

--