Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OpenMapTiles vector map #4042

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

zdila
Copy link

@zdila zdila commented May 23, 2023

This pull request adds OpenMapTiles vector tiles among the featured layers. To ensure compatibility with the current stack based on Leaflet, it uses maplibre-gl-leaflet binding.
The main advantage for users is support for labels in multiple languages: users can easily switch by changing language preferences in settings.

196365626-243c978f-256c-4a53-a6a7-aee2d63f6c74

An official email with a link to this PR was sent, together with an edit of the “Featured tile layers” wiki page.

@tomhughes
Copy link
Member

I thought we had agreed that adding support for vector tile layers should be separate from adding any specific layer - certainly at the least I'd like them to be separate commits.

The API key should probably be in the configuration file as well, as with the thunderforest layers, rather than hardcoded.

What are all the 3D terrain bits about?

@zdila
Copy link
Author

zdila commented May 23, 2023

I thought we had agreed that adding support for vector tile layers should be separate from adding any specific layer - certainly at the least I'd like them to be separate commits.

Support for vector tiles is actually just adding maplibre-gl and @maplibre/maplibre-gl-leaflet to package.json.

If you agree, I can prepare such PR.

The API key should probably be in the configuration file as well, as with the thunderforest layers, rather than hardcoded.

I'll look at it.

What are all the 3D terrain bits about?

It is a link to a demo site that shows full capability of vector maps (map rotation, animation, 3D terrain) which is not possible with Leaflet and maplibre-gl-leaflet library.

@tomhughes
Copy link
Member

tomhughes commented May 23, 2023

So are you actually adding two layers here then? The main vector tiles layer and the 3D one? Only the 3D one doesn't seem to be global so I don't think it's going to pass OWG review.

I can't look at the other one because it's not actually working currently.

@zdila
Copy link
Author

zdila commented May 23, 2023

This PR adds only one layer - vector map with carto-like style. Most of the code is actually about updating the link URL in the attribution of this map so that it would point to the same view of the external 3D map demo.

@zdila
Copy link
Author

zdila commented May 23, 2023

You can see it live at http://osm.openmaptiles.org/

@tomhughes
Copy link
Member

Ah yes it does work over HTTP but all the other links were HTTPS which doesn't work.

I think the 3D stuff should be separated out - most of the code is only actually there to do that I think and I think that's going to be a lot more contentious that the rest of it.

@zdila
Copy link
Author

zdila commented May 23, 2023

Do I understand correctly that the issue we are talking about is the "3D map ⛰️." link in the footer?

We added it there to allow visitors to see the OSM in 3D. We would love to have it directly on osm.org. However, it is not technically possible because the site runs on Leaflet. Therefore, we added it at least as an external link.

@tomhughes
Copy link
Member

Yes that's what I'm talking about - it wouldn't be acceptable as a layer on the site anyway as it doesn't appear to cover the whole world and I think that also makes linking to it questionable which is why I'd rather separate that decision/discussion from the question of adding the vector tile layer to the site.

@zdila
Copy link
Author

zdila commented May 23, 2023

Can you please report an area that is missing terrain/map? Because I am checking it on my side and the coverage is global - even in the remote places.

@tomhughes
Copy link
Member

tomhughes commented May 23, 2023

Maybe I just don't understand how to operate it then... I clicked the bottom button to switch back to 2D mode, panned to my home area, then tried to switch back to 3D mode by pressing the same button again and nothing happened.

Specifically I was looking at https://labs.maptiler.com/showcase/osm-3d-terrain/#style=openstreetmap&lang=en&mode=3d&position=15.46/51.76264/-0.00868 which is 2D and I can't find any way to switch to 3D there?

@tomhughes
Copy link
Member

Oh if I hold on that button and move my mouse I can make it tilt and pan...

@zdila
Copy link
Author

zdila commented May 23, 2023

