[OSM-dev] [OSM-talk] Bilingual rendering for Greece

Peter Körner osm-lists at mazdermind.de
Wed Aug 18 14:03:21 BST 2010

Am 18.08.2010 10:31, schrieb Stephan Knauss:
> It's complicated because different languages take up different space on
> the map. So the placement of icons is not trivial.

I did the multilingual overlays on the Toolserver.

My first approach was to kick out all Symbolizers from the OSM Style 
that were no TextSymbolizers. This resulted in Text on the overlays 
overlapping POI-Icons.

The second approach, that's the one that is currently online, renders 
all TextSymbolizer and all PointSymbolizer but with the PointSymbolizer 
set to opacity=0.

Ævar had a great Idea for a third approach:
Only objects that actually have a translation need to be in the language 
overlay -- all other objects like most streets can go into the base 
layer. That way the language overlay would become nearly empty on higher 
zoom levels.

To do this, you need a fast way to find objects with translations. To be 
able to do this I comitted a patch to osm2pgsql that allows you to 
create hstore-columns for subtags, eg. a column "name:" that is null if 
no "name:xx"-tag is available and that contains a hstore with the 
translations otherwise.

You can then create a conditional index like
CREATE INDEX bla ON points (osm_id) WHERE NOT "name:" IS NULL;

to have a fast lookup for translated items.

I did a planet import with this column on the Toolserver and developed a 
style for it but never got around to complete this work.

If you or some other wants to talk about this technical point, please 
come over to osm-dev.


More information about the dev mailing list