< Tiles@home

Tiles@home/ColorPallete

Currently using 24bit

At the moment, the tiles rendered by the t@h clients create 24bit color PNGs. This can result in quite large tiles of up to about 100kb per 256x256 pixel tile. In comparison Mapnik tiles, that use 8 bit colour pallet can be up to 3 - 4 times smaller (of cause this is not the only difference that effects size).

Proposal to move over to 8 bit palleted tiles

My moving over to 8 bit palleted pngs, hopefully the tiles we get on average will be about half the size of the current tiles. This should help save Disk storage on the server, bandwidth used by the server as well as the time it takes for clients to download the tiles which should give a better browsing experience.

Example tiles converted to 8bit

Original 24 bit from the server256 colors with pngnq -s164 colors with pngnq -s1 -n64256 colors with convert -depth 8 -colors 256 -quality 100
92751 bytes 46684 bytes 79%correct 0.68meanerr 35883 bytes 80%correct 1.49meanerr 43218 bytes 1.09meanerr
100806 bytes (z12/2143/1406) 46543 bytes 79%correct 0.71meanerr 34686 bytes 77%correct 1.35meanerr 46893 bytes 1.21meanerr
43342 bytes (z16/34298/22503) 19778 bytes 92%correct 0.3meanerr 14897 bytes 86%correct 0.7meanerr 23976 bytes 1.09meanerr
8844 bytes (z17/68608/45029) 5134 bytes 99.7%correct 0.004meanerr 3539 bytes 99.5%correct 0.027meanerr 10992 bytes 0.15meanerr
22905 bytes (z17/68865/44464) 11031 bytes 95.6%correct 0.3meanerr 8305 bytes 87.4%correct 0.89meanerr 11469 bytes 0.39meanerr

Issues

People have raised the concern that using palleted data can lead to inconsistent color perception across tile boundaries, as different tiles use different pallets. If you could come up with examples showing this problem, please post these here, so that one can judge if they are significant enough to use up twice as much bandwidth and disk space, compared to the 8 bit pallet

Colors used in osm-map-features

A small perl script in the client's tools directory tries to find all colors in the osmarender rules osm-map-features-z12 to osm-map-features-z17 as well as captionless-z12 and all symbols.

tools/colormap/colormap.pl -w tile captionless

That gives the following number of occurences for the color codes (as of 2008-10-04):

#ColorCodeUsage
1#000000#000000 (black)124
2#101010#10101019
3#202020#20202059
4#303030#3030304
5#404040#4040408
6#505050#50505019
7#606060#60606082
8#707070#707070104
9#777777#7777774
10#808080#808080 (grey)50
11#b0b0b0#b0b0b074
12#c0c0c0#c0c0c0 (silver)5
13#d0d0d0#d0d0d034
14#d3d3d3#d3d3d3 (lightgrey)2
15#e0e0e0#e0e0e021
16#f0f0f0#f0f0f0109
17#f8f8f8#f8f8f814
18#ffffff#ffffff (white)249
19#000080#000080 (navy)1
20#0000ff#0000ff (blue)14
21#007fff#007fff8
22#008000#008000 (green)5
23#008080#008080 (teal)1
24#00bcdf#00bcdf4
25#00ff00#00ff00 (lime)1
26#00ffff#00ffff (cyan)1
27#2b743f#2b743f32
28#32cd32#32cd32 (limegreen)2
29#4040ff#4040ff21
30#40ff40#40ff408
31#4d5d73#4d5d737
32#556b2f#556b2f (darkolivegreen)45
33#6060ff#6060ff10
34#6a5a8e#6a5a8e7
35#6fc13d#6fc13d7
36#6fc18e#6fc18e72
37#7fc97f#7fc97f25
38#800000#800000 (maroon)8
39#800080#800080 (purple)1
40#808000#808000 (olive)7
41#8080ff#8080ff35
42#809bc0#809bc026
43#a0f0ff#a0f0ff4
44#a47c41#a47c413
45#a52a2a#a52a2a (brown)3
46#b36c4c#b36c4c5
47#b5d6f1#b5d6f168
48#bde3cb#bde3cb51
49#bf5bc3#bf5bc37
50#c00000#c000005
51#c7f1a3#c7f1a313
52#c95e2a#c95e2a7
53#cdabde#cdabde11
54#d18a6a#d18a6a5
55#d1ead1#d1ead118
56#d4dcbd#d4dcbd28
57#d79331#d793317
58#e3e9f1#e3e9f113
59#e46d71#e46d7125
60#e5e0c2#e5e0c221
61#e9dd72#e9dd7217
62#ec2d2d#ec2d2d21
63#ecd8ff#ecd8ff7
64#eecc55#eecc554
65#efadaa#efadaa20
66#f2caea#f2caea7
67#f3d6b6#f3d6b67
68#f6800a#f6800a5
69#f6dd0a#f6dd0a5
70#f9574b#f9574b19
71#fcffef#fcffef7
72#fdbf6f#fdbf6f13
73#ff0000#ff0000 (red)26
74#ff00ff#ff00ff (magenta)15
75#ff4040#ff404011
76#ffebeb#ffebeb20
77#ffff00#ffff00 (yellow)16
78#ffff90#ffff9019
79#ffffc0#ffffc020
This article is issued from Openstreetmap. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.