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

Last change on this file was 27515, checked in by ldp, 7 years ago

Convert & bump to mapnik 2.0.0 syntax. Stick with r27279 as final 0.7.x version.

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