[OSM-dev] Force rendering of names/places to English only

Peter Körner osm-lists at mazdermind.de
Wed Jun 22 09:30:56 BST 2011


Am 22.06.2011 08:30, schrieb John Smith:
> On 22 June 2011 16:26, Haseeb Anwar Ul Haq<fastisb at gmail.com>  wrote:
>> Hi,
>>       I have built my own openstreetmap server (Ubuntu 10.04)  and rendering
>> tiles using mapnik and mod_tile.It works perfectly.Now I want to force
>> rendering of all names (roads,places etc) to english language only (not in
>> the native languages of the respective places) .
>> Can anyone please help me out.Thank you so much and waiting for a response.
>
> You need to add name:en to the style file and then you need to replace
> "name" in sql queries with this:
>
> (CASE WHEN "name:en" IS NOT NULL THEN "name:en" ELSE name END) AS name

Simpler:

COALESCE("name:en", "name")


COALESCE selects the first none-null value from a chain.

Peter



More information about the dev mailing list