Skip to content

Latest commit

 

History

History
89 lines (77 loc) · 4.82 KB

genericTagCheck.md

File metadata and controls

89 lines (77 loc) · 4.82 KB

Generic Tag Check

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.

First steps

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.

Available configuration variables

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"
    }
  }

database.{taginfo,wikidata}

This variable controls where the check looks for the TagInfo and WikiData databases. This is currently relative to the atlas file directory.

tag.usage.min

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.

tag.percentage_of_key_for_popular

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.

wikidata.tag_removal

This controls what types of key/tags should be recommend for removal. Possible values (they have the type "status" or Q11)

How to update an entry in OpenStreetMap Wiki Data

  1. Log in to the OSM Wiki
  2. Navigate to the appropriate page ( https://wiki.openstreetmap.org/wiki/Item:Q198 )
  3. Click on "edit" to the right of use on nodes is prohibited
  4. Type in is allowed -- make certain you click on the dropdown
  5. Click on save

How to add a new entry in OpenStreetMap Wiki Data

  1. Install JOSM
  2. Install the WikiData plugin (installation instructions)
  3. Click on Create new WikiData item for ...
  4. Fill out the information
  5. Click OK