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

Last change on this file since 18477 was 18477, checked in by jonb, 10 years ago

Add waterway=drain into select line

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