This check uses TagInfo and WikiData databases to look for invalid, deprecated, or otherwise invalid tags.
In addition, there is a fallback check that uses TagInfo data and WikiData items to determine if a tag is valid.
The fallback check can be enabled or disabled by setting "fallback"
to false
. The location of the databases are
set in a "database"
section with either "wikidata"
or "taginfo"
as the key, and then the path as the value. This
must be changed in Microsoft Windows environments (due to differences in file path separators). There is an additional
key for the wikidata
database, "wikidata.tag_removal"
in main GenericTagCheck check configuration section. This
controls the detection of tags that can be removed. By default, tags that have been marked with "abandoned",
"deprecated", "imported", "obsolete", or "rejected" are removable.
You need to get a TagInfo database and a WikiData database. To that end, use the following scripts:
The Tag Info script drops some tables and columns by default, to save space and transfer costs.
The Wiki Data script will write to a wikidata.db
file in the current directory. If one exists, the database will be
updated with new entries first, and then old entries will be updated. There is an output of what changed, so QA/QC can
be performed on changes, if desired.
Example json:
"GenericTagCheck": {
"database": {
"taginfo": "extra/taginfo-db.db",
"wikidata": "extra/wikidata.db"
},
"tag": {
"usage.min": 100,
"percentage_of_key_for_popular": 10
},
"wikidata.tag_removal": ["abandoned", "deprecated", "imported", "obsolete", "rejected"],
"challenge": {
"description": "Tasks containing features with tags containing missing, conflicting, incorrect or illegal values",
"blurb": "Features with invalid tags",
"instruction": "Open your favorite editor and check that the listed tags are correct.",
"difficulty": "Medium",
"tags":"tags"
}
}
This variable controls where the check looks for the TagInfo and WikiData databases. This is currently relative to the
atlas
file directory.
This tag controls how many usages are required before we recommend adding the item to the Wiki Data database and the OSM Wiki. Anything below this value, if not in the wiki data database, will be recommended for removal.
This controls the recommendation for whether or not a key-value combination should be added to wiki data, if the key is a "Well-Defined" key. This also affects the removal recommendations.
This controls what types of key/tags should be recommend for removal. Possible values (they have the type "status" or Q11)
de facto
(Q13) -- not recommended for use herein use
(Q14) -- not recommended for use hereapproved
(Q15) -- not recommended for use hererejected
(Q16) -- defaultvoting
(Q17) -- not recommended for use heredraft
(Q18) -- not recommended for use hereabandoned
(Q19) -- defaultproposed
(Q20) -- not recommended for use hereobsolete
(Q5060) -- defaultdeprecated
(Q5061) -- defaultdiscardable
(Q7550) -- this is typically removed when editors touch an object, so these tags will naturally disappear over time.imported
(Q21146) -- default
- Log in to the OSM Wiki
- Navigate to the appropriate page ( https://wiki.openstreetmap.org/wiki/Item:Q198 )
- Click on "edit" to the right of use on nodes is prohibited
- Type in is allowed -- make certain you click on the dropdown
- Click on save
- Install JOSM
- Install the WikiData plugin (installation instructions)
- Click on
Create new WikiData item for ...
- Fill out the information
- Click OK