-
Notifications
You must be signed in to change notification settings - Fork 869
Category Property Reference
Category properties appear at the beginning of each category file.
"properties": {
"path": "brands/amenity/bar",
"skipCollection": true,
"preserveTags": ["^name"],
"exclude": {
"generic": ["^(pool|snack)?\\s?bar$"],
"named": ["^уют$"]
}
},
Category properties:
Required | yes |
Type | String |
Example | "brands/amenity/cafe" |
The path for this category in the form "tree/key/value".
Paths must be unique across the name-suggestion-index.
Required | no |
Type | Boolean |
Default | false |
When true, do not merge in new items collected from the OSM planet.
By default, commonly used names are collected from the OpenStreeMap planet and merged into the name-suggestion-index as new items.
(These common names are collected in
dist/collected/*
and filtered intodist/filtered/*
keep and discard lists.)
If skipCollection
is true
, common names from OSM are not merged into the name-suggestion-index as new items for this category.
"skipCollection": true
is useful for:
- categories that are mostly generated via templates from other categories (e.g.
amenity/atm
,amenity/post_box
), - categories that are mostly not branded and would generate a lot of noisy items (
amenity/college
,amenity/university
,leisure/playground
)
Required | no |
Type | Array[Regex Strings] |
Example | ["^name"] |
For tags matching these regular expressions, values in NSI should not replace an existing value in OSM.
By default, all of the tags as they appear in NSI are how they should appear on an OSM feature. Validator software (such as built into iD) can suggest updates to OSM by comparing an OSM feature's tags against NSI's tags.
In some situations, we want to leave an existing OSM tag value alone. preserveTags
contains an Array of regular expressions to match OSM keys where we want to preserve any existing tag value and never suggest a replacement.
👉 ThepreserveTags
property can be set per-category (applying to all items in a category) or per-item.
preserveTags
is useful for tags such as "^name"
in categories where the name
tag is expected to be unique:
- Cinemas ("AMC Mountainside 10")
- Hotels ("Embassy Suites Berkeley Heights")
- Auto Dealerships ("Toyota Autoland Route 22")
- Charging Stations ("Tesla Supercharger - EUREF Campus")
- Pubs ("Pitcher & Piano Birmingham")
- Social Centers ("American Legion Post 304")
- and others…
preserveTags
is also used for the flagpole features - "^flag:name"
:
- Because
flag:name
is expected to be written in the local language and shouldn't be replaced
See also issue #4906
Required | no |
Type | Object {} |
An Object
containing regular expressions to match names that should be excluded from this category.
"exclude": {
"generic": [
"^(edicola|quiosco|trinkhalle|warung|киоск|мороженое|пресса)$",
"^kios(co|k|ko|que)?$",
"^pulper[ií]a$",
"^taba[ck](os|chi)?( trafi[kc])?$",
"^trafik(a)?$",
"^продукт[иы]?$",
"^მარკეტი( \\(market\\))?"
],
"named": [
"^(777|bp|esso|exxon|independent|mobil|shell)$"
]
These lists are useful for 2 things:
- names matching "generic" or "named" patterns will not be merged into the name-suggestion-index
- names matching "generic" patterns will raise a warning in iD to encourage mappers to not use them in the
name
tag.
See also issue #4924.
Regular expressions to match generic names to exclude (e.g. 'restaurant', 'burger', 'food court')
- Generic names are values found commonly used in the
name
tag, but they are not really names. - For these, iD should warn the user "Don't put 'food court' in the name tag".
Regular expressions to match proper names to exclude (e.g. 'Happy Dragon', 'Pizza King', 'Kebabai')
- Proper names are real names like "Kebabai" that are just common, but not operating as a brand.
- For these, iD should just let it be. We don't want these in NSI, but we don't want to warn users about it either.
Contributing to the index
- Feature Files (geofences)
- Using Overpass Turbo
- Config Files
- Property Reference
- Technical Details
Information for developers using the name-suggestion-index in another project.
Information for maintainers, including how to clone and build the project.