]> git.0d.be Git - hdm-toner-cartocss.git/blob - base.mss
style wetlands like grass
[hdm-toner-cartocss.git] / base.mss
1 /* BASE.MSS CONTENTS
2  * - Landuse & landcover
3  * - Buildings
4  * - Relief
5  * - Water areas
6  * - Water ways
7  * - Administrative boundaries
8  * - Barrier points
9  * - Barrier lines
10  */
11
12 /* ================================================================== */
13 /* LANDUSE & LANDCOVER
14 /* ================================================================== */
15
16 #land-low[zoom>=0][zoom<10],
17 #land-high[zoom>=10] {
18   polygon-fill: @land;
19   polygon-gamma: 0.75;
20 }
21
22 #landuse_gen0[zoom>3][zoom<=9],
23 #landuse_gen1[zoom>9][zoom<=12],
24 #landuse[zoom>12] {
25   [type='college']       { polygon-fill: @school; }
26   [type='commercial']    { polygon-fill: @industrial; }
27   [type='common']        { polygon-fill: @park; }
28   [type='golf_course']   { polygon-fill: @park; }
29   [type='hospital']      { polygon-fill: @hospital; }
30   [type='industrial']    { polygon-fill: @industrial; }
31   [type='landfill']      {
32     polygon-fill: darken(@industrial,10%);
33     [landfill_type="underwater"] { polygon-fill: darken(@water,1%);}
34   }
35   [type='quarry']        { polygon-fill: @industrial; }
36   [type='pedestrian']    { polygon-fill: @pedestrian_case; }
37   [type='residential']   { polygon-fill: @residential; }
38   [type='retail']        { polygon-fill: @residential; }
39
40   [type='school'],
41   [type='education'],
42   [type='sports_centre'],
43   [type='university'] {
44       line-color: lighten(@building_edge, 50%);
45       polygon-fill: @building;
46       [zoom>=16] {
47         line-color: @building_edge;
48         polygon-pattern-file: url(./patterns/stripe.png);
49         polygon-pattern-alignment: global;
50       }
51   }
52
53   [type='pitch'],
54   [type='stadium'],
55   [type='cemetery'],
56   [type='grave_yard'],
57   [type='grass'],
58   [type='grassland'],
59   [type='park'],
60   [type='garden'],
61   [type='village_green'],
62   [type='recreation_ground'],
63   [type='picnic_site'],
64   [type='camp_site'],
65   [type='forest'],
66   [type='wood'],
67   [type='farmland'],
68   [type='farm'],
69   [type='orchard'],
70   [type='allotments'],
71   [type='wetland'],
72   [type='playground']    {
73       polygon-fill: #FFFFFF;
74       polygon-pattern-file: url(./patterns/halftone2.png);
75       polygon-pattern-alignment: global;
76   }
77   [type='heath']         { polygon-fill: @heath; }
78   [type='meadow']        { polygon-fill: @heath; }
79   [type='scrub']         { polygon-fill: @heath; }
80   [type='beach']         { polygon-fill: @beach; }
81   [type='basin']         { polygon-fill: @water; }
82   [type='salt_pond']     {
83     polygon-fill: @salt;
84     [zoom>=16] { polygon-pattern-file: url('icons/pattern/salt-36.png'); }
85   }
86   [type='desert']        {
87     polygon-fill: @beach;
88     polygon-opacity: 0.3;
89     [zoom>=9] {
90       polygon-opacity: 0.5;
91     }
92     [zoom>=11] {
93       polygon-opacity: 0.5;
94     }
95     [zoom>=14] {
96       polygon-opacity: 0.7;
97     }
98     [zoom>=16] {
99       polygon-opacity: 0.8;
100     }
101   }
102   [type='military']      {
103     [zoom<=9] {
104       polygon-fill: @military;
105       polygon-opacity: 0.4;
106     }
107     [zoom>=10] {
108       polygon-pattern-file:url('icons/pattern/military-36.png');
109     }
110   }
111 }
112
113 #landuse_overlays[type='nature_reserve'][zoom>6] {
114   line-color: darken(@wooded, 5%);
115   line-opacity:  0.8;
116   polygon-fill: @wooded;
117   polygon-opacity: 0.4;
118   line-width: 0.5;
119   [zoom>=10] {
120     line-dasharray: 5,3;
121     line-width: 1;
122     polygon-opacity: 0.3;
123   }
124   [zoom>=12] {
125     line-width: 1.5;
126     line-dasharray: 10,5;
127     polygon-opacity: 0.2;
128   }
129   [zoom>=14] {
130     line-width: 2.0;
131   }
132 }
133
134 /* ================================================================== */
135 /* BUILDINGS
136 /* ================================================================== */
137
138 #buildings[zoom>=15] {
139   polygon-fill: @building;
140   line-color: @building_edge;
141   line-width: 0.2;
142   [poi='yes'] {
143     [zoom>=16] {
144       polygon-pattern-file: url(./patterns/stripe.png);
145     }
146   }
147
148   [zoom>=16] {
149     line-width: 0.4;
150   }
151
152   [zoom>=18] {
153   }
154
155   [type="collapsed"],
156   [type="damaged"] {
157     [zoom>=19] {
158       polygon-fill: lighten(@building, 3%);
159     }
160     line-width: 0.5;
161     line-color: @damaged;
162     [zoom=18] {
163       line-width: 0.6;
164     }
165     [zoom>=19] {
166       line-dasharray: 6,3;
167       line-width: 0.7;
168     }
169     [type="collapsed"] {
170       line-color: @collapsed;
171     }
172   }
173
174 }
175
176
177 /* ================================================================== */
178 /* RELIEF
179 /* ================================================================== */
180
181 #hillshade[zoom>=4]{
182     raster-scaling: bilinear;
183     raster-comp-op: multiply;
184     raster-opacity: 0.85;
185
186     [zoom>=5]  {raster-opacity: 0.65;}
187     [zoom>=7]  {raster-opacity: 0.55;}
188     [zoom>=9]  {raster-opacity: 0.45;}
189     [zoom>=10] {raster-opacity: 0.40;}
190     [zoom>=14] {raster-opacity: 0.30;}
191     [zoom>=16] {raster-opacity: 0.25;}
192 }
193
194 #contour_line[zoom>=12]{
195   line-width: 0.2;
196   line-color: @contour_line;
197   [zoom>=15] {
198     line-width: 0.5;
199   }
200   [height=~'^\d00$'] {
201     line-width: 0.5;
202     [zoom>=15] {
203       line-width: 1;
204       text-name: '[height]';
205       text-face-name: @regular;
206       text-placement: line;
207       text-fill: @contour_line;
208       text-halo-fill: @land;
209       text-halo-radius: 1;
210       text-spacing: 500;
211     }
212   }
213 }
214
215
216 /* ================================================================== */
217 /* WATER AREAS
218 /* ================================================================== */
219
220 Map {
221   background-color: #FFFFFF;
222   buffer-size: 256;
223 }
224
225 #water_gen0[zoom>3][zoom<=9],
226 #water_gen1[zoom>9][zoom<=12],
227 #water[zoom>12] {
228   polygon-fill: @water;
229 }
230
231 /* ================================================================== */
232 /* WATER WAYS
233 /* ================================================================== */
234
235 #waterway_low[zoom>=8][zoom<=12] {
236   line-color: @water;
237   line-cap: round;
238   line-join: round;
239   [type='river'],
240   [type='canal'] {
241     [seasonal='yes']{
242       line-cap: butt;
243       line-color: @water;
244       [zoom=10] {
245         line-width: 0.4;
246         line-dasharray: 6,3;
247       }
248       [zoom=11] {
249         line-width: 0.6;
250         line-dasharray: 8,4;
251       }
252       [zoom=12] {
253         line-width: 0.8;
254         line-dasharray: 12,6;
255       }
256     }
257
258   [zoom=8] { line-width: 0.1; }
259   [zoom=9] { line-width: 0.2; }
260   [zoom=10]{ line-width: 0.4; }
261   [zoom=11]{ line-width: 0.6; }
262   [zoom=12]{ line-width: 0.8; }
263   }
264 }
265
266 #waterway_med[zoom>=13][zoom<=14] {
267   line-color: @water;
268   [type='river'],
269   [type='canal'] {
270     line-cap: round;
271     line-join: round;
272     [seasonal='yes']{
273       line-cap: butt;
274       line-color: @water;
275       [zoom=13] {
276         line-width: 1;
277         line-dasharray: 8,4;
278       }
279       [zoom=14] {
280         line-width: 1.5;
281         line-dasharray: 16,6;
282       }
283     }
284     [zoom=13]{ line-width: 1; }
285     [zoom=14]{ line-width: 1.5; }
286   }
287   [type='stream'] {
288     [seasonal='yes'] {
289       line-cap: butt;
290       line-color: @water;
291       [zoom=14] {
292         line-width: 0.4;
293         line-dasharray: 8,4;
294       }
295     }
296     [zoom=13]{ line-width: 0.2; }
297     [zoom=14]{ line-width: 0.4; }
298   }
299 }
300
301 #waterway_high[zoom>=15] {
302   line-color: @water;
303   line-cap: round;
304   line-join: round;
305   [type='river'] {
306     [seasonal='yes']{
307     line-cap: butt;
308       line-color: @water;
309       [zoom=15] {
310         line-width: 6;
311         line-dasharray: 24,7;
312         }
313       [zoom=16] {
314         line-width: 7;
315         line-dasharray: 28,8;
316         }
317       [zoom=17] {
318         line-width: 8;
319         line-dasharray: 32,10;
320         }
321       [zoom>=18] {
322         line-width: 9;
323         line-dasharray: 56,15;
324         }
325       [zoom>=19] {
326         line-width: 12;
327         line-dasharray: 66,20;
328         }
329      }
330     [zoom=15]{ line-width: 6; }
331     [zoom=16]{ line-width: 7; }
332     [zoom=17]{ line-width: 8; }
333     [zoom=18]{ line-width: 9; }
334     [zoom>=19]{ line-width: 12; }
335   }
336     [type='stream'] {
337       [seasonal='yes']{
338         line-color: @water;
339         line-cap: butt;
340         [zoom=15] {
341           line-width: 0.6;
342           line-dasharray: 24,7;
343         }
344         [zoom=16] {
345           line-width: 0.8;
346           line-dasharray: 28,8;
347         }
348         [zoom=17] {
349           line-width: 1;
350           line-dasharray: 32,10;
351         }
352         [zoom=18] {
353           line-width: 1.5;
354           line-dasharray: 56,15;
355         }
356         [zoom>=19] {
357           line-width: 2;
358           line-dasharray: 66,20;
359         }
360       }
361       [zoom=15]{ line-width: 0.6; }
362       [zoom=16]{ line-width: 0.8; }
363       [zoom=17]{ line-width: 1; }
364       [zoom=18]{ line-width: 1.5; }
365       [zoom>=19]{ line-width: 2; }
366   }
367   [type='ditch'],
368   [type='drain'] {
369     [zoom=15]{ line-width: 0.1; }
370     [zoom=16]{ line-width: 0.3; }
371     [zoom=17]{ line-width: 0.5; }
372     [zoom=18]{ line-width: 0.7; }
373     [zoom=19]{ line-width: 1; }
374     [zoom>19]{ line-width: 1.5; }
375   }
376 }
377
378 /* ================================================================== */
379 /* ADMINISTRATIVE BOUNDARIES
380 /* ================================================================== */
381
382
383 #admin-low[maritime='no'][admin_level=2][zoom>=2][zoom<5],
384 #admin-low[maritime='no'][admin_level=3][zoom>=4][zoom<5],
385 #admin-low[maritime='no'][admin_level=4][zoom>=4][zoom<5],
386 #admin-low[zoom>=5][zoom<11],
387 #admin-med[zoom>=11][zoom<13],
388 #admin-high[zoom>=13] {
389   [admin_level=2] {
390     outline/line-color: lighten(@admin_2, 25%);
391     outline/line-width: 2;
392     [zoom>=8] {
393       outline/line-width: 3;
394     }
395   }
396   eraser/line-color: white;
397   eraser/line-width: 1;
398   eraser/comp-op: darken;
399   line-color: @admin_2;
400   line-width: 1;
401   [admin_level>2] {
402     line-dasharray: 10,5;
403     line-color: @admin_3;
404     [admin_level>=6] {
405       line-dasharray: 5,5;
406       line-width: 0.8;
407     }
408   }
409 }
410
411 /* ================================================================== */
412 /* BARRIER POINTS
413 /* ================================================================== */
414
415
416 .barriers[zoom>=17][barrier = 'divider'] {
417   marker-height: 2;
418   marker-fill: #c7c7c7;
419   marker-line-opacity:0;
420   marker-allow-overlap:true;
421 }
422
423 /* ================================================================== */
424 /* BARRIER LINES
425 /* ================================================================== */
426
427 .barriers[zoom>=17][barrier = 'gate'] {
428   line-width:2.5;
429   line-color:#aab;
430   line-dasharray:3,2;
431 }
432
433 .barriers[zoom>=17][barrier = 'fence'] {
434   line-width:1.75;
435   line-color:#aab;
436   line-dasharray:1,1;
437 }
438
439 .barriers[zoom>=16][barrier='hedge'] {
440   ::alternate {
441     line-color: @park;
442   }
443   line-width:2;
444   line-color:darken(@park,15%);
445   line-dasharray:2,4;
446   line-cap: round;
447   [zoom=16] {
448     line-width: 1;
449   }
450 }
451
452 .barriers[zoom>=16][barrier = 'wall'] {
453   line-width:1;
454   line-color: darken(@land,25%);
455 }