source: subversion/applications/rendering/mapnik/inc/layer-water.xml.inc @ 23361

Last change on this file since 23361 was 23296, checked in by ldp, 9 years ago

Use gamma to hide hairlines where water meets water

File size: 18.7 KB
Line 
1<Style name="water_areas">
2    <Rule>
3      <Filter>[natural] = 'glacier'</Filter>
4      &maxscale_zoom6;
5      &minscale_zoom7;
6      <LineSymbolizer>
7        <CssParameter name="stroke">#9cf</CssParameter>
8        <CssParameter name="stroke-width">1.5</CssParameter>
9        <CssParameter name="stroke-dasharray">4,2</CssParameter>
10      </LineSymbolizer>
11      <PolygonPatternSymbolizer file="&symbols;/glacier.png" />
12    </Rule>
13    <Rule>
14      <Filter>[natural] = 'glacier'</Filter>
15      &maxscale_zoom8;
16      <LineSymbolizer>
17        <CssParameter name="stroke">#9cf</CssParameter>
18        <CssParameter name="stroke-width">1.5</CssParameter>
19        <CssParameter name="stroke-dasharray">4,2</CssParameter>
20      </LineSymbolizer>
21      <PolygonPatternSymbolizer file="&symbols;/glacier2.png" />
22    </Rule>
23    <Rule>
24      <Filter>[waterway] = 'dock' or [waterway] = 'mill_pond' or [waterway]='canal'</Filter>
25      &maxscale_zoom9;
26      <PolygonSymbolizer>
27        <CssParameter name="fill">#b5d0d0</CssParameter>
28        <CssParameter name="gamma">.75</CssParameter>
29     </PolygonSymbolizer>
30    </Rule>
31    <Rule>
32      <Filter>[landuse] = 'basin'</Filter>
33      &maxscale_zoom7;
34      <PolygonSymbolizer>
35        <CssParameter name="fill">#b5d0d0</CssParameter>
36        <CssParameter name="gamma">.75</CssParameter>
37     </PolygonSymbolizer>
38    </Rule>
39    <Rule>
40      <Filter>[natural] = 'lake' or [natural] = 'water' or [landuse] = 'reservoir' or [waterway] = 'riverbank' or [landuse] = 'water'</Filter>
41      &maxscale_zoom6;
42      <PolygonSymbolizer>
43        <CssParameter name="fill">#b5d0d0</CssParameter>
44        <CssParameter name="gamma">.75</CssParameter>
45     </PolygonSymbolizer>
46    </Rule>
47    <Rule>
48      &maxscale_zoom13;
49      <Filter>[natural] = 'marsh' or [natural] = 'wetland'</Filter>
50      <PolygonPatternSymbolizer file="&symbols;/marsh.png" />
51    </Rule>
52    <Rule>
53      &maxscale_zoom13;
54      <Filter>[natural] = 'scrub'</Filter>
55      <PolygonPatternSymbolizer file="&symbols;/scrub.png" />
56    </Rule>
57    <Rule>
58      <Filter>[natural] = 'land'</Filter>
59      &maxscale_zoom10;
60      <PolygonSymbolizer>
61        <CssParameter name="fill">#f2efe9</CssParameter>
62     </PolygonSymbolizer>
63    </Rule>
64</Style>
65<Style name="glaciers-text">
66    <Rule>
67      <Filter>[way_area] &gt;= 10000000</Filter>
68      &maxscale_zoom10;
69      <TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="#99f" halo_radius="1" wrap_width="20"/>
70    </Rule>
71    <Rule>
72      <Filter>[way_area] &gt;= 5000000 and [way_area] &lt; 10000000</Filter>
73      &maxscale_zoom11;
74      <TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="#99f" halo_radius="1" wrap_width="20"/>
75    </Rule>
76    <Rule>
77      <Filter>[way_area] &lt; 5000000</Filter>
78      &maxscale_zoom12;
79      <TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="#99f" halo_radius="1" wrap_width="20"/>
80    </Rule>
81</Style>
82<Style name="water_lines">
83    <Rule>
84      <Filter>[waterway]='weir'</Filter>
85      &maxscale_zoom15;
86      &minscale_zoom18;
87      <LineSymbolizer>
88        <CssParameter name="stroke">#aaa</CssParameter>
89        <CssParameter name="stroke-width">2</CssParameter>
90        <CssParameter name="stroke-linejoin">round</CssParameter>
91        <CssParameter name="stroke-linecap">round</CssParameter>
92      </LineSymbolizer>
93    </Rule>
94    <Rule>
95      <Filter>[waterway]='river'</Filter>
96      &maxscale_zoom12;
97      &minscale_zoom12;
98      <LineSymbolizer>
99        <CssParameter name="stroke">#b5d0d0</CssParameter>
100        <CssParameter name="stroke-width">2</CssParameter>
101        <CssParameter name="stroke-linejoin">round</CssParameter>
102        <CssParameter name="stroke-linecap">round</CssParameter>
103      </LineSymbolizer>
104    </Rule>
105    <Rule>
106      <Filter>[waterway]='river'</Filter>
107      &maxscale_zoom13;
108      &minscale_zoom13;
109      <LineSymbolizer>
110        <CssParameter name="stroke">#b5d0d0</CssParameter>
111        <CssParameter name="stroke-width">3</CssParameter>
112        <CssParameter name="stroke-linejoin">round</CssParameter>
113        <CssParameter name="stroke-linecap">round</CssParameter>
114      </LineSymbolizer>
115    </Rule>
116    <Rule>
117      <Filter>[waterway]='river'</Filter>
118      &maxscale_zoom14;
119      &minscale_zoom14;
120      <LineSymbolizer>
121        <CssParameter name="stroke">#b5d0d0</CssParameter>
122        <CssParameter name="stroke-width">5</CssParameter>
123        <CssParameter name="stroke-linejoin">round</CssParameter>
124        <CssParameter name="stroke-linecap">round</CssParameter>
125      </LineSymbolizer>
126    </Rule><Rule>
127      <Filter>[waterway]='river'</Filter>
128      &maxscale_zoom15;
129      &minscale_zoom16;
130      <LineSymbolizer>
131        <CssParameter name="stroke">#b5d0d0</CssParameter>
132        <CssParameter name="stroke-width">6</CssParameter>
133        <CssParameter name="stroke-linejoin">round</CssParameter>
134        <CssParameter name="stroke-linecap">round</CssParameter>
135      </LineSymbolizer>
136    </Rule>
137    <Rule>
138      <Filter>[waterway]='river'</Filter>
139      &maxscale_zoom17;
140      &minscale_zoom17;
141      <LineSymbolizer>
142        <CssParameter name="stroke">#b5d0d0</CssParameter>
143        <CssParameter name="stroke-width">10</CssParameter>
144        <CssParameter name="stroke-linejoin">round</CssParameter>
145        <CssParameter name="stroke-linecap">round</CssParameter>
146      </LineSymbolizer>
147    </Rule>
148    <Rule>
149      <Filter>[waterway]='river'</Filter>
150      &maxscale_zoom18;
151      &minscale_zoom18;
152      <LineSymbolizer>
153        <CssParameter name="stroke">#b5d0d0</CssParameter>
154        <CssParameter name="stroke-width">12</CssParameter>
155        <CssParameter name="stroke-linejoin">round</CssParameter>
156        <CssParameter name="stroke-linecap">round</CssParameter>
157      </LineSymbolizer>
158    </Rule>
159    <Rule>
160      <Filter>[waterway]='canal' and not [disused]='yes'</Filter>
161      &maxscale_zoom12;
162      &minscale_zoom12;
163      <LineSymbolizer>
164        <CssParameter name="stroke">#b5d0d0</CssParameter>
165        <CssParameter name="stroke-width">3</CssParameter>
166        <CssParameter name="stroke-linejoin">round</CssParameter>
167        <CssParameter name="stroke-linecap">round</CssParameter>
168      </LineSymbolizer>
169    </Rule>
170    <Rule>
171      <Filter>[waterway]='canal' and not [disused]='yes'</Filter>
172      &maxscale_zoom13;
173      &minscale_zoom13;
174      <LineSymbolizer>
175        <CssParameter name="stroke">#b5d0d0</CssParameter>
176        <CssParameter name="stroke-width">4</CssParameter>
177        <CssParameter name="stroke-linejoin">round</CssParameter>
178        <CssParameter name="stroke-linecap">round</CssParameter>
179      </LineSymbolizer>
180      <TextSymbolizer name="name" fontset_name="book-fonts" size="8" fill="#6699cc" halo_radius="1" placement="line"/>
181    </Rule>
182    <Rule>
183      <ElseFilter/> <!--[waterway]='stream'</Filter>-->
184      &maxscale_zoom13;
185      &minscale_zoom14;
186      <LineSymbolizer>
187        <CssParameter name="stroke">#b5d0d0</CssParameter>
188        <CssParameter name="stroke-width">1</CssParameter>
189      </LineSymbolizer>
190    </Rule>
191    <Rule>
192      <Filter>[waterway]='river' and [tunnel] = 'yes'</Filter>
193      &maxscale_zoom14;
194      &minscale_zoom14;
195      <LineSymbolizer>
196        <CssParameter name="stroke">#b5d0d0</CssParameter>
197        <CssParameter name="stroke-width">6</CssParameter>
198        <CssParameter name="stroke-dasharray">4,2</CssParameter>
199      </LineSymbolizer>
200      <LineSymbolizer>
201        <CssParameter name="stroke">white</CssParameter>
202        <CssParameter name="stroke-width">4</CssParameter>
203      </LineSymbolizer>
204      <TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="#6699cc" halo_radius="1" placement="line" min_distance="200"/>
205    </Rule><Rule>
206      <Filter>[waterway]='river' and [tunnel] = 'yes'</Filter>
207      &maxscale_zoom15;
208      &minscale_zoom16;
209      <LineSymbolizer>
210        <CssParameter name="stroke">#b5d0d0</CssParameter>
211        <CssParameter name="stroke-width">7</CssParameter>
212        <CssParameter name="stroke-dasharray">4,2</CssParameter>
213      </LineSymbolizer>
214      <LineSymbolizer>
215        <CssParameter name="stroke">white</CssParameter>
216        <CssParameter name="stroke-width">4</CssParameter>
217      </LineSymbolizer>
218      <TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="#6699cc" halo_radius="1" placement="line" min_distance="200"/>
219    </Rule>
220    <Rule>
221      <Filter>[waterway]='river' and [tunnel] = 'yes'</Filter>
222      &maxscale_zoom17;
223      &minscale_zoom17;
224      <LineSymbolizer>
225        <CssParameter name="stroke">#b5d0d0</CssParameter>
226        <CssParameter name="stroke-width">11</CssParameter>
227        <CssParameter name="stroke-dasharray">4,2</CssParameter>
228      </LineSymbolizer>
229      <LineSymbolizer>
230        <CssParameter name="stroke">white</CssParameter>
231        <CssParameter name="stroke-width">7</CssParameter>
232      </LineSymbolizer>
233      <TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="#6699cc" halo_radius="1" placement="line" min_distance="200"/>
234    </Rule>
235    <Rule>
236      <Filter>[waterway]='river' and [tunnel] = 'yes'</Filter>
237      &maxscale_zoom18;
238      <LineSymbolizer>
239        <CssParameter name="stroke">#b5d0d0</CssParameter>
240        <CssParameter name="stroke-width">13</CssParameter>
241        <CssParameter name="stroke-dasharray">4,2</CssParameter>
242      </LineSymbolizer>
243      <LineSymbolizer>
244        <CssParameter name="stroke">white</CssParameter>
245        <CssParameter name="stroke-width">9</CssParameter>
246      </LineSymbolizer>
247      <TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="#6699cc" halo_radius="1" placement="line" min_distance="200"/>
248    </Rule>
249    <Rule>
250      <Filter>[waterway]='canal' and [tunnel] = 'yes'</Filter>
251      &maxscale_zoom14;
252      &minscale_zoom16;
253       <LineSymbolizer>
254        <CssParameter name="stroke">#b5d0d0</CssParameter>
255        <CssParameter name="stroke-width">7</CssParameter>
256        <CssParameter name="stroke-dasharray">4,2</CssParameter>
257      </LineSymbolizer>
258      <LineSymbolizer>
259        <CssParameter name="stroke">white</CssParameter>
260        <CssParameter name="stroke-width">3</CssParameter>
261      </LineSymbolizer>
262      <TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="#6699cc" halo_radius="1" placement="line"/>
263    </Rule>
264    <Rule>
265      <Filter>[waterway]='canal' and not ([tunnel] = 'yes' or [disused]='yes')</Filter>
266      &maxscale_zoom14;
267      &minscale_zoom16;
268      <LineSymbolizer>
269        <CssParameter name="stroke">#b5d0d0</CssParameter>
270        <CssParameter name="stroke-width">7</CssParameter>
271        <CssParameter name="stroke-linejoin">round</CssParameter>
272        <CssParameter name="stroke-linecap">round</CssParameter>
273      </LineSymbolizer>
274      <TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="#6699cc" halo_radius="1" placement="line"/>
275    </Rule>
276    <Rule>
277      <Filter>[waterway]='canal' and [tunnel] = 'yes'</Filter>
278      &maxscale_zoom17;
279      &minscale_zoom18;
280       <LineSymbolizer>
281        <CssParameter name="stroke">#b5d0d0</CssParameter>
282        <CssParameter name="stroke-width">11</CssParameter>
283        <CssParameter name="stroke-dasharray">4,2</CssParameter>
284      </LineSymbolizer>
285      <LineSymbolizer>
286        <CssParameter name="stroke">white</CssParameter>
287        <CssParameter name="stroke-width">7</CssParameter>
288      </LineSymbolizer>
289      <TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="#6699cc" halo_radius="1" placement="line"/>
290    </Rule>
291    <Rule>
292      <Filter>[waterway]='canal' and not ([tunnel] = 'yes' or [disused]='yes' or [lock]='yes')</Filter>
293      &maxscale_zoom17;
294      &minscale_zoom18;
295      <LineSymbolizer>
296        <CssParameter name="stroke">#b5d0d0</CssParameter>
297        <CssParameter name="stroke-width">11</CssParameter>
298        <CssParameter name="stroke-linejoin">round</CssParameter>
299        <CssParameter name="stroke-linecap">round</CssParameter>
300      </LineSymbolizer>
301      <TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="#6699cc" halo_radius="1" placement="line"/>
302    </Rule>
303    <Rule>
304      <Filter>[waterway]='canal' and not ([tunnel] = 'yes' or [disused]='yes') and [lock]='yes'</Filter>
305      &maxscale_zoom17;
306      &minscale_zoom18;
307      <LineSymbolizer>
308        <CssParameter name="stroke">#b5d0d0</CssParameter>
309        <CssParameter name="stroke-width">7</CssParameter>
310        <CssParameter name="stroke-linejoin">round</CssParameter>
311        <CssParameter name="stroke-linecap">round</CssParameter>
312      </LineSymbolizer>
313      <TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="#6699cc" halo_radius="1" wrap_width="20"/>
314    </Rule>
315    <Rule>
316      <Filter>[waterway]='derelict_canal' or ([waterway]='canal' and [disused]='yes')</Filter>
317      &maxscale_zoom12;
318      &minscale_zoom12;
319      <LineSymbolizer>
320        <CssParameter name="stroke">#b5e4d0</CssParameter>
321        <CssParameter name="stroke-width">1.5</CssParameter>
322        <CssParameter name="stroke-dasharray">4,4</CssParameter>
323        <CssParameter name="stroke-opacity">0.5</CssParameter>
324        <CssParameter name="stroke-linejoin">round</CssParameter>
325        <CssParameter name="stroke-linecap">round</CssParameter>
326      </LineSymbolizer>
327    </Rule>
328    <Rule>
329      <Filter>[waterway]='derelict_canal' or ([waterway]='canal' and [disused]='yes')</Filter>
330      &maxscale_zoom13;
331      &minscale_zoom13;
332      <LineSymbolizer>
333        <CssParameter name="stroke">#b5e4d0</CssParameter>
334        <CssParameter name="stroke-width">2.5</CssParameter>
335        <CssParameter name="stroke-dasharray">4,6</CssParameter>
336        <CssParameter name="stroke-opacity">0.5</CssParameter>
337        <CssParameter name="stroke-linejoin">round</CssParameter>
338        <CssParameter name="stroke-linecap">round</CssParameter>
339      </LineSymbolizer>
340      <TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="#80d1ae" halo_radius="1" spacing="600" placement="line"/>
341    </Rule>
342    <Rule>
343      <Filter>[waterway]='derelict_canal' or ([waterway]='canal' and [disused]='yes')</Filter>
344      &maxscale_zoom14;
345      &minscale_zoom18;
346      <LineSymbolizer>
347        <CssParameter name="stroke">#b5e4d0</CssParameter>
348        <CssParameter name="stroke-width">4.5</CssParameter>
349        <CssParameter name="stroke-dasharray">4,8</CssParameter>
350        <CssParameter name="stroke-opacity">0.5</CssParameter>
351        <CssParameter name="stroke-linejoin">round</CssParameter>
352        <CssParameter name="stroke-linecap">round</CssParameter>
353      </LineSymbolizer>
354      <TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="#80d1ae" halo_radius="1" spacing="600" placement="line"/>
355    </Rule>
356    <Rule>
357      <Filter>[waterway]='stream' and [tunnel]='yes'</Filter>
358      &maxscale_zoom15;
359      &minscale_zoom18;
360      <LineSymbolizer>
361        <CssParameter name="stroke">#b5d0d0</CssParameter>
362        <CssParameter name="stroke-width">2.4</CssParameter>
363        <CssParameter name="stroke-dasharray">4,2</CssParameter>
364      </LineSymbolizer>
365      <LineSymbolizer>
366        <CssParameter name="stroke">#f3f7f7</CssParameter>
367        <CssParameter name="stroke-width">1.2</CssParameter>
368      </LineSymbolizer>
369    </Rule>
370    <Rule>
371      <Filter>[waterway]='stream' and not [tunnel]='yes'</Filter>
372      &maxscale_zoom15;
373      &minscale_zoom18;
374      <LineSymbolizer>
375        <CssParameter name="stroke">#b5d0d0</CssParameter>
376        <CssParameter name="stroke-width">2</CssParameter>
377      </LineSymbolizer>
378      <TextSymbolizer name="name" fontset_name="book-fonts" size="8" fill="#6699cc" halo_radius="1" spacing="600" placement="line"/>
379    </Rule>
380    <Rule>
381      <Filter>([waterway]='drain' or [waterway]='ditch') and [tunnel]='yes'</Filter>
382      &maxscale_zoom15;
383      &minscale_zoom18;
384      <LineSymbolizer>
385        <CssParameter name="stroke">#b5d0d0</CssParameter>
386        <CssParameter name="stroke-width">2</CssParameter>
387        <CssParameter name="stroke-dasharray">4,2</CssParameter>
388      </LineSymbolizer>
389      <LineSymbolizer>
390        <CssParameter name="stroke">#f3f7f7</CssParameter>
391        <CssParameter name="stroke-width">1</CssParameter>
392      </LineSymbolizer>
393    </Rule>
394    <Rule>
395      <Filter>([waterway]='drain' or [waterway]='ditch') and not [tunnel]='yes'</Filter>
396      &maxscale_zoom15;
397      &minscale_zoom18;
398      <LineSymbolizer>
399        <CssParameter name="stroke">#b5d0d0</CssParameter>
400        <CssParameter name="stroke-width">1</CssParameter>
401      </LineSymbolizer>
402      <TextSymbolizer name="name" fontset_name="book-fonts" size="8" fill="#6699cc" halo_radius="1" spacing="600" placement="line"/>
403    </Rule>
404
405    <Rule>
406      <ElseFilter/> <!--[waterway]='stream'</Filter>-->
407      &maxscale_zoom15;
408      &minscale_zoom18;
409      <LineSymbolizer>
410        <CssParameter name="stroke">#b5d0d0</CssParameter>
411        <CssParameter name="stroke-width">2</CssParameter>
412      </LineSymbolizer>
413    </Rule>
414</Style>
415
416<Layer name="water_areas" status="on" srs="&osm2pgsql_projection;">
417    <StyleName>water_areas</StyleName>
418    <Datasource>
419      <Parameter name="table">
420      (select way,"natural",waterway,landuse,name
421      from &prefix;_polygon
422      where waterway in ('dock','mill_pond','riverbank','canal')
423         or landuse in ('reservoir','water','basin')
424         or "natural" in ('lake','water','land','marsh','scrub','wetland','glacier')
425      order by z_order,way_area desc
426      ) as water_areas</Parameter>
427      &datasource-settings;
428    </Datasource>
429</Layer>
430<Layer name="glaciers-text" status="on" srs="&osm2pgsql_projection;">
431    <StyleName>glaciers-text</StyleName>
432    <Datasource>
433      <Parameter name="table">
434      (select way,name,way_area
435      from &prefix;_polygon
436      where "natural"='glacier'
437      order by way_area desc
438      ) as glaciers</Parameter>
439      &datasource-settings;
440    </Datasource>
441</Layer>
442<Layer name="water_lines" status="on" srs="&osm2pgsql_projection;">
443    <StyleName>water_lines</StyleName>
444    <Datasource>
445      <Parameter name="table">
446      (select way,waterway,disused,lock,name,
447      case when tunnel in ('yes','true','1') then 'yes'::text else tunnel end as tunnel
448      from &prefix;_line
449      where waterway in ('weir','river','canal','derelict_canal','stream','drain','ditch')
450        and (bridge is null or bridge not in ('yes','true','1','aqueduct'))
451      order by z_order
452      ) as water_lines</Parameter>
453      &datasource-settings;
454    </Datasource>
455</Layer>
Note: See TracBrowser for help on using the repository browser.