[OSM-dev] Different styles for each country/region

Patrick Kilian osm at petschge.de
Fri Feb 11 17:09:46 GMT 2011


Hello,

> I asked this question several months before, but I did not really get
> an good answer (I think :D).
I'll try my hand this time.


> My problem is the following:
[snip nice explanation why localized rendering would be nice to have]

> Wouldn’t it be nice, if the OSM website detected the current’s person
> language (which it already does, because it displays the text on the
> left side in some other language), and display an appropriate map?
Sure that would be nice, but...

> Because the rendering team cannot be burdened to make every small 
> change, why not let the different teams of the countries let them do
> it?
You are right in your assumption that the rendering team is small and
does not have the manpower to tweak the stylesheet for every country.
However having more people only solves some of the problems, as I'll
discuss below.

Furthermore changing the map style is quite a bit harder then it looks.
You need to have medium to good skills with computer to be able to
understand the vast textfile desert of the stylesheets. You need to have
a talent for good screen design and preferably some training in that
direction. You should know a bit about cartography and the design
decision made in the exisiting stylesheets. And you need access to and
experience in handling a reasonably powerful computer to set up a
testbed. Not of these points is unreasonable or terribly hard, but
people how cover a the entire set of skills are rather rare in the
openstreetmap universe.

People desperately trying to change their countries look and feel to
what they are used to from the only road atlas they ever owned might be
tempted to "fix" the style without the necessary skills and might very
well create ugly styles ruining the nice user experience we have now.

Anyway. Even if we had five able stylesheet maintainers per country (and
note that this is already 1000 people!), it would not fix the underlying
 technical issues.


People have been experimenting with many different styles (basically one
per language), mostly on the wikimedia toolserver and found quite a few
problems. (Note that I was not one of the people who tried this but just
followed their progress with some interest.)

1.) 200 copies of the style with small tweaks to render the correct
language of the name tags and the correct highway colors eats more RAM
then any reasonable box has to spare on that (IIRC the amount is in the
two digit gigabyte range.)

2.) Rendering one baselayer without text and language specific overlays
help but this would not fix the highway colors. Plus this approach has a
lot of technical issues as well. E.g. consider the case where one of the
two separate rendering processes is slow or crashes. What do you do now?
Ship a tile with wrong language? Send an error tile? Send an old
basetyle with a new overlay creating a possibly inconsitent map?

3.) Some people (say Germans) will expect all of the world rendered in
the style they are used to (lets call it the german style), other
Germans would expect Germany in the german style and France in the
french rendering style. How do you resolve that? How do you deal with
the fact that some tiles are half french and half german?

4.) How do you allow people to select map style? On of the earliest
problems of the toolserver map display was that a dropdown list with 200
language layers in Openlayers is bulky at best and breaks old browsers
at worst.



So bottom line is: If you want this feature this year set up an own
rendering stack and render the map in the style you are used to. If you
feel like spending a lot of evenings and weekends, contact the people
who did the multilanguage maps on the wikimedia toolserver and start
hacking at the technical problems. Maintining the stylesheets is a
sizeable task but small and simple in comparison and discussions about
who edits which stylesheet are simple a year or two too early.



Patrick "Petschge" Kilian



More information about the dev mailing list