posts /

Name tag abuse

Posted Fri 27 Nov 2015 11:54:21 AM CET Florian Lohoff

For a long time i observe people abusing the name tag for all kinds of descriptions, refs etc. Whenever there is no matching tag for putting a string the name tag gets used.

IMHO the name tag should really only carry names not object descriptions. A kindergarten should carry the tag amenity=kindergarten not name=Kindergarten. The name tag should really only contain the name.

There is no real way to actually clean this up or detect name abuse automatically.

As i wanted to learn C++ (beeing a C and Perl programmer) i started to play with libosmium a little and got my way to write a name tag extractor for a given pbf file.

git clone git://pax.zz.de/nameextract

Most likely the C++ code is horrible by coding standards but its the result of a single day starting to get my way into C++.

nameextract will parse the pbf file with the help of libosmium and dump a unordered list of name tags and the objects e.g. N4711 and W0815 for nodes and ways carrying that specific name. ne2html will format that output a little nicer with HTML so can open it with a browser and use the links for JOSM remote control or opening the object on the OpenStreetMap website.

I did so for parts of Ostwestfalen-Lippe and you'll wonder how often there is a name tag with a single digit number value.

Some extracts with data of today: