Overpass Turbo - Search same values as conscription number in one address and street number in second address in the street


in Czechia we have unique house numbering, Slovakia has too, but two numbers are everywhere where are named streets and all other buildings have address, but in Czechia have address usually main building in plot. Addresses have street name conscription number/street number.

I need to search same number values in address, which are occuring as conscription number in one address and as street number in second address in same street, for example, Jungmannova 35/29 and Jungmannova 29/19, where 29 is equivocal.

I only have so far search address with two same numbers, like 1/1.

This query looks for nodes, ways and relations 
with the given key.
Choose your region and hit the Run button above!
// gather results
(if: t["addr:street"]+t["addr:conscriptionnumber"] == t["addr:street"]+t["addr:streetnumber"])({{bbox}});
// print results
out geom;

How to build this?


Nice task :slight_smile:

I think this gets you a bit closer: overpass turbo

It seems to find many objects, but not all. In the linked area this one should be found as well but is missing in the output: Way: 61004753 | OpenStreetMap

I wrote it based on this example Overpass API/Overpass API by Example - OpenStreetMap Wiki

We loop over all the conscriptionnumber of objects found, and see if there is another one in the list with the same value in streetnumber.

But I can’t really explain the syntax, especially the spurious union operator ‘u’ in the if puzzles me. Any experts around?

Great, and the processing time of this query is for centre of Prague too long. I added key ref:ruian:addr which should shorten a bit, but it is unnecessary to search in streets where no one street number is bigger than one conscription number and no one conscription number is smaller than one street number (values of č.p. “číslo popisné” and č.o. “číslo orientační”) don’t cross in same street. But I don’t know whether it will short processing time or not. I put timeout 25000, I hope it should be enough. But thanks for this base :slight_smile: