Repository navigation
Open
Milestone
Description
In some cases when when we ask in queries.yaml to drop_properties and include the all_name_variants config, we still see alt_name variants.
The transform we use is:
vector-datasource/vectordatasource/transform.py
Lines 161 to 180 in f7994f6
| def _is_name(key): | |
| """ | |
| Return True if this key looks like a name. | |
| This isn't as simple as testing if key == 'name', as there are alternative | |
| name-like tags such as 'official_name', translated names such as 'name:en', | |
| and left/right names for boundaries. This function aims to match all of | |
| those variants. | |
| """ | |
| # simplest and most common case first | |
| if key == 'name': | |
| return True | |
| # translations next | |
| if key.startswith('name:'): | |
| return True | |
| # then any of the alternative forms of name | |
| return any(key.startswith(p) for p in tag_name_alternates) |
# then any of the alternative forms of name
return any(key.startswith(p) for p in tag_name_alternates)
Which uses a list of alternate name tags:
vector-datasource/vectordatasource/transform.py
Lines 497 to 508 in f7994f6
| tag_name_alternates = ( | |
| 'int_name', | |
| 'loc_name', | |
| 'nat_name', | |
| 'official_name', | |
| 'old_name', | |
| 'reg_name', | |
| 'short_name', | |
| 'name_left', | |
| 'name_right', | |
| 'name:short', | |
| ) |
So the action to take is to expand the list to include alt_name.
Metadata
Metadata
Assignees
Labels
No labels

Activity
nvkelso commentedon Dec 20, 2021
Build a test using https://www.openstreetmap.org/relation/3987743.