source: subversion/applications/rendering/nor-hikingmap/pistemap.xml @ 29094

Last change on this file since 29094 was 29094, checked in by vibrog, 7 years ago

Winter closed roads: adjust widths, fix bug in SQL

File size: 14.2 KB
Line 
1<?xml version="1.0" encoding="utf-8"?>
2<!DOCTYPE Map [
3<!ENTITY % entities SYSTEM "inc/entities.xml.inc">
4<!ENTITY % sharedentities SYSTEM "entities.xml.ent">
5
6<!ENTITY background-color "#FFF"><!-- background (default land) -->
7<!ENTITY forestland-color "#E9F8FF"><!-- wood -->
8<!ENTITY farmland-color "#FFF"><!-- farmland, field, orchard -->
9<!ENTITY openland-color "#FFF"><!-- meadow, recreation ground, park -->
10<!ENTITY roadcore-color "#FFF"><!-- roads core, parking, pitch, yard -->
11<!ENTITY urbanarea-color "#CCC"><!-- residential, industrial -->
12<!ENTITY regulatedarea-color "#CCC"><!-- construction, landfill, quarry -->
13<!ENTITY water-color "#0076AD"><!-- water -->
14<!ENTITY waterline-color "#006594"><!-- stream, shoreline -->
15<!ENTITY naturearea-color "#007D33">
16<!ENTITY trail-color "#DDD"><!-- path, track, footway, cycleway -->
17<!ENTITY nordic-color "#F90025"><!-- piste:type=nordic -->
18<!ENTITY sled-color "#CDABDE"><!-- piste:type=sled -->
19<!ENTITY wintertrail-color "#444"><!-- piste:type=hike -->
20
21%sharedentities;
22%entities;
23]>
24
25<Map bgcolor="&water-color;" srs="&osm2pgsql_projection;"
26     minimum_version="0.7.1">
27  &fontset-settings;
28
29<Style name="snowplowing">
30  <Rule>
31    <Filter>&residential_road; and ([snowplowing]='no' or [piste:type] = 'nordic')</Filter>
32    &maxscale_zoom12;
33    &minscale_zoom12;
34    <LineSymbolizer>
35      <CssParameter name="stroke">&trail-color;</CssParameter>
36      <CssParameter name="stroke-width">1.1</CssParameter>
37      <CssParameter name="stroke-linejoin">round</CssParameter>
38      <CssParameter name="stroke-linecap">round</CssParameter>
39    </LineSymbolizer>
40  </Rule>
41  <Rule>
42    <Filter>&residential_road; and ([snowplowing]='no' or [piste:type] = 'nordic')</Filter>
43    &maxscale_zoom13;
44    &minscale_zoom13;
45    <LineSymbolizer>
46      <CssParameter name="stroke">&trail-color;</CssParameter>
47      <CssParameter name="stroke-width">1.6</CssParameter>
48      <CssParameter name="stroke-linejoin">round</CssParameter>
49      <CssParameter name="stroke-linecap">round</CssParameter>
50    </LineSymbolizer>
51  </Rule>
52  <Rule>
53    <Filter>&residential_road; and ([snowplowing]='no' or [piste:type] = 'nordic')</Filter>
54    &maxscale_zoom14;
55    &minscale_zoom14;
56    <LineSymbolizer>
57      <CssParameter name="stroke">&trail-color;</CssParameter>
58      <CssParameter name="stroke-width">2.5</CssParameter>
59      <CssParameter name="stroke-linejoin">round</CssParameter>
60      <CssParameter name="stroke-linecap">round</CssParameter>
61    </LineSymbolizer>
62  </Rule>
63  <Rule>
64    <Filter>&residential_road; and ([snowplowing]='no' or [piste:type] = 'nordic')</Filter>
65    &maxscale_zoom15;
66    <LineSymbolizer>
67      <CssParameter name="stroke">&trail-color;</CssParameter>
68      <CssParameter name="stroke-width">3.3</CssParameter>
69      <CssParameter name="stroke-linejoin">round</CssParameter>
70      <CssParameter name="stroke-linecap">round</CssParameter>
71    </LineSymbolizer>
72  </Rule>
73</Style>
74
75<Style name="skiing">
76  <Rule>
77    <Filter>[piste:grooming]='backcountry'</Filter>
78    &maxscale_zoom13;
79    <LineSymbolizer>
80      <CssParameter name="stroke">&nordic-color;</CssParameter>
81      <CssParameter name="stroke-width">3</CssParameter>
82      <CssParameter name="stroke-dasharray">2,5</CssParameter>
83    </LineSymbolizer>
84  </Rule>
85  <Rule>
86    <Filter>[piste:grooming] = 'scooter'</Filter>
87    &maxscale_zoom11;
88    <LineSymbolizer>
89      <CssParameter name="stroke">&nordic-color;</CssParameter>
90      <CssParameter name="stroke-width">1.5</CssParameter>
91      <CssParameter name="stroke-dasharray">22,8</CssParameter>
92    </LineSymbolizer>
93  </Rule>
94  <Rule>
95    <Filter>[piste:type] = 'nordic' and not ([piste:grooming] = 'backcountry' or [piste:grooming] = 'scooter')</Filter>
96    &maxscale_zoom11;
97    <LineSymbolizer>
98      <CssParameter name="stroke">&nordic-color;</CssParameter>
99      <CssParameter name="stroke-width">2</CssParameter>
100    </LineSymbolizer>
101  </Rule>
102  <Rule>
103    <Filter>[piste:type] = 'nordic' and ([lit]='yes' or [piste:lit]='yes')</Filter>
104    &maxscale_zoom13;
105    <LineSymbolizer>
106      <CssParameter name="stroke">&nordic-color;</CssParameter>
107      <CssParameter name="stroke-width">6</CssParameter>
108      <CssParameter name="stroke-dasharray">1,21</CssParameter>
109      <CssParameter name="stroke-linejoin">round</CssParameter>
110      <CssParameter name="stroke-linecap">round</CssParameter>
111    </LineSymbolizer>
112  </Rule>
113
114  <Rule>
115    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'novice'</Filter>
116    &maxscale_zoom11;
117    &minscale_zoom13;
118    <LineSymbolizer>
119      <CssParameter name="stroke">#00A245</CssParameter>
120      <CssParameter name="stroke-width">1.5</CssParameter>
121      <CssParameter name="stroke-opacity">0.65</CssParameter>
122    </LineSymbolizer>
123  </Rule>
124  <Rule>
125    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'novice'</Filter>
126    &maxscale_zoom14;
127    &minscale_zoom14;
128    <LineSymbolizer>
129      <CssParameter name="stroke">#00A245</CssParameter>
130      <CssParameter name="stroke-width">5</CssParameter>
131      <CssParameter name="stroke-opacity">0.65</CssParameter>
132    </LineSymbolizer>
133  </Rule>
134  <Rule>
135    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'novice'</Filter>
136    &maxscale_zoom15;
137    <LineSymbolizer>
138      <CssParameter name="stroke">#00A245</CssParameter>
139      <CssParameter name="stroke-width">7.5</CssParameter>
140      <CssParameter name="stroke-opacity">0.65</CssParameter>
141    </LineSymbolizer>
142  </Rule>
143
144  <Rule>
145    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'easy'</Filter>
146    &maxscale_zoom11;
147    &minscale_zoom13;
148    <LineSymbolizer>
149      <CssParameter name="stroke">#00A4DF</CssParameter>
150      <CssParameter name="stroke-width">1.5</CssParameter>
151      <CssParameter name="stroke-opacity">0.65</CssParameter>
152    </LineSymbolizer>
153  </Rule>
154  <Rule>
155    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'easy'</Filter>
156    &maxscale_zoom14;
157    &minscale_zoom14;
158    <LineSymbolizer>
159      <CssParameter name="stroke">#00A4DF</CssParameter>
160      <CssParameter name="stroke-width">5</CssParameter>
161      <CssParameter name="stroke-opacity">0.65</CssParameter>
162    </LineSymbolizer>
163  </Rule>
164  <Rule>
165    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'easy'</Filter>
166    &maxscale_zoom15;
167    <LineSymbolizer>
168      <CssParameter name="stroke">#00A4DF</CssParameter>
169      <CssParameter name="stroke-width">7.5</CssParameter>
170      <CssParameter name="stroke-opacity">0.65</CssParameter>
171    </LineSymbolizer>
172  </Rule>
173
174  <Rule>
175    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'intermediate'</Filter>
176    &maxscale_zoom11;
177    &minscale_zoom13;
178    <LineSymbolizer>
179      <CssParameter name="stroke">#E70019</CssParameter>
180      <CssParameter name="stroke-width">1.5</CssParameter>
181      <CssParameter name="stroke-opacity">0.65</CssParameter>
182    </LineSymbolizer>
183  </Rule>
184  <Rule>
185    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'intermediate'</Filter>
186    &maxscale_zoom14;
187    &minscale_zoom14;
188    <LineSymbolizer>
189      <CssParameter name="stroke">#E70019</CssParameter>
190      <CssParameter name="stroke-width">5</CssParameter>
191      <CssParameter name="stroke-opacity">0.65</CssParameter>
192    </LineSymbolizer>
193  </Rule>
194  <Rule>
195    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'intermediate'</Filter>
196    &maxscale_zoom15;
197    <LineSymbolizer>
198      <CssParameter name="stroke">#E70019</CssParameter>
199      <CssParameter name="stroke-width">7.5</CssParameter>
200      <CssParameter name="stroke-opacity">0.65</CssParameter>
201    </LineSymbolizer>
202  </Rule>
203
204  <Rule>
205    <Filter>[piste:type] = 'downhill' and ([piste:difficulty] = 'advanced' or [piste:difficulty] = 'expert')</Filter>
206    &maxscale_zoom11;
207    &minscale_zoom13;
208    <LineSymbolizer>
209      <CssParameter name="stroke">#17180D</CssParameter>
210      <CssParameter name="stroke-width">1.5</CssParameter>
211      <CssParameter name="stroke-opacity">0.65</CssParameter>
212    </LineSymbolizer>
213  </Rule>
214  <Rule>
215    <Filter>[piste:type] = 'downhill' and ([piste:difficulty] = 'advanced' or [piste:difficulty] = 'expert')</Filter>
216    &maxscale_zoom14;
217    &minscale_zoom14;
218    <LineSymbolizer>
219      <CssParameter name="stroke">#17180D</CssParameter>
220      <CssParameter name="stroke-width">5</CssParameter>
221      <CssParameter name="stroke-opacity">0.65</CssParameter>
222    </LineSymbolizer>
223  </Rule>
224  <Rule>
225    <Filter>[piste:type] = 'downhill' and ([piste:difficulty] = 'advanced' or [piste:difficulty] = 'expert')</Filter>
226    &maxscale_zoom15;
227    <LineSymbolizer>
228      <CssParameter name="stroke">#17180D</CssParameter>
229      <CssParameter name="stroke-width">7.5</CssParameter>
230      <CssParameter name="stroke-opacity">0.65</CssParameter>
231    </LineSymbolizer>
232  </Rule>
233
234  <!-- Expert orange #FF8040 -->
235
236  <Rule>
237    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'freeride'</Filter>
238    &maxscale_zoom11;
239    &minscale_zoom13;
240    <LineSymbolizer>
241      <CssParameter name="stroke">#F6E760</CssParameter>
242      <CssParameter name="stroke-width">1.5</CssParameter>
243      <CssParameter name="stroke-opacity">0.65</CssParameter>
244    </LineSymbolizer>
245  </Rule>
246  <Rule>
247    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'freeride'</Filter>
248    &maxscale_zoom14;
249    &minscale_zoom14;
250    <LineSymbolizer>
251      <CssParameter name="stroke">#F6E760</CssParameter>
252      <CssParameter name="stroke-width">5</CssParameter>
253      <CssParameter name="stroke-opacity">0.65</CssParameter>
254    </LineSymbolizer>
255  </Rule>
256  <Rule>
257    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'freeride'</Filter>
258    &maxscale_zoom15;
259    <LineSymbolizer>
260      <CssParameter name="stroke">#F6E760</CssParameter>
261      <CssParameter name="stroke-width">7.5</CssParameter>
262      <CssParameter name="stroke-opacity">0.65</CssParameter>
263    </LineSymbolizer>
264  </Rule>
265
266  <Rule>
267    <Filter>[piste:type] = 'sled'</Filter>
268    &maxscale_zoom11;
269    <LineSymbolizer>
270      <CssParameter name="stroke">&sled-color;</CssParameter>
271      <CssParameter name="stroke-width">2</CssParameter>
272    </LineSymbolizer>
273  </Rule>
274  <Rule>
275    <Filter>[piste:type] = 'sled' and [lit]='yes'</Filter>
276    &maxscale_zoom13;
277    <LineSymbolizer>
278      <CssParameter name="stroke">&sled-color;</CssParameter>
279      <CssParameter name="stroke-width">6</CssParameter>
280      <CssParameter name="stroke-dasharray">1,21</CssParameter>
281      <CssParameter name="stroke-linejoin">round</CssParameter>
282      <CssParameter name="stroke-linecap">round</CssParameter>
283    </LineSymbolizer>
284  </Rule>
285  <Rule>
286    <Filter>[piste:type] = 'sleigh'</Filter>
287    &maxscale_zoom11;
288    <LineSymbolizer>
289      <CssParameter name="stroke">&sled-color;</CssParameter>
290      <CssParameter name="stroke-width">1.5</CssParameter>
291      <CssParameter name="stroke-dasharray">20,3</CssParameter>
292    </LineSymbolizer>
293  </Rule>
294
295  <Rule>
296    <Filter>[piste:type] = 'hike'</Filter>
297    &maxscale_zoom12;
298    &minscale_zoom13;
299    <LineSymbolizer>
300      <CssParameter name="stroke">&wintertrail-color;</CssParameter>
301      <CssParameter name="stroke-linejoin">round</CssParameter>
302      <CssParameter name="stroke-linecap">round</CssParameter>
303      <CssParameter name="stroke-width">0.4</CssParameter>
304      <CssParameter name="stroke-dasharray">2,1</CssParameter>
305    </LineSymbolizer>
306  </Rule>
307  <Rule>
308    <Filter>[piste:type] = 'hike'</Filter>
309    &maxscale_zoom14;
310    <LineSymbolizer>
311      <CssParameter name="stroke">&wintertrail-color;</CssParameter>
312      <CssParameter name="stroke-linejoin">round</CssParameter>
313      <CssParameter name="stroke-linecap">round</CssParameter>
314      <CssParameter name="stroke-width">0.75</CssParameter>
315      <CssParameter name="stroke-dasharray">4,2</CssParameter>
316    </LineSymbolizer>
317  </Rule>
318
319</Style>
320
321<Style name="symbols-winter">
322  <Rule>
323    &maxscale_zoom13;
324    <Filter>[piste:type]='playground'</Filter>
325    <PointSymbolizer file="&symbols;/skiplayground.png"
326       type="png" width="15" height="15"
327       allow_overlap="false"/>
328  </Rule>
329  <Rule>
330    &maxscale_zoom13;
331    <Filter>[sport]='biathlon'</Filter>
332    <PointSymbolizer file="&symbols;/biathlon.png"
333       type="png" width="15" height="15"
334       allow_overlap="false"/>
335  </Rule>
336  <Rule>
337    &maxscale_zoom13;
338    <Filter>[sport]='ski_jump_take_off'</Filter>
339    <PointSymbolizer file="&symbols;/skijump.png"
340       type="png" width="15" height="15"
341       allow_overlap="false"/>
342  </Rule>
343</Style>
344
345&layer-world;
346&layer-landscape;
347&layer-linefeatures;
348&layer-buildings;
349&layer-roads;
350&layer-nationalpark;
351
352<Layer name="snowplowing" status="on" srs="&osm2pgsql_projection;">
353    <StyleName>snowplowing</StyleName>
354    <Datasource>
355      <Parameter name="table">
356      (select way,highway,snowplowing,"piste:type","piste:grooming"
357       from &prefix;_line
358       where snowplowing='no'
359          or "piste:type" in ('nordic')
360          or "piste:grooming" is not null
361      ) as snowplowing
362      </Parameter>
363      &datasource-settings;
364   </Datasource>
365</Layer>
366
367<Layer name="skiing" status="on" srs="&osm2pgsql_projection;">
368    <StyleName>skiing</StyleName>
369    <Datasource>
370      <Parameter name="table">
371      (select way,"piste:type","piste:grooming","piste:difficulty","piste:lit",lit
372       from &prefix;_line
373       where "piste:type" in ('nordic','downhill','hike','sled','sleigh')
374          or "piste:grooming" is not null
375      ) as skiing
376      </Parameter>
377      &datasource-settings;
378   </Datasource>
379</Layer>
380
381&layer-roadnames;
382&layer-powerlines;
383&layer-symbols-facilities;
384&layer-symbols-hiking;
385
386<Layer name="symbols-winter" status="on" srs="&osm2pgsql_projection;">
387  <StyleName>symbols-winter</StyleName>
388  <Datasource>
389    <Parameter name="table">
390    (select *
391    from &prefix;_point
392    where sport in ('biathlon','ski_jump_take_off')
393       or landuse='winter_sports'
394       or "piste:type"='playground'
395    ) as symbols</Parameter>
396    &datasource-settings;
397  </Datasource>
398</Layer>
399<Layer name="symbols-winter-poly" status="on" srs="&osm2pgsql_projection;">
400  <StyleName>symbols-winter</StyleName>
401  <Datasource>
402    <Parameter name="table">
403    (select *
404    from &prefix;_polygon
405    where sport is not null
406       or landuse='winter_sports'
407       or "piste:type"='playground'
408    ) as symbols</Parameter>
409    &datasource-settings;
410  </Datasource>
411</Layer>
412
413&layer-text-water;
414&layer-areatext;
415&layer-placenames;
416</Map>
Note: See TracBrowser for help on using the repository browser.