-
Notifications
You must be signed in to change notification settings - Fork 819
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
Rendering tiles with English labels when they are available #3870
Comments
There is a separate project that allows showing different sets of languages (not only English and the name "German" is only because it is used by German fork of OSM Carto): |
Displaying text labels in the local language and script is intentional. Since this map style is intended to be used all around the world, it would not be appropriate to add a special English version of this file, unless we offered support for all common languages as well. Since it looks like your question has been answered at giggls/mapnik-german-l10n#18, where there is already a style designed to display latin script and English name lables, I hope this issue is resolved satisfactorily? |
Unfortunately, no. It is proving difficult, at best, to get mapnik-german-i10n up and running. While I do understand the decision to display text labels in the local language, I do think it would be worthwhile supporting displaying all labels in a single language...assuming the data for the language exists - and if it does not, perhaps keep things simple and default to local. The data is there or can be added. I do not see a reason to make it difficult to use. |
It should be easier to substitute labels in a language of choice than it currently is. I've been trying to think of ways to do so, but nothing good is coming to mind. |
Well, the general approach that giggls/mapnik-german-l10n#18 is taking seems to be a good start. If I understand what is going on there, essentially they are essentially layering over the postgres tables so the renderer continues to work as normal without any changes. This would essentially mean a few of extra steps to set the language of the tile server. Integrating that project with yours in a "nice" way may be the way to go and means less work for everyone. |
I've seen this request a lot over the years. Given that people treat openstreetmap-carto as a general-purpose map style that they can install on their own servers, not simply as a reference style for osm.org, it seems reasonable to enable them to display the labels in the language they (/their users) can understand. @pnorman: I initially thought that some sort of Makefile would be a good approach, but on reflection, I wonder if building it into
Disadvantages are that it requires changing carto (cf mapbox/carto#495), and that anyone already running osm-carto would need to update their carto install for it not to b0rk on the macro string. But it seems a clean way to do it and may have other uses. |
Alternative would be to use a Postgresql function. This can also be done using views. See for example: https://github.com/giggls/openstreetmap-carto-de/blob/master/views_osmde/view-line.sql cc @giggls |
@systemed Doing a somewhat propper localization is way more complicated than doing COALESCE. In fact COALESCE was the poor mans l10n system I have been using in German style many years ago. See the Videos of my talks about the system that I am currently using: I also maintain a simple fork of osm-carto using my l10n function at: |
@giggls Indeed, yes (as you know I do something reasonably similar, but transliterating in Lua rather than Postgres). |
I will probably need to point out why a fork of the style is still needed when using views. |
It doen't seem like there is a technically feasible solution that will work for rendering this style as well as allowing the choice of arbitrary language for name labels. Can we close this issue as not fixable without a separate fork of this repository? |
Well this is not quite true |
Yes. Any change to language requires a change to loading the data or the data SQL, and that change has to be per-language. I'd like it to be easier, but within the current constraints of Mapnik PostGIS datasource queries I don't see a good way to do this. |
I have a reddit thread related to this issue at https://www.reddit.com/r/openstreetmap/comments/cytbgh/rendering_tiles_with_english_labels_when_they_are/
I setup my own mapping tile server according to the instructions found at https://switch2osm.org/manually-buildin … 18-04-lts/ (amazing job for whoever wrote them) and am using the planet data (https://planet.openstreetmap.org). However, when I render a tile in, for example, China (http://localhost/hot/7/106/53.png / https://a.tile.openstreetmap.org/7/106/53.png)), the labels are in Chinese characters.
As I understand it, the project.mml file is what controls the the labels. According to the reddit thread, it should be possible to make some modifications to the .mml so it will always output the english labels.
It would be nice if this alternative might be made available...perhaps calling the file project_en.mml.
Since it does seem fairly straightforward (if one knows what they are doing...which I do not in this case), a folder filled with .mml variants for various languages would be nice or some kind of makefile which would generate a .mml for a specific language.
I might assume that someone has already created the english language only version of project.mml...if so, it would be nice if that was made available.
The text was updated successfully, but these errors were encountered: