[Tilesathome] Osmarender colours and stylesheets
Philip Shipley
phil at barby.net
Wed Jul 30 12:42:01 BST 2008
Hi,
I kind of volunteered to take a look at the colours used by osmarender
to see if they could be rationalised to hopefully reduce the size of
the tiles.
So far I have looked at the /rules/standard.xml, all of the
caption-xxx and osm-map-features-z17.xml. My findings, so far, can be
located here: http://spreadsheets.google.com/pub?key=pwwKHNkeA7U5MMfhR4qNJcg
However I have come to the conclusion that, as a first step, the xml
files should be tidied up a little first. As far as I can make out
'standard.xml' is the default and is used unless superceeded by the
appropriate 'osm-map-features-zx' file for the level being processed.
If this assumption is not correct then stop reading and explain how it
does work (documentation is a bit light!!)
Ok, you got this far so I must be on the right track.
I noticed that multiple definitions of rules and elements were
occuring multiple times, both in the same file and across multiple
files. This means it must be difficult for whoever has been
maintaining thus far, and anyone who wants to run their own maps, to
make modifications.
It would seem logical to me that the job of standard.xml is to define
the rules that apply to all zoom levels - I am thinking that it should
also contain the common definitions of all elements.
It is then the job of the osm-map-feature file to turn on the various
elements and make any definition deviations to the standard, such as
for different sizes of lines and text.
Today this is not the case. Examples:
1. the rule to turn on natural-coastline appears to be in every file,
surely it only needs to be in standard.xml
2. The definition of .highway-motorway-core
standard.xml
osm-map-features-z11.xml
stroke-width: 2px;
stroke-width: 20px;
stroke-linejoin: round;
stroke: #809BC0;}
stroke: #809BC0;
fill: none;}
In this case stroke is redundant in osf-z17 and should be eliminated.
3. .highway-footway-casing is defined as colour #22222 in zoomlevel 12
but #777777 in zoom 17 - I'm not sure it was intended to have
different colours at diferent zooms.
These are just 3 randomly chosen points - there are many, many more.
If this clean-up exercise was carried out first I think you would find
it a lot easier and quicker to try different colour schemes to reduce
the file sizes, and in addition those who want to run their own
servers and create local schemes would be eternally grateful.
Thoughts?
--
Regards
Phil
More information about the Tilesathome
mailing list