OSM Inspector/Views/Tagging

From OpenStreetMap Wiki
Jump to: navigation, search

The Tagging view in OSM Inspector shows basic problems with tag keys and values.

Overview

Anybody can use any tag keys and any tag values for any OSM object. This gives us an enormous flexibility but also leads to a lot of cruft like misspelled tags accumulating in the database. Older tags that are not in use any more could be deleted, tags that contain FIXME messages can be worked upon. This layer shows several of those cases.

Data sources

All data in this view is derived from OSM data.

Data for the whole world is available in this view.

Layers

These layers are available in two variants, one for nodes and one for ways:

The Empty tag key layers show all nodes/ways with tags having an empty key. This should not happen in normal operations.

Tha Empty tag value layers show all nodes/ways with tags having an empty value. This should not happen in normal operations.

The Tag key with space layers show nodes/ways having a whitespace character such as a space, tabulator key or carriage return in a key. This should be avoided to make tag usage easier for everybody. Note that whitespace in tag values is perfectly ok.

The Misspelled key ? layers show nodes/ways with possibly misspelled tag keys. The check is performed as follows: The commonness of all keys in the database is counted. Then all keys which are seen less then 10 times are compared to all keys seen more than 1000 times. If they are similar, this might indicate a misspelled key. Similarity is checked according to the Levensthein algorithm. This check will miss many false keys and it will have false positives, ie. it will flag some keys that are perfectly ok. Always check objects manually and use common sense before correcting objects based on this tag.

The Unusual character layers show nodes/ways with unusual characters in their tag keys. Of course, unusual doesn't mean its wrong, but in many cases somebody just hit the wrong key. Unusual is everything thats not a normal letter (in any Unicode alphabet), number or some special characters like the colon (:) often used in tag keys.

The Unusual key length layer shows any nodes/ways with keys with only one or two characters or keys with 50 or more characters. This is not forbidden, but unusual. Generally keys should be self-explanatory. Very short keys are hard to understand. (For instance what should they key id mean? Probably some kind of identifier, but what?) Very long keys are hard to use and in most cases are probably the result of an error somewhere.

The Tagged with FIXME layers highlight all nodes/ways with tags of the following forms:

todo=* Everything with key todo (lower case).
fixme=* Everything with key fixme (lower case) or FIXME (upper case).
*=*FIXME* Every tag with the word FIXME (in any case) in the value.

If you zoom in far enough a label with the tag is shown.

The following layers are only available for ways:

The Unwayed segments layer is relic from the past. OSM used to have segments, short lines connecting exactly two nodes. We got rid of them in autumn 2007 with the change from API 0.4 to API 0.5. All the segments that were in the database on switchover day were converted into ways and got tagged as unwayed segments. All those ways will show up in this layer. They should be checked, maybe aggregated into longer ways and then the FIXME tag removed.

The Ways without tags layer shows all ways without any tags that are not in any relation. Either some tags have to be added (preferably) or the way can be deleted.

What you can do with this view to improve OSM data

All layers in this view show you things that need fixing. In many cases the problems are obvious once you look at the offending tag and the other tags on an object and you can fix it without even knowing the area.

For the Empty tag key and Empty tag value layers you can probably just remove the tag.

In the Tag key with space, Misspelled key?, and Unusual key length layers you will probably spot many obvious misspellings which you can fix. If you don't know the tags or tagged objects it might be better to leave things alone, though.

To fix the Unwayed segments cases open them in an editor. If there are several ways with the same tags, join them together to a long way. If these ways have no other tags, sometimes they should be removed, but in many cases you can infer from the context what tags might have been meant (for instance highway=road). Then remove the note=FIXME … tag.

Look for Ways without tags in your area and add tags where you know or can infer what tags are meant. Only remove those ways if they are obviously redundant or silly.

Discussion

See also