Skip to content
Snowysauce edited this page Sep 26, 2024 · 2 revisions

The build script checks for potential issues as it processes all of the category files in the data folder. If the script comes across an issue, it will output a warning in the terminal window with details about the issue. These details give a clue about which category file to edit and how to fix or suppress the warning. If you aren't sure about what to do, just ask on GitHub!

Potential duplicate items in multiple trees

⚠️   Warning - matchIndex errors:
------------------------------------------------------------------------------------------------------
  `key/value/name` occurs multiple times in the match index.
  To resolve these, make sure the key/value/name does not appear in multiple trees
    (e.g. `amenity/post_office/ups` should not be both a "brand" and an "operator")
------------------------------------------------------------------------------------------------------
Duplicate cache key "amenity/post_office/estafeta" in trees "operators" and "brands", check items: estafeta-d15952,estafeta-0b19e1
Duplicate cache key "amenity/post_office/q108185876" in trees "operators" and "brands", check items: estafeta-0b19e1

What it means: The build script detected a specific key/value/name combination in multiple trees. In other words, two items have the same value for name, brand, and/or operator in related category files, such as brands/amenity/post_office and operators/amenity/post_office. As the example shows, the build script also checks to see if Wikidata IDs are used in *:wikidata tags multiple times across related category files.

How to fix: First, make sure that the warning is not a false positive. If the items do represent different entities, then both items should be kept - but one or both will need their OpenStreetMap (OSM) name, brand, operator, and/or *:wikidata tags changed. This is best done via a conversation on GitHub or with the relevant local OSM community. However, if the warning is accurate and the items are for the same entity, then the item should be deleted from one of the category files. Use your judgment or start a discussion to determine which tree is most applicable for the item (e.g., brands or operators).

Missing companion tags

⚠️   Warning - Missing tag:
------------------------------------------------------------------------------------------------------
  To resolve these, add the missing tag.
------------------------------------------------------------------------------------------------------
  "entity1-000000" -> missing tag? -> "healthcare"
  "entity2-000001" -> missing tag? -> "cuisine"
  …

What it means: Certain key/value combinations are expected to have an additional tag elaborating on what services the entity provides. The combinations and the additional tag are:

key/value set Additional tag
amenity/clinic
amenity/hospital
amenity/pharmacy
healthcare
amenity/gambling
leisure/adult_gaming_centre
gambling
amenity/fast_food
amenity/restaurant
cuisine
amenity/training training
amenity/vending_machine vending
man_made/flagpole flag:type
shop/beauty beauty

Some entries of man_made/flagpole are also expected to have tags for subject and subject:wikidata, and their absence in these cases will also result in warnings.

How to fix: Add the missing tags with appropriate values to the entity specified in the warning. It may be helpful to use overpass-turbo to view how the entity is currently tagged in OSM.

OSM tags with unconventional values

⚠️   Warning - Unusual OpenStreetMap tag:
------------------------------------------------------------------------------------------------------
  To resolve these, make sure the OpenStreetMap tag is correct.
------------------------------------------------------------------------------------------------------
  "entity1-000000" -> unusual tag? -> "beauty = SPA"
  "entity2-000001" -> unusual tag? -> "operator = City of San Francisco;City of Oakland"
  "entity3-000002" -> unusual tag? -> "wikidata = Q38076"

What it means: An OSM tag preset has a value that may not be in line with general OSM conventions and practices, or with the scope of the NSI. This portion of the build script checks for:

Category Relevant tags What's checked
OSM tag value conventions (#1) beauty
cuisine
gambling
government
sport
training
vending
specified value
Semicolon-delimited multivalue (#2) name
brand
operator
network
specified value
Wikidata tags (#3) wikidata if this tag is present

Category explanations:

  1. Per OSM conventions and practices, values for these tags are expected to be in all lowercase text, with underscores for spaces. Any value that does not match this description will generate a warning.
  2. Each entry in the NSI is expected to be about one specific entity. A semicolon in the value of these tags indicates that the NSI entry in question is about multiple entities in some form, and in these cases it is impossible to provide individualized preset tags for each listed entity. Thus, the presence of a semicolon in these specific tags will generate a warning.
  3. The wikidata tag is intended to be used by individual objects to link to its page on Wikidata (see key:wikidata on the OSM wiki). The NSI covers groups of objects (brand chains, operator networks, transit networks, etc.), not individual objects, and so wikidata without a prefix should not be in the NSI data. Its presence will generate a warning.

How to fix:

  1. Adjust the values of the tags to comply with OSM conventions and practices. It may be helpful to use overpass-turbo to view how the entity is currently tagged in OSM, and to view the tag's page on the OSM wiki (e.g., key:beauty) for more guidance and information.
  2. The entry in question probably needs to be filtered out of the NSI data. If this was added as a one-off item, this task is as simple as deleting the entry; however, if the entry was added as part of an NSI Collector import, then the entry will also have to be added to the named exclude Array of the relevant category file so that the entry is not readded to the file the next time the build script is run.
  3. If the specified Wikidata ID is about the entry, and the entry belongs in the NSI, simply add the correct prefix to the wikidata tag (brand: for brands, operator: for operators, etc.). Otherwise, delete the wikidata tag.

Wikidata tags with incorrect values

⚠️   Warning - Incorrect `wikidata` format:
------------------------------------------------------------------------------------------------------
  To resolve these, make sure "*:wikidata" tag looks like "Q191615".
------------------------------------------------------------------------------------------------------
  "wendys-658eea" -> "*:wikidata": "550258"
  "acf-379caa" -> "*:wikidata": ""
  "aerobus-d8d67b" -> "*:wikidata": "none"

What it means: The value of an item's *:wikidata tag is invalid. Values must be in the format "Q####", where "####" is the numerical portion of the item's Wikidata ID, also known as a QID.

How to fix: If the value of the *:wikidata tag has the right numerical code but is missing the "Q" prefix (such as the Wendy's example), simply add "Q" to the front of the number. Otherwise, if the tag's value has nothing to do with a page on Wikidata or a valid QID (like the other two examples), the *:wikidata tag and value should be deleted.

Home

For Contributors

Contributing to the index

Advanced Topics

For Developers

Information for developers using the name-suggestion-index in another project.

For Maintainers

Information for maintainers, including how to clone and build the project.

 

Clone this wiki locally