RFC: Name labeling strategy
text
One of OSM-Carto's signature design principles and key to its function in the OSM Community is displaying names everywhere on the planet in the respective local languages. We have discussed this paradigm in the past, but it is not part of this RFC, this is taken as a given here.
We label a lot of features with a name label - including some that do not typically have a [proper name](https://en.wikipedia.org/wiki/Proper_name_(philosophy)) and where us trying to display a name does not support a consistent mapping practice. See for example #4629. First suggestion of this RFC is therefore
* [ ] Review existing name labeling regarding cases where this is not in support of an existing consensus mapping practice.
For the cases where we do want to continue displaying the local name of a feature as a label there are a number of observations that we need to consider:
* To properly render a label for a name in the map in the general case, knowledge of the language of the label is a necessity. This applies, in particular, but not exclusively, to labels in CJK, Arabic and Cyrillic scripts. See #2208.
* There is no established practice for mappers to specify the language of the individual `name` tags and it is unrealistic that such practice will develop in the future - simply because of the scale of such effort and the massive redundancies such data would have, See also [here](https://wiki.openstreetmap.org/wiki/Proposed_features/Language_information_for_name).
* There have been some efforts in the OSM community to establish the mapping of the dominant local language(s) on an aggregate basis for regions, in particular administrative areas. See [here](https://wiki.openstreetmap.org/wiki/Proposed_features/Default_Language_Format) and [here](https://imagico.de/blog/en/you-name-it-on-representing-geographic-diversity-in-names/). The most successful tag along those lines has been [the `default_language` tag](https://taginfo.openstreetmap.org/keys/default_language) - which is tagged currently on around 280 administrative unit relations.
* tagging of proper names in `name:<lang>` is very consistently done in cases the name in question is in substantial use locally at the location of the feature.
* tagging of `name` is only done consistently by mappers in cases when there is a single proper name entered in the tag. For all other uses of the `name` tag, whether that is compound strings containing multiple names or strings that do not represent proper names there is no global consensus among mappers and tagging practice varies widely.
From these primary observations we can conclude:
* If and when OSM-Carto decides to use `default_language` (or any other method mappers choose to map the local language(s) of regions in OpenStreetMap) to determine the language of the name to be labeled, it makes sense to source the name from the `name:<lang>` tags rather than `name` in cases the content of `name` does not indicate the `name:<lang>` tag(s) to be labeled not to be the locally predominantly used name(s) for the feature (because `name:<lang>` is not a substring of `name`). Reason is that - as observed above - `name:<lang>` data is much more consistent and much less prone to misinterpretation so this approach would lead to higher quality labels and to better support for mappers in consistent mapping practice.
* In the absence of suitable explicitly tagged information on the local language(s) a limited and less reliable way to determine the locally used name and its language would be to determine partial matches between the `name` tag and the `name:<lang>` tag. This will not help in case of the large scale ambiguities in determine language from unicode range (CJK, Arabic and Cyrillic) but it will help with the various cases of heterogenous local language use around the world on an individual feature or suburb scale.
From these observations and conclusions i derive the following broader recommendations:
* OSM-Carto should stop displaying labels (and thereby providing supportive feedback) directly from a `name` tag if that tag can be determined not to contain a single proper name. There is clearly no consensus on what principles such uses of the `name` tag follows and no consistent mapping practice we could support and it is incompatible to our core principles to selectively steer mappers to a specific tagging practice in that regard, especially since we know it is a dead end anyway because it does not provide the necessary information for proper display of the name(s) - namely their language(s).
* OSM-Carto should support developments in tagging practice to document the missing information on the dominant local language(s) on an aggregate basis as far as this is compatible with our goals. `default_language` has been established for quite some time now and seems to be actively maintained. Despite the lack of larger data users providing meaningful feedback on this data, tagging seems fairly consistent and - while far from complete - fairly broad globally.
Concrete work steps that derive from these recommendations:
* [ ] Implement analysis of `name` tags for elimination of cases that clearly do not contain a single proper name. Indications that can be used are:
* Combination of unicode ranges for different scripts
* Presence of character sequences that are used as separators between different components (primarily `/ `, ` - `, `<newline>` and `;`)
* Potentially: Presence of words indicating a classifying label and not a proper name. This is language specific, making it a hen and egg problem, meaning this is likely only feasible in combination with the other measures.
* [ ] Implement generation of efficient spatial lookup tables derived from administrative boundary relations with `default_language` tags - allowing on-the-fly determination of the applicable `default_language` for any point of the map.
* [ ] Implement change dampening mechanism for the `default_language` data to avoid large scale effects of vandalism of that data. This is a prerequisite of practically using this data.
* [ ] Implement determining name label and its language(s) from name tags and `default_language` along the principles outlined above. A demonstration how such a system could look like can be found [here](https://imagico.de/blog/en/rethinking-name-labeling-in-openstreetmap-map-styles/)
I understand that these ideas likely appear to be pretty radical. But they are not just a spontaneous idea, they are the result of careful consideration of the situation and taking into account the various discussions around the matter that took place over the years. Comments and discussions on these are welcome. But discussion should focus on approaches to meet the needs of name labeling in OSM-Carto and similar maps as outlined at the beginning based on what is actually mapped in OSM right now. Attempts to use this issue as a platform to lobby for OSM-Carto to endorse specific tagging ideas that do not have consensus support and that are not able to help with the needs of map design in proper display of local names world wide are not going to be tolerated.
45 条评论