Hi all, I need generate tiles for my country(Armenia) and all names comes out in native Armenian language. Is there a way to translit it to English? I want to make offline map app for foreigners and thus need latin char names in map.... Can you hint how to setup the osm.xml or other config file to get all street names in english asked 16 Sep '11, 09:10 Gevork |
I am not familiar with the Armenian language and whether or not there is a potential automatic transliteration into English. If there is, then that transliteration could be implemented as a PostgreSQL stored procedure, and in the Mapnik style file you could then write
wherever it now says
If, on the other hand, you are not looking for an automatic transliteration but only want the English names displayed where they have been explicitly entered as
Of course if all you want is a one-off set of tiles then you can also leave the Mapnik style unchanged and run something like
on the tables generated by osm2pgsql. answered 16 Sep '11, 09:28 Frederik Ramm ♦ @Frederik Ramm you are my star :)))) Thanks a lot
(16 Sep '11, 10:06)
Gevork
Be carefull when transliterating (and translating words like "street"). You probably want to do a manual check of the result before contributing the "name:en" tag to the main OSM db. At least working inside postgres might be handyer than working via the api, depending on what you're used to. Once you have the tag in the db of course, just change the mapnik style and you're good to go.
(16 Sep '11, 10:54)
Vincent de P... ♦
@vincent de phily @Frederik Ramm I have managed to change default.style and now name:en is going to db. BUT! I couldn't find Mapnik style file and didn't fully understood how exactly change it... Could you help out???
(25 Sep '11, 17:26)
Gevork
@Frederik Ramm I was able to get English names to come up for high zoom level objects like roads and buildings using your steps above but it seems like city and country names are using their native alphabet still. Do you have any idea on what might be the issue? I am using Thailand as a test. I thought perhaps the country and city objects didn't have a "name:en" tag, however it seemed unlikely to me that streets in Bangkok, Thailand would have english names added, but the country and city itself would not. For updating the tables, I listed all tables in my postgis database and then ran your update command for all tables that matched the pattern planet_osm_xxx. Thanks in advance for any help.
(05 Oct '18, 20:22)
coderunner
Is it possible that you simply have the low-zoom tiles cached, so that you are still seeing tiles from before you made the style change? You could clear your cache with something like
(05 Oct '18, 20:34)
Frederik Ramm ♦
@Frederik Ramm Ah! Yes you are right. I am using a custom piece of software for rendering and forgot I am caching zoom 0 to 12 and not re-rendering them. That fixed it. Thanks for your help! Also, I noticed you also commented on my question here: https://help.openstreetmap.org/questions/66165/openstreetmap-carto-english-names mentioning that the German fork of osm-carto is the best solution. Are there any major shortcomings to doing it the way I have here versus using the fork?
(05 Oct '18, 23:19)
coderunner
showing 5 of 6
show 1 more comments
|
I have edited the default.style and have made following sql statements update planet_osm_line set name="name:en" where "name:en" is not null; update planet_osm_point set name="name:en" where "name:en" is not null; update planet_osm_polygon set name="name:en" where "name:en" is not null; update planet_osm_roads set name="name:en" where "name:en" is not null; thanks to @Fredrik Ramm answered 12 Apr '14, 16:28 Gevork |
https://help.openstreetmap.org/questions/66165/openstreetmap-carto-english-names is a similar question with more up-to-date answers. answered 05 Oct '18, 20:32 Frederik Ramm ♦ |