Page MenuHomePhabricator

Support local names in our PostGIS schema
Closed, ResolvedPublic

Description

Author: avarab

Description:
When we render maps with mapnik it's going to be neat to render them in the local language depending on what wiki we're on.

To do this we need to make the required changes at the PostGIS level (see URL).

By default the PostGIS schema only imports one tag as "name". This gives most priority to the name=* tag which will override any name tag that has an attached language code, e.g. name:de=* or name:is=*

So before we do a PostGIS import we need to edit the default.style file with the name tags we want to have added, and then create views for the planet for each language (see URL again).


Version: unspecified
Severity: enhancement
URL: http://wiki.openstreetmap.org/wiki/Regionalisedmap

Details

Reference
bz19668

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:40 PM
bzimport set Reference to bz19668.
bzimport added a subscriber: Unknown Object (MLST).

avarab wrote:

Presumably this is the sort of change we need to make to default.style, untested

Untested patch with the changes I *guess* are needed to default.style to make this happen.

Attached:

avarab wrote:

(In reply to comment #1)

Created an attachment (id=6324) [details]
Presumably this is the sort of change we need to make to default.style,
untested

Untested patch with the changes I *guess* are needed to default.style to make
this happen.

This works:

gis=> select name, "name:is", "name:de", "name:zh" from planet_osm_point where "name:de" != '' limit 1;

name  | name:is | name:de | name:zh

--------+---------+---------+---------
Ísland | Ísland | Island | 冰岛
(1 row)

avarab wrote:

This is now live and all the software to create the database views / mapnik stylesheets has been written, see the osm-tools directory:

http://svn.wikimedia.org/viewvc/mediawiki/trunk/tools/osm-tools/

And this blawg post:

http://www.openstreetmap.org/user/%C3%86var%20Arnfj%C3%B6r%C3%B0%20Bjarmason/diary/7180