You can also drag the map with the right mouse button, or with Ctrl key pressed. Anyway, that area is not very hilly.

@gravitystorm
Copy link
Collaborator

Great to see progress on this, thank you for the PR.

The main advantage for users is support for labels in multiple languages: users can easily switch by changing language preferences in settings.

This is great! Do you have any guidance for us as to how it handles regional languages, e.g. pt-PT vs pt-BR? Or sr vs sr-Latn? And what happens if you pick a language that is not supported by GL-based renderings, like my (Burmese)?

I want to make sure that the translations work for all of the languages that our user interface works in, hopefully so that there's no mismatch between what you can pick in the UI and what then happens with this layer.

I also noticed on the wiki that it says "map labels translations from Wikidata" - can you clarify this? How does this interact with the translated labels available in OSM? If a contributor spots a mistake on the map, can they edit OSM to fix it, or do they have to edit something on Wikidata?

We added it there to allow visitors to see the OSM in 3D. We would love to have it directly on osm.org. However, it is not technically possible because the site runs on Leaflet. Therefore, we added it at least as an external link.

I don't think the layer attribution is the right place for linking to external sites to view other renderings.

If we want to link to external sites to view other renderings, which haven't been through the new layer approval process, then let's discuss this separately. And if we want to adapt the site to support alternative (i.e. non-leaflet) tech, then let's discuss that separately too. But I don't think such links should be part of the attribution for another layer, and I definitely don't think that should be part of this PR.

@zdila
Copy link
Author

zdila commented May 25, 2023

This is great! Do you have any guidance for us as to how it handles regional languages, e.g. pt-PT vs pt-BR? Or sr vs sr-Latn? And what happens if you pick a language that is not supported by GL-based renderings, like my (Burmese)?

Supported languages of OMT are documented at https://docs.maptiler.com/schema/planet/#languages

Comparison
OSM OMT Language
af Afrikaans
aln Gheg Albanian
am Amharic
ar ar Arabic
arz Egyptian Arabic
ast Asturian
az az Azerbaijani
ba Bashkir
be-Tarask Belarusian (Taraškievica)
be be Belarusian
bg bg Bulgarian
bn Bengali
br br Breton
bs bs Bosnian
ca ca Catalan
ce co Chechen, Corsican
cs cs Czech
cy cy Welsh
da da Danish
de de German
diq Zazaki
dsb Lower Sorbian
el el Greek
en-GB English (UK)
en en English
eo eo Esperanto
es es Spanish
et et Estonian
eu eu Basque
fa Persian
fi fi Finnish
fit Tornedalen Finnish
fr fr French
fur Friulian
fy fy West Frisian
ga ga Irish
gcf Guadeloupean Creole French
gd gd Scottish Gaelic
gl Galician
gsw Swiss German
he he Hebrew
hi hi Hindi
hr hr Croatian
hsb Upper Sorbian
hu hu Hungarian
hy Armenian
ia Interlingua
id id Indonesian
is is Icelandic
it it Italian
ja ja Japanese
ja-Hira Japanese (Hiragana)
ja-Latn Japanese (Latin)
ja_rm Japanese (Romanization)
ja_kana Japanese (Kana)
ka ka Georgian
kab Kabyle
kk-cyrl kk Kazakh (Cyrillic)
km Khmer
kn kn Kannada
ko ko Korean
ko-Latn Korean (Latin)
ksh Colognian
ku-Latn Kurdish (Latin)
ku Kurdish
la Latin
lb lb Luxembourgish
lt lt Lithuanian
lv lv Latvian
mk mk Macedonian
ml Malayalam
mo Moldovan
mr Marathi
ms Malay
mt Maltese
my Burmese
nb Norwegian Bokmål
nds Low German
ne Nepali
nl nl Dutch
nn Norwegian Nynorsk
no Norwegian
nqo N’Ko
oc oc Occitan
pa Punjabi
pl pl Polish
pnb Western Punjabi
ps Pashto
pt-BR Portuguese (Brazil)
pt-PT Portuguese (Portugal)
pt pt Portuguese
rm Romansh
ro ro Romanian
ru ru Russian
sat Santali
sc Sardinian
scn Sicilian
sco Scots
sk sk Slovak
skr-arab Saraiki (Arabic)
sl sl Slovenian
sq sq Albanian
sr-Latn sr-Latn Serbian (Latin)
sr sr Serbian
sv sv Swedish
ta ta Tamil
te te Telugu
th th Thai
tl Tagalog
tr tr Turkish
tt Tatar
uk uk Ukrainian
vi Vietnamese
xmf Mingrelian
yi Yiddish
yo Yoruba
zh Chinese
zh-CN Chinese (China)
zh-HK Chinese (Hong Kong)
zh-TW Chinese (Taiwan)

