gravitystorm / openstreetmap-carto

A general-purpose OpenStreetMap mapnik style, in CartoCSS
Other
1.53k stars 819 forks source link

Rendering international names #803

Closed matthijsmelissen closed 6 years ago

matthijsmelissen commented 10 years ago

It might make sense to render int_name in addition to name for placenames, in particular for places not in the Latin alphabet.

See also https://trac.openstreetmap.org/ticket/3065.

pnorman commented 10 years ago

:-1:, we've always kept this style rendering using local languages.

Grillmannen commented 10 years ago

Agree with pnorman, the main map style should be kept international. Local renderings can use other name formats. Maybe there should be an alternative that always uses int_name when available?

matthijsmelissen commented 10 years ago

@Grilmannen Do you mean with international the local spelling, i.e. the exact opposite of int_name? If not, I'm afraid I can't quite follow you.

dieterdreist commented 10 years ago

Il giorno 01/ago/2014, alle ore 17:22, math1985 notifications@github.com ha scritto:

It might make sense to render int_name in addition to name for placenames, in particular for places not in the Latin alphabet.

partly agree, but it would also make sense to render Chinese names - in particular for Chinese users and places named not with Chinese symbols ;-) (what I tried to say: it depends for whom we are making the map).

Int_name is not a very clear tag, because stuff usually has names in languages, but "international" is not a language (usually the value in osm is English, but one might also argue for Chinese or Russian in some parts of the world)

cheers, Martin

pnorman commented 10 years ago

It's also worth remembering that there are other tile layers which always render English names, either instead or in addition to local ones. MapQuest Open does local (english) and Mapbox allows you to use a defined language when setting up a rendering.

That being said, I do see some language specific stuff happening if I try to tackle Han unification in Unicode (i.e. Han deunification), but that's quite distinct

matthijsmelissen commented 10 years ago

Note that some countries, like Morocco, South Korea, and Japan, currently have two versions of each name in the name tag.

I'm not very fond of that because it makes it harder to use the data for purposes where only one language version is required.

If we choose to render int_name or name:en in addition to name, perhaps people are more willing to only put one language version in the name tag.

Grillmannen commented 10 years ago

@math1985 I realize I was being obscure... In "international" I meant that local languages should be used for different countries on the main rendering, even if it could be construed as the opposite.

23cpo commented 10 years ago

I think it would be useful to see also english names on the map in addition to the local names. At the moment when I want to read the map for example in China it's useless for me. Also in arabic speaking countries etc.

The current rendering leads to misuse of the name tag, for example in Japan and South Corea etc. as most of the mappers speak english and it's hard for them to do mapping in countries with foreign characters.

The german mapstyle already does some localization (not all tiles are updated yet): http://openstreetmap.de/karte.html?zoom=10&lat=49.99303&lon=18.83157&layers=B000TT Code: http://svn.openstreetmap.org/applications/rendering/mapnik-german/views/get_localized_name.sql

The main question is: Wants OSM to be readable only for locals or also for international audience?

@pnorman The world keeps on turning. I think "but we have always done so" isn't a good argument and would prevent any change.

gravitystorm commented 10 years ago

Have a look at the opencyclemap and transport layers for one approach - I render the name:en if it exists and if it doesn't appear in the name tag. It's not perfect but I find it helpful.

Of course, as an English speaker I can't really judge impartially what 'other' language should be used. Within OSM, for example, it could be argued that German is the most spoken language so perhaps that should be used as a fallback! For my own layers, I can be as impartial as I please.

matthijsmelissen commented 10 years ago

I think using English as fallback would make sense.

For Northern Africa, of course you could argue that using French as a fallback is more sensible.

vincentdephily commented 10 years ago

Using English as fallback only makes sense because most mappers speak English, but that's hopefully just a temporary condition (ideally we want mappers to be spread evenly accross the globe). If you look at users rather than mappers, English is probably already less dominant.

As somebody who can only read latin script, I often use renderings that use fallbacks. But I think that this style, as a showcase of OSM, should remain neutral. Even better of course would be to implement user-configurable multilingual maps, but it's one of those "always a couple of years off" features.

23cpo commented 10 years ago

@gravitystorm I like your approach @vincentdephily You're saying "But I think that this style, as a showcase of OSM, should remain neutral." This isn't the case. Just take a look at Japan, South Corea, Nepal, or other countries which have a none latin writing system. The current rendering leads to misuse of "name" tags.

vincentdephily commented 10 years ago

The name="ja (en)" tags in Japan/Korea/etc is the local mappers' decision, not the rendering style's decision. The style itself has remained neutral so far, not falling back to a particular language.

