Hello everyone. I have installed my own osm tile server. I osmcarto style and mapnik for rendering tiles. Now I want to add English names to the city, that are not in English. For example: from Chineese to English and Chineese. I know, that I need to create 'name:en' column to take english names from there. For import I use osm2psql tool and there command is:
After import I have ""=>"Saint Petersburg" in 'name:en' column instead of Saint Petersburg. If I use '-k' key while importing, I will get tags column with the following content: "ref:en"=>"SPE", "ref:ru"=>"СПБ", "name:ab"=>"Санқт-Петербург", "name:de"=>"Sankt Petersburg", "name:en"=>"Saint Petersburg", "name:os"=>"Бетъырбух", "name:ru"=>"Санкт-Петербург", "wikipedia"=>"ru:Санкт-Петербург", "okato:user"=>"40000000000", "official_status"=>"ru:город федерального значения" So, why in name:en column I've got some extra symbols? And where I should make changes to see the both city names? Thanks for help! asked 25 Feb '16, 10:40 Bobinho |
You appear to have misunderstood the -z flag. This merely allows one to rename the (or create an additional) hstore column. It does not add the requested tag. So what you are seeing is the raw hstore data (all tags as key=>value pairs). To achieve what you want it is necessary to edit the style files used by osm2pgsql. Normally you will use default.style (see here https://github.com/openstreetmap/osm2pgsql/blob/master/default.style), and modify this to add an extra line similar to the one for "name" replacing "name" with "name:en". It is probably best to create this as a distinct style and apply it using the -S flag when you execute osm2pgsql. answered 25 Feb '16, 11:12 SK53 ♦ 1
Thank you! After using -S flag "name:en" column is correct. Where else I should make changes to display both city names like: Zürich (Zurich)?
(25 Feb '16, 11:44)
Bobinho
|