Currently if the language is not supported then local language is used - same as on Carto map - value from the name key of the tag.

I want to make sure that the translations work for all of the languages that our user interface works in, hopefully so that there's no mismatch between what you can pick in the UI and what then happens with this layer.

I will discuss it with my team. In any case current implementation doesn't fallback to the other languages in the list but I will implement it into this PR. Also falling back to main locale if sub-locale is not available (pt-BR -> pt).

I also noticed on the wiki that it says "map labels translations from Wikidata" - can you clarify this? How does this interact with the translated labels available in OSM? If a contributor spots a mistake on the map, can they edit OSM to fix it, or do they have to edit something on Wikidata?

We have decided to use names primarily from wikidata because there are more translations than in OSM. If the name is not in wikidata then one from OSM is used.

We added it there to allow visitors to see the OSM in 3D. We would love to have it directly on osm.org. However, it is not technically possible because the site runs on Leaflet. Therefore, we added it at least as an external link.

I don't think the layer attribution is the right place for linking to external sites to view other renderings.

If we want to link to external sites to view other renderings, which haven't been through the new layer approval process, then let's discuss this separately. And if we want to adapt the site to support alternative (i.e. non-leaflet) tech, then let's discuss that separately too. But I don't think such links should be part of the attribution for another layer, and I definitely don't think that should be part of this PR.

We will adjust it in this PR.

@pnorman
Copy link
Contributor

pnorman commented May 26, 2023

Currently if the language is not supported then local language is used - same as on Carto map - value from the name key of the tag.

What about when the language of the name tag is in a script Maplibre does not support?

@zdila
Copy link
Author

zdila commented May 26, 2023

What about when the language of the name tag is in a script Maplibre does not support?

Not sure if I understand you correctly, but for unsupported languages their local name will be displayed.

If you meant something else then please give me some example. You can try switching to (unsupported) language by setting it as primary in your browser (until I add a fallback to other languages your browser accepts - then try just with a single language configured).

@zdila
Copy link
Author

zdila commented May 26, 2023

Meanwhile I have removed 3D map link in the attribution.

@zdila
Copy link
Author

zdila commented May 26, 2023

The API key should probably be in the configuration file as well, as with the thunderforest layers, rather than hardcoded

done

@jachym
Copy link

jachym commented May 26, 2023

Maybe I just don't understand how to operate it then... I clicked the bottom button to switch back to 2D mode, panned to my home area, then tried to switch back to 3D mode by pressing the same button again and nothing happened.

Specifically I was looking at https://labs.maptiler.com/showcase/osm-3d-terrain/#style=openstreetmap&lang=en&mode=3d&position=15.46/51.76264/-0.00868 which is 2D and I can't find any way to switch to 3D there?

@tomhughes The map is 3D, but London is rather flat, sending better position:
https://labs.maptiler.com/showcase/osm-3d-terrain/#style=openstreetmap&lang=en&mode=3d&position=12.51/55.4648/-3.3975/-4.80/85.00

As metioned, you hold Ctrl key and can change the view angle.

@pnorman
Copy link
Contributor

pnorman commented May 27, 2023

Not sure if I understand you correctly, but for unsupported languages their local name will be displayed.

Maplibre doesn't support some scripts (e.g. Burmese, Lao, and other Brahmic scripts), so it can't display the local name.

@ZeLonewolf
Copy link

ZeLonewolf commented May 27, 2023

Maplibre doesn't support some scripts (e.g. Burmese, Lao, and other Brahmic scripts), so it can't display the local name.

That's not exactly accurate. The issue is that MapLibre doesn't support ligatures and combining characters correctly, and instead displays them anywhere from slightly to terribly wrongly. However, OSM-Carto also renders some of these scripts wrongly as the examples below will show (and should probably be documented if they're not already). Whether the "wrong" rendering makes the label unreadable or just slightly off will depend heavily on the script involved, and in my experience, it's the worst in Right-to-Left scripts.

This is what MapLibre displays for the United States label, in Lao:

image

However, it is supposed to look like this:
image

The issue is that the squiggly line above the second-to-last character is supposed to be directly over it, not off to one side. This issue is pervasive across all ligature/combiner scripts. While a Lao reader might still understand the script above, it would definitely look wrong, and this problem in other scripts results in mangled text that's absolutely unreadable to native speakers.

This is something which has always been broken in mapbox-gl and is a high priority for maplibre-gl to get right, and it's documented in maplibre/maplibre#193.

Examples of rendering the Lao capital of Vientiane, which should appear in local script as:

ວຽງຈັນ

Google Maps:
image

OSM Americana (based on MapLibre):
image

OSM Carto:
image

However, looking at these examples, it seems that osm-carto isn't actually any different from what MapLibre is producing. Both MapLibre and osm-carto have the same issue with the diacritic being shifted to the right slightly.

Let's take a look at Kathmandu, Nepal, which is supposed to appear as:

काठमाडौँ

Google Maps:
image

OSM Americana
image

OSM Carto:
image

Mandalay, Burma, perhaps?

Should be:

မန္တလေး

Google Maps:
image

OSM Americana:
image

OSM Carto:
image

Burmese is where we really start to see the problem, with that infinity-sign looking diacritic that's supposed to be under the second character coming in rather mangled. However, OSM-Carto also gets it slightly wrong by jamming the ligature up into the character when there's supposed to be space between them.

@LaoshuBaby
Copy link
Contributor

LaoshuBaby commented Jun 3, 2023

图片

It seems that this new vector map does not handle the display of Chinese very well. It displays the Traditional and Simplified varient at the same time, because a DWG member with an Asian cultural background combined the two varients in name:zh, and usually The user will choose zh-CN or zh-TW two locales (for example, my browser uses zh-CN, so you can see other UI translations are displayed in my locale), but the label text is not correct from zh-CN match to name:zh-Hans.


图片

Even if I forcibly specify locale=zh-TW, the name:zh value mixed with various variants will still be preferred as the display label text

@SomeoneElseOSM
Copy link

Re "... because a DWG member ... combined the two variants in name:zh" that sounds like a tagging issue that's best discussed elsewhere - perhaps somewhere at https://community.openstreetmap.org/ ?

@ZeLonewolf
Copy link

I don't know how and where NaturalEarth data is used, but yes. The main page is the showcase for the OSM database and should only visualize data that is included and can be edited here. But this is only my opinion, this is for the OSMF to decide.

Natural Earth is used in the standard tile layer and all of its derivatives.

So basically you are saying that all of the current layers should be shut down.

I'd prefer if you could not put words into my mouth. I don't know what data from NaturalEarth is used in OSM Carto and for what reason. And this if off-topic here.

It is very on topic. All of the current layers use data external to OSM, therefore that should not be a reason to disqualify the proposed OpenMapTiles layer.

@Discostu36
Copy link

It is very on topic. All of the current layers use data external to OSM, therefore that should not be a reason to disqualify the proposed OpenMapTiles layer.

No, because there is, in my opinion, no valid reason to use Wikidata data for the labels here, they can be easily added to the OSM data if missing. But there might be a valid reason for the use of NaturalEarth data at Carto that I don't know about. Can we now talk about this specific case and not about Carto?

@ZeLonewolf
Copy link

I'm taking my knowledge from this exchange, with my bold:

I also noticed on the wiki that it says "map labels translations from Wikidata" - can you clarify this? How does this interact with the translated labels available in OSM? If a contributor spots a mistake on the map, can they edit OSM to fix it, or do they have to edit something on Wikidata?

We have decided to use names primarily from wikidata because there are more translations than in OSM. If the name is not in wikidata then one from OSM is used.

Thanks for that. I agree that's a showstopper. We specifically ran into this in Americana and had to get it fixed upstream in planetiler. Unfortunately I can't find the planetiler ticket on it. At the time preferring wikidata was regarded as a bug so I'm surprised to hear OMT is doing that.

osm-americana/openstreetmap-americana#428

@1ec5
Copy link
Contributor

1ec5 commented Jul 13, 2023

We specifically ran into this in Americana and had to get it fixed upstream in planetiler. Unfortunately I can't find the planetiler ticket on it. At the time preferring wikidata was regarded as a bug so I'm surprised to hear OMT is doing that.

Planetiler inverted the logic to prefer OSM name tags over Wikidata labels in openmaptiles/planetiler-openmaptiles#55 for consistency with OpenMapTiles, which in turn tried to be consistent with Mapbox Streets: openmaptiles/openmaptiles#251 (comment). 1

I think the source of confusion may be that, if a feature has a name but no name:la in OSM, OpenMapTiles will set name:la to the Wikidata item’s Latin-language label instead of name. Thus, a user who prefers Latin will see the Wikidata label. This is even the case if name happens to be a different Latin name, because OpenMapTiles has no way of knowing it’s in the Latin language.

Footnotes

  1. However, Mapbox actually does unconditionally prefer Wikidata labels over OSM name tags.

@matkoniecz
Copy link
Contributor

All of the current layers use data external to OSM, therefore that should not be a reason to disqualify the proposed OpenMapTiles layer.

The big difference is that other renderers use data that is missing from OSM (terrain shape) or use matching OSM, for performance reasons (Carto).

While this would, according to description ("If the name is not in wikidata then one from OSM is used.") would force people to fix mistakes in Wikidata even where OSM data exists and is correct.

@1ec5
Copy link
Contributor

1ec5 commented Jul 15, 2023

While this would, according to description ("If the name is not in wikidata then one from OSM is used.") would force people to fix mistakes in Wikidata even where OSM data exists and is correct.

Fortunately, that turned out to be a description of Mapbox Streets rather than of OpenMapTiles. 😉

We don’t have to rely on vague descriptions because we can see the behavior for ourselves. For example, this airport area in OSM has both the name and name:en keys set to San José Mineta International Airport, while the corresponding Wikidata item has an English label of “San Jose International Airport”. (Both names are reasonable.) In MapTiler’s OpenMapTiles tileset, the name and name:en properties are both set to San José Mineta International Airport, so an English-speaking user will see the OSM area’s tag value, not the Wikidata item’s label.

By contrast, the OSM area lacks a name:ja tag, while the Wikidata item does have a Japanese label of “ノーマン・Y・ミネタ・サンノゼ国際空港”. A Japanese-speaking user will see Wikidata’s Japanese label rather than an OSM name tag in an undetermined language (which happens to be in English).

name: San José Mineta International Airport

(This screenshot is of a tile inspector behind a login wall that requires a MapTiler API token. However, you can see the same behavior in @ZeLonewolf’s Planetiler-powered tile server’s inspector by hovering over this green dot.)

The need to provide feedback to mappers is not necessarily an argument against the Wikidata fallback. The Wikidata fallback can serve to mitigate against edits that OSM doesn’t want. In this case, we could say that this fallback makes it more difficult for mappers to detect gaps in language coverage – if only the Japanese speaker could see the English name, they’d be tempted to add a name:ja tag on the spot. In a place as linguistically diverse as San José, no one would have a problem with that edit. But much ink has been spilled about how translations and transliterations should not be indiscriminately tagged on mundane features in OSM in other places.

The problem with such prominent placement on osm.org is that the mapper can’t visually determine whether the label comes from OSM or Wikidata, or that there’s even a discrepancy. OpenMapTiles doesn’t currently expose any metadata explicitly indicating the source of a particular name on a particular feature. However, the style could show both the localized and unlocalized names together whenever the two differ.

For example, in the proposed OpenMapTiles layer, a Latinist will see this city labeled as “Francofurtum” based on Wikidata’s Latin label instead of “Frankfort” based on OSM’s name tag:

name: Frankfort

(MapTiler, Planetiler equivalent)

By contrast, OSM Americana shows both the Wikidata fallback and the OSM name tag, which can give the mapper peace of mind:

Francofurtum (Frankfort)

I realize this is not an appropriate place to provide design feedback on the proposed OpenMapTiles style, nor to toot Americana’s horn, but I think it’s important that we don’t view localized label sources as a black-and-white, zero-sum issue.

@LaoshuBaby
Copy link
Contributor

LaoshuBaby commented Jul 17, 2023

if only the Japanese speaker could see the English name, they’d be tempted to add a name:ja tag on the spot. In a place as linguistically diverse as San José, no one would have a problem with that edit. But much ink has been spilled about how translations and transliterations should not be indiscriminately tagged on mundane features in OSM in other places.

Yes, this is a topic worth thinking about, especially for languages ​​using non-latin characters (I insist that transliteration across scripts should be treated more leniently, because it is not easy to rely on machines to do accurately ) users, when they first glance at OSM data, when they find a San Jose Airport, and the element is indeed common enough (Negative typical: Old Durham), then the user will will choose to translate its English name into the language used. The question of what is worth translating into different languages ​​and what is not, maybe it can be judged by combining https://wiki.openstreetmap.org/wiki/Names#When_to_avoid_transliteration, at least it is easier than reading such a long list of mailing lists. I've also noticed that there are some renders that use automatic transliteration to complete the data, but it's too early to be an OSM/wikidata fallback


Hide it if anyone finds this comment not relevant enough

@lonvia
Copy link
Contributor

lonvia commented Jul 19, 2023

so an English-speaking user will see the OSM area’s tag value, not the Wikidata item’s label.

This fallback doesn't work well for places that only have a name tag. In Germany, OMT seems to be using mainly names from wikidata when I look at the map with a German locale. The reason of course being that we don't tag name:de when there is only a name tag present and no translations. The issue is rather obvious with railway stations, e.g. https://osm.openmaptiles.org/#map=14/52.5229/13.4028&layers=V, even when using an English locale.

@1ec5
Copy link
Contributor

1ec5 commented Jul 21, 2023

so an English-speaking user will see the OSM area’s tag value, not the Wikidata item’s label.

This fallback doesn't work well for places that only have a name tag. In Germany, OMT seems to be using mainly names from wikidata when I look at the map with a German locale. The reason of course being that we don't tag name:de when there is only a name tag present and no translations.

This wiki page discusses the issue in more detail. If the feature’s name is translated or transliterated into another language, then it is valid and expected to pair name with name:de. This can come as a shock to mappers who focus on monolingual regions and normally think of their language as the “obvious” one. To be sure, not everything named should have a name:*. An individual shop’s name typically does not have a reasonable translation, so name:de would serve very little purpose.

There is a gray area when it comes to features that do have translations but none of them is locally attested or locally relevant. Data consumers face a catch-22 between, on the one hand, the principle that only locally attested names should be tagged in name:* and, on the other hand, the opinion that they should prefer name over any translations in Wikidata if there’s no name:*. Perhaps it isn’t a bad thing to expose mappers to this reality (optionally, as the Standard layer is still the default).

Again, an OpenMapTiles-based layer can address your feedback in at least two ways:

  • Include both name:de and name in each label when the two differ (at the cost of some extra clutter and a stylistic departure from osm-carto)
  • Disable the Wikidata fallback (which would require changes on MapTiler’s backend to avoid impacting their other customers)

The issue is rather obvious with railway stations, e.g. https://osm.openmaptiles.org/#map=14/52.5229/13.4028&layers=V, even when using an English locale.

I assume you’re referring to the redundant “Station” suffix everywhere. This is the legacy of Wikidata bootstrapping its labels from Wikipedia (where the suffix is necessary for technical reasons that don’t apply to Wikidata). The issue can be comprehensively fixed in a matter of hours, as I once did for place names in one language in many countries. Nevertheless, it highlights the fact that Wikidata is still a work in progress, just like OSM. If this project wants to hold a featured layer’s external data sources to a higher standard than OSM, then that is indeed this project’s prerogative.

@matkoniecz
Copy link
Contributor

matkoniecz commented Jul 28, 2023

This wiki page discusses the issue in more detail. If the feature’s name is translated or transliterated into another language, then it is valid and expected to pair name with name:de.

Note

This fallback doesn't work well for places that only have a name tag.

In such cases it is far less obvious is repeating name into name:de / name:pl is something that makes sense (I wrote that section on Wiki).

If this project wants to hold a featured layer’s external data sources to a higher standard than OSM, then that is indeed this project’s prerogative.

In this case the problem is potentially forcing people to fix mistakes in Wikidata even where OSM data exists and is correct.

@AndrewHain
Copy link
Contributor

I assume you’re referring to the redundant “Station” suffix everywhere. This is the legacy of Wikidata bootstrapping its labels from Wikipedia (where the suffix is necessary for technical reasons that don’t apply to Wikidata). The issue can be comprehensively fixed in a matter of hours, as I once did for place names in one language in many countries. Nevertheless, it highlights the fact that Wikidata is still a work in progress, just like OSM. If this project wants to hold a featured layer’s external data sources to a higher standard than OSM, then that is indeed this project’s prerogative.

Names like “Leeuwarden station” are not intrinsically wrong, just unwanted and a hazard of using a project with different ends. A better solution than resorting to Wikidata could be committing to fix weaknesses in our own language names.

@1ec5
Copy link
Contributor

1ec5 commented Oct 2, 2023

I’m not sure if this Wikidata discussion is really on-topic for this PR. MapTiler could take this issue off the table by disabling the Wikidata fallback on their end, but they’d have to determine whether they want to maintain a separate tileset for osm.org versus their other customers, who generally benefit from mashing up the two sources.

I also don’t think this will be the last style to be proposed that incorporates Wikidata in some fashion. In my opinion, there’s no strong need to prevent Wikidata labels from seeping into the website at all cost, as long as they only appear in a non-default style, or they have some kind of special fallback styling, or they’re combined with the OSM name as in #4042 (comment).

Names like “Leeuwarden station” are not intrinsically wrong, just unwanted and a hazard of using a project with different ends.

The English Wikipedia used to often omit “station” from railway station article titles, but they adopted this convention after much discussion about considerations that have little bearing on Wikidata label conventions. I’d contend that the Wikidata community would prefer to move “station” from each label to the corresponding description.

Regardless, you have a point that Wikidata labels are not necessarily designed to be map labels. Technically they’re more like the names of convenience that mappers often set on route relations in OSM. A more clear-cut example is that “Washington, D.C.”, is a fine Wikidata label, but the map label really should be just “Washington”. (This example is somewhat contrived, because the city is already tagged in so many languages in OSM.) I’ve opened openmaptiles/openmaptiles-tools#437 and onthegomap/planetiler#679 to have these tile generators prefer a specifically tagged “map label” statement over the more generic label.

A better solution than resorting to Wikidata could be committing to fix weaknesses in our own language names.

Such as welcoming translations and transliterations that aren’t verifiable on the ground? Even more out of scope for this PR. 😉

@matkoniecz
Copy link
Contributor

matkoniecz commented Oct 2, 2023

in my opinion, there’s no strong need to prevent Wikidata labels from seeping into the website at all cost

In my opinion any style that uses Wikidata names even if OSM name tags are provided should not be included (note, if name:LANG tag is not present then using that language label from Wikidata is not covered by that).

I think that we should not never need to tell anyone that fixing OSM data will not help and they need to fix something on third-party website to fix name display. Or encourage people to remove valid wikipedia/wikidata tags as some fields in Wikidata have wrong info.

(yes, I am aware about Natural Earth data resulting in some problems on low zoom levels of OSM Carto, but we should not make things significantly worse)
(yes, I am aware that terrain shape on OSMbased maps is coming from SRTM or similar sources - but we do not map DEM unlike names)
(also, note that Wikidata imported data from Wikipedia which in turn encouraged sourcing geographic data from Google Maps which is separate part of a quagmire)

(this is my personal preference, not OSMF policy)


EDIT: if this style prefer OSM data over Wikidata data whenever possible, it is not a strong blocker in my opinion (though Wikidata licensing quagmire worries me).

@1ec5
Copy link
Contributor

1ec5 commented Oct 2, 2023

In my opinion any style that uses Wikidata names even if OSM name tags are provided should not be included (note, if name:LANG tag is not present then using that language label from Wikidata is not covered by that).

That’s the case we’re talking about here, if I’m not mistaken.

(also, note that Wikidata imported data from Wikipedia which in turn encouraged sourcing geographic data from Google Maps which is separate part of a quagmire)

Let’s not turn this PR into a detailed rundown of Wikidata’s faults, as though the style brings in more Wikidata content than it actually does. Besides, Google Maps uses Wikidata for labels, not the other way around.

@zdila
Copy link
Author

zdila commented Apr 29, 2024

In the recent release of OpenMapTiles 3.15, the Wikidata translations have been switched off: https://maptiler.com/news/2024/04/openstreetmap-data-prepared-for-advanced-cartography/

Are there any other blockers for accepting this PR?

@tordans
Copy link
Contributor

tordans commented Apr 30, 2024

Can we test the current state somewhere?
https://osm.openmaptiles.org/ is down.
Maybe Tom can deploy this branch on one of the testing servers?

@zdila
Copy link
Author

zdila commented Apr 30, 2024

@tordans https://osm.openmaptiles.org/ - I've just started it again.

@jmaspons
Copy link

Can the language selector be added as a combobox at the map layers panel? Would be more discoverable and selectable for users without osm account.

@tomhughes
Copy link
Member

Can the language selector be added as a combobox at the map layers panel? Would be more discoverable and selectable for users without osm account.

There are already separate issues for adding a language selector for non-logged in users.

@LaoshuBaby
Copy link
Contributor

the Wikidata translations have been switched off

Is it possible to disable automatic transliteration of non-Latin names?

@matkoniecz
Copy link
Contributor

I think it is fine? In the same way as it would be fine to host nondefault layer showing names in Korean/Polish/Japanese?

@jachym
Copy link

jachym commented Oct 10, 2024

Any resolution regarding this PR? Can we have this PR merged and closed, I believed, we addressed the concerns and issues of the community.

@ZeLonewolf
Copy link

New layers are approved by the Operations Working Group, which has not happened yet.

It was last discussed at their May meeting. I do not see that it has been on an OWG meeting agenda since.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.