And a multilingual name value in a country that isn't multilingual definitely is a misuse of the name tag. Mappers resort to it because we do not have prevalent multilingual renderings, but it's yet another case of tagging for the renderer.

sommerluk commented 10 years ago

Hm, the idea of rendering always when available also the english name like “Munich (München)” or “München (Munich)”… Seems to be more confusing. Why english as fallback for a german name? And not spanish or frensh? And overall: Why multiple/multilanguage names as default rendering at all? I would prefer to stay rendering the localized version only.

Concerning Japan: Considering https://lists.openstreetmap.org/pipermail/tagging/2014-September/019326.html it seems that – the road signs on the ground are almost all bilingual japanese/english – the Japanese community opts for “name=japanese” and “name:ja=japanese” and “name:en=english” as tagging scheme – many maps are are rendered also bilingual japanese/english Correct me if I didn’t catch that right.

So it could be reasonable to render “name (name:en)” in Japan (because of the bilingual road signs on the ground) and just “name” in the rest of the world. Would this technically be possible?

pnorman commented 9 years ago

So, after struggling with processing name tags for a map aimed at English speakers, I'm changing my mind somewhat, given the current broken state of the data. I'd almost favour rendering name (name:en) or something similar without attempting to process the name tag. This would expose where there are broken name tags.

I render the name:en if it exists and if it doesn't appear in the name tag. It's not perfect but I find it helpful.

name=Antwerpen name:en=Antwerp :)

dieterdreist commented 9 years ago

2014-10-02 21:25 GMT+02:00 Paul Norman notifications@github.com:

I'd almost favour rendering name (name:en) or something similar without attempting to process the name tag. This would expose where there are broken name tags.

