Adding duplicate house numbers extension for Czechia and Slovakia in JOSM validator

Hello,

I would like to make the project of checking duplicate house numbers for the Czech Republic and Slovakia (I originally wanted to write Czechoslovakia, but that would offend the Slovaks) in the JOSM program. Since the validation is based on checking the street + housenumber (standard number related to street), and in CZ and SK, we have special tagging: addr:conscriptionnumber (Czech: číslo popisné, Slovak: súpisné číslo) and addr:provisionalnumber (Czech: číslo evidenční; in RÚIAN referred to as č.p. and č.ev. collectively as a house number; there are 3 types of buildings in the Czech Republic in total: building with č.p., with č.ev. and without house number) related to addr:place, so this vadidation, and we have addr:streetnamuber (Czech: číslo orientační, Slovak: orientačné číslo; which corresponds to addr:housenumber with odd/even numbering system in streets in other countries), and this validation compares addr:housenumber where has only addr:conscriptionnumber or addr:provisionalnumber, or where has addr:conscriptionnumber slash addr:streetnumber together, it simply does not compare streetnumbers, which may be duplicates (for example, the old building was demolished and a new one with a new č.p. was built in its place, or it is a duplication, there are over 1300 of such in the Czech Republic). So the validation would need to compare addr:streetnumber with addr:street, and addr:conscriptionnumber and addr:provisionalnumber with addr:place.

But there is a catch: In cities, corner houses often have streetnumbers on both sides, so I would rather ignore addr:conscriptionnumber (and rather addr:provisionalnumber too), houses with house numbers without house numbers often have only one street (in Czechia, streetnumbers to streets is mandatored on Slovakia). It would certainly reduce false positives in detecting duplicate numbers for CZ and SK rapidly, so that would be great.

And now the most important thing: Should this be adjusted directly into the JOSM validation, or would it be better to create a set of local rules for it? I would be in favor of doing it directly in the JOSM validation, rather than having some extra local rules to add.

It’s still a bit of a problem to better understand the Java code, and also to figure out how to run the JDK and Apache Ant, where it could be tested, I’ll either have to deal with that myself, or someone more experienced will have to help me with it.

There is my suggested duplicate numbers validation: When address has addr:streetnumber → compare it with addr:street and ignore addr:housenumber and compare addr:conscriptionnumber and addr:provisionalnumber with addr:place for long distance; when address has addr:conscriptionnumber or addr:provisionalnumber and no addr:streetnumber → compare it with addr:place and ignore addr:housenumber and addr:street, if address has only addr:housenumber → compare with addr:street.

Looks like a nice projects to me.

I would not use Josm at least not initially, in Josm you download only a small area but I think you want to run this nationwide.

  • Download the Czech Republic .pbf or even better start with a sub-region.
  • Make sure you have osmium running (on Linux that should be easy, for Windows see here)
  • Run osmium karlovarsky.pbf nw/addr:conscriptionnumber -f opl and pipe that into a file (or use -o conscriptionnumber.opl instead of -f opl)
  • Write a python script to parse the output and find the problems you think there are
  • Alternatively there is also a python-osmium library so you do not need this intermediate .opl step but I think better start with this file in OPL File Format.