Complex OSM query for two house numbers

I would like to use Overpass Turbo to make the following query for two house numbers, 3 and 5:

  • both house numbers are max. 35 m apart
  • both house numbers are at least 5 m apart
  • both house numbers are on the same street
  • neither house number has another house number directly adjacent to it (detached houses but without use of building=detached because this is rarely used)

I can still create a query for two houses with a minimum and maximum distance, but unfortunately not one that is this so complicated. Can anyone help me?

1 Like

This may be tough in Overpass (though I’m not an expert).

I’m assuming you are developing a QA tool to check the validity of addresses?

You could consider GeoDesk, which allows you to perform all sorts of queries on OSM data and in-depth geospatial analysis. The toolkits are 100% FOSS and are available for Python, Java and C++. If you are interested, I’ll walk you through the steps.

No, no address validation. I just have a photo with two houses and am looking for where that might be in my area. But thanks for the hint. I’ll take a look at GeoDesk.

But at the moment, I would prefer a solution in Overpass Turbo.

This not really what I asked for, but I serves well to my task:

1 Like