+1, this will stop the current practise in some parts of the world to add english versions into the name tag where english is not the official language. One counterindication I can think of: in plurilingual parts of the world with English being one of the official languages it might lead to strange results (e.g. tagging: name="foo / bar" name:en=bar name:<something else>=foo would render the name as "foo / bar (bar)".

matkoniecz commented 9 years ago

name="foo / bar" is IMHO incorrect. It should be name=foo alt_name=bar. Also http://wiki.openstreetmap.org/wiki/Key:name is not metioning possibility to fit many names into this tag.

dieterdreist commented 9 years ago

2014-10-03 13:28 GMT+02:00 Mateusz Konieczny notifications@github.com:

name="foo / bar" is IMHO incorrect. It should be name=foo alt_name=bar. Also http://wiki.openstreetmap.org/wiki/Key:name is not metioning possibility to fit many names into this tag.

no, alt_name is for alternative names (in the same language), name is for the official name, name:country_code for the localized names. Please note that this is not "fitting many names into the tag" but it is bilingual areas putting the official name into the main name tag (in the official language(s)). Examples: http://www.openstreetmap.org/node/1635651356 (in this case they use the hyphen but the problem is the same) http://www.openstreetmap.org/relation/47283 (this is the admin boundary, but the place node is similar).

these examples use the hyphen which I personally don't suggest because there are lots of hyphens in composite names, while there are few slashes in names, especially if you don't look at abbreviations.

FWIW, I'd also support the idea to drop "name" and to only put localized names plus another tag to specify the official language(s) of an area, but this didn't get a lot of support AFAIK when it was mentioned last time.

sommerluk commented 7 years ago

I would suggest to close this ticket as NOT_A_BUG.

matthijsmelissen commented 7 years ago

I hear this issue coming up a lot when talking to people about our style. It's often the first 'problem' of the style they mention. For Gnome, it was even stated as one of the two reasons not to use this style for Gnome Maps.

Perhaps we should really partially reconsider our stance, and at least render on the country level names in English as well.

matkoniecz commented 7 years ago

For Gnome, it was even stated as one of the two reasons not to use this style for Gnome Maps.

Do you have a link to this discussion? I am curious what was the second problem.

matthijsmelissen commented 7 years ago

@matkoniecz https://bugzilla.gnome.org/show_bug.cgi?id=764841

Second issue was the generally cluttered look of the style.

kocio-pl commented 7 years ago

int_name could be especially important for big geographical entities like continents, oceans, seas, mountains, rivers etc. - that's part of the problem with rendering on low zoom levels (see #2688), where human related objects are not too visible and natural objects can span across many countries.

dieterdreist commented 7 years ago

2017-09-12 22:15 GMT+02:00 kocio-pl notifications@github.com:

int_name could be especially important for big geographical entities like continents, oceans, seas, mountains, rivers etc. - that's part of the problem with rendering on low zoom levels (see #2688 https://github.com/gravitystorm/openstreetmap-carto/issues/2688), where human related objects are not too visible and natural objects can span across many countries.

int_name is not really defined, and the wiki suggests to use different tags instead: "International name (note: consider using language specific names instead; e.g., name:en=... - see above – International does not (necessarily) mean English)". There is no such thing as an "international" language hence neither there is an "international name".

kocio-pl commented 7 years ago

Maybe some international institution could be a source - unfortunately UN for example uses 6 languages:

https://unstats.un.org/unsd/geoinfo/geonames/

matthijsmelissen commented 7 years ago

The openstreetmap.org website is English only right?

pnorman commented 7 years ago

The openstreetmap.org website is English only right?

No.

matthijsmelissen commented 7 years ago

It follows browser language? I don't see a way to switch.

HolgerJeromin commented 7 years ago

There is a switch in your account settings, but without a login the browser setting (not always the same as the gui) is used.

sommerluk commented 7 years ago

Even the categories in the Nominatim search results and and country names in Nominatim and GeoNames search results are localized.

kocio-pl commented 7 years ago

The problem is that website elements and name searches are dynamic, while default tile layer is static. Using our current toolset we can't make it dynamic from inside the style.

There is however the possibility to do it on the deployment level - there could be for example rendering made with "name" substituted with "name:xx" for each language/region, but that would be overkill for the servers, so it's just a fantasy. There could be however layers with names - they could be rendered as vector overlay probably, which also takes some resources, but doesn't mean making ~100 parallel renderings. But this is outside the scope of this repo.

That's why we're looking for a compromise, which is not perfect, but at least makes sense. For some objects the "name" is simply a collection of names - it's quite easy in Belgium and in case of a river on a border (Oder/Odra), but for big objects of international importance (like oceans and mountain ranges) it would be impractical to show every 150 names in one row.

There is also a possibility to go on with a vector fork of osm-carto, but it's also something related to deployment.

matthijsmelissen commented 7 years ago

@gravitystorm How does opencyclemap deal with international names? Is it 'name:en' for countries, 'name'-newline-'name:en' for cities and 'name' for anything else?

kocio-pl commented 7 years ago

Hm, I guess that for some big objects like the oceans we could follow UN rule and show int_name according to their official languages - for example:

المحيط الأطلسي / 大西洋 / Atlantic Ocean / Océan Atlantique / Атлантический океан / Océano Atlántico

It would mean that int_name tagging should be first defined on a wiki (currently just "User defined"), but it's doable at least.

matkoniecz commented 7 years ago

It would mean that int_name tagging should be first defined on a wiki

Why? Names in specific languages are already provided by name:lang tags, such label may be build from such tags.

pnorman commented 7 years ago

I prefer our policy of using name, the name of the feature in the local language.

sommerluk commented 7 years ago

I prefer our policy of using name, the name of the feature in the local language.

Me too.

matthijsmelissen commented 7 years ago

To be clear, the areas with which people have problems are areas like this:

screen shot 2017-09-20 at 10 28 00

Or this:

screen shot 2017-09-20 at 10 28 16

Like I said, for ideological reasons I'd also really want to keep local names, on the other hand it is not unreasonable to suspect that somebody out of the country is able to read the country's name.

matkoniecz commented 7 years ago

UN rule seems interesting, especially for labels like oceans where local language rule breaks down

dieterdreist commented 7 years ago

I think this map is interesting in the context: https://de.wikipedia.org/wiki/Datei:WritingSystemsOfTheWorld.svg

still keep in mind that looking only on the surface area doesn't account for the population. And the population are our potential users, not the actual ones.

principal scripts besides latin are arabic, chinese, cyrillic plus maybe "indian" variants

kocio-pl commented 7 years ago

Hindi has been proposed for some time:

https://en.wikipedia.org/wiki/Official_languages_of_the_United_Nations#New_proposed_languages

We could make our modification of "composite_int_name", for example:

This might make sense. For example latin geonames can look similar, so "Atlantic Ocean" might be enough for someone who speaks only Polish ("Ocean Atlantycki") or only German ("Atlantischer Ozean"), so we would cover even more users, especially because the map uses only written form (not spoken):

المحيط الأطلسي / Atlantic Ocean / अटलांटिक महासागर / Атлантический океан / 大西洋

The downside could be that UN rule is simple and ready, while reaching agreement for rules in OSM community (like tagging) tends to be very hard and time consuming.

gravitystorm commented 7 years ago

@gravitystorm How does opencyclemap deal with international names? Is it 'name:en' for countries, 'name'-newline-'name:en' for cities and 'name' for anything else?

Pretty much - currently the country names come from Natural Earth, and there's a little more logic around city names (to do with avoiding adding newlines if either name or name:en is blank, and checking if name and name:en are identical).

I have a the flexibility with my own styles to choose English as the fallback in "name (newline) name:en", because I speak English, and so hey it's my choice. :-) Whether that's appropriate or not for this layer is a decision that should be made by a wider variety of viewpoints.

Similar to @kocio-pl thoughts above, I choose English more for reasons of character recognisability (to other Latin-script-based first and/or second-language readers) rather than anything specific about the English language or where sometimes the English name is wildly different from other Latinised names. Potentially other choices, like German or Spanish, could fulfil similar Latin-based goals and still be widely understood.

pnorman commented 7 years ago

I have a the flexibility with my own styles to choose English as the fallback in "name (newline) name:en", because I speak English, and so hey it's my choice. :-)

With a traditional map style the defaults would be chosen based on the customers we are targeting. We don't have customers in the traditional sense.

If I were designing the style for myself, I'd go for English-like names also. English-like to allow for Québec instead of Quebec.

matthijsmelissen commented 6 years ago

I consulted the talk mailinglist: https://lists.openstreetmap.org/pipermail/talk/2017-September/078808.html

stephankn commented 6 years ago

The main site map (carto style) is (or at least was in the past) intended as a support tool for local mappers to also see their edits visualized.

Someone pointed to a map showing Thailand and claims people have problems with it. Let me assure you that local mappers have absolutely no problem with a map labeled in their language.

And others can use a bilingual rendering like http://thaimap.osm-tools.org/

By rendering bilingual you will notice that map-space is eaten up by additional label text which could otherwise show meaningful content to local mappers.

So leave the main map labeling as it is, supporting local communities. For "international" audience a dedicated rendering is easy to implement and can handle specific preferences with the fallback order as well.

pnorman commented 6 years ago

Coming back to this after the mailing list discussion

I don't consider anything other than rendering the local name (status quo), rendering the English name, or a combined local and English rendering a serious option. Of these, the first and last are probably the best options. They're what I'm focusing on for the rest of this message.

I've gone back and forth on my opinion multiple times while writing this reply.

Adding English to the labels would have both advantages and disadvantages, so I looked back over our goals. These are our goals and may not correspond to the goals of the osm.org frontpage, which is what people were more concerned with in the mailing list discussion.


We want people to be able to switch the style of names in their deployment easily. I think the best way to do this is wrap all names in a function call in the SQL. The function would have the signature of name(text, hstore) RETURNS text IMMUTABLE STRICT.

This also means that our choice of how to handle names doesn't have to be the same as the OSMF.

sommerluk commented 6 years ago

I am a little bit reluctant to give a special status to English only.

The main point about “English” seems to be more about “legibility”, and less about “language”. (If it would be about language, the first choice would be Chinese that has more speakers than English.) Legibility is about the writing system: I am German, so I can recognize the letters in Italian text, even though I do not speak Italian, because both use the Latin alphabet/writing system. If I see “北京市” in the map, I’m maybe not even available to type it on my keyboard to search for it. But for “Beijing” I can, even if I do not speak English very well. The languages with Latin writing system together have far more speakers than Chinese, so that would be a valid argument for Latin script instead of Han script.

Within the group of languages with Latin script, considering native and foreign speakers, English is the first one, followed by Spanish, Malay (but only partially with Latin script), Portuguese, French (and many more). It might be useful to consider these as fallback if English is not available?

Disclaimer: I still tend to render local names only.

dieterdreist commented 6 years ago

sent from a phone

On 12. Oct 2017, at 17:00, Lukas Sommer notifications@github.com wrote:

Disclaimer: I still tend to render local names only.

+1, it’s a strong statement and differentiates us from us-dominated commercial maps, although admittedly it reduces significantly the individual usefulness in areas where you can’t read the script

stephankn commented 6 years ago

@pnorman sounds like a good idea to enable the style to be easily localized. That way the rendering can be easily customized based on the map makers decisions.

Have you considered merging in the changes done by @giggls to enable easy localization? Is is based on functions in PostgreSQL as well: https://github.com/giggls/mapnik-german-l10n/tree/master/plpgsql

giggls commented 6 years ago

I also have a localized version of osm carto: https://github.com/giggls/openstreetmap-carto-de/tree/upstream+l10n

Slippymap (with english l10n) here: https://tile.iosb.fraunhofer.de//#map=5/30.1198/33.2703/3

matthijsmelissen commented 6 years ago

Bases on the responses here and on the mailing list, there seems to be no support for adding English names. I'm there going to close this issue. Thank you all for your contributions to the discussion!