[Tagging] Country names

Peter Körner osm-lists at mazdermind.de
Thu Oct 14 08:59:32 BST 2010


Am 14.10.2010 08:39, schrieb Jochen Topf:
> And one problem they have is that maps are hard to use if you
> can't read half the country names.

> This is one of those problems that will not be solved until the renderers
> get more clever and, for instance, take the "name" tag and the "name:en" tag
> and put them together in the "local name (english name)" form. Only then can
> we tag this consistently. (Feel free to work on that problem :-)
This sounds doable in the Style's SQL Statements. Currently we use

SELECT name AS local_name,
        COALESCE(tags->'name:en', name) AS display_name
   FROM planet_point
  WHERE tags @> '"place"=>"country"'
    AND NOT name IS NULL;

but we may also use
SELECT name AS local_name,
        CASE WHEN name != (tags->'name:en')
             THEN name || ' (' || (tags->'name:en') ||')'
             ELSE name
         END AS display_name
   FROM planet_point
  WHERE tags @> '"place"=>"country"'
    AND NOT name IS NULL
  LIMIT 10;

I could set up such a style on the toolserver if it would be helpful, 
but I'd like to point to the localized maps we currently have in >30 
languages: http://toolserver.org/~osm/locale/ (use the layer switcher).

Peter




More information about the Tagging mailing list