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

Last change on this file since 24726 was 24726, checked in by vibrog, 9 years ago

Display winter hiking trails (piste:type=hike)

File size: 10.9 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 "#E9F8FF"><!-- 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, route=ski -->
18<!ENTITY wintertrail-color "#444"><!-- piste:type=hike -->
19
20%sharedentities;
21%entities;
22]>
23
24<Map bgcolor="&water-color;" srs="&osm2pgsql_projection;"
25     minimum_version="0.7.1">
26  &fontset-settings;
27
28<Style name="skiing">
29  <Rule>
30    <Filter>[piste:grooming] = 'backcountry'</Filter>
31    &maxscale_zoom13;
32    <LineSymbolizer>
33      <CssParameter name="stroke">&nordic-color;</CssParameter>
34      <CssParameter name="stroke-width">1.5</CssParameter>
35      <CssParameter name="stroke-dasharray">6,8</CssParameter>
36    </LineSymbolizer>
37  </Rule>
38  <Rule>
39    <Filter>[piste:grooming] = 'scooter'</Filter>
40    &maxscale_zoom11;
41    <LineSymbolizer>
42      <CssParameter name="stroke">&nordic-color;</CssParameter>
43      <CssParameter name="stroke-width">1.5</CssParameter>
44      <CssParameter name="stroke-dasharray">20,3</CssParameter>
45    </LineSymbolizer>
46  </Rule>
47  <Rule>
48    <Filter>[piste:type] = 'nordic' and not ([piste:grooming] = 'backcountry' or [piste:grooming] = 'scooter')</Filter>
49    &maxscale_zoom11;
50    <LineSymbolizer>
51      <CssParameter name="stroke">&nordic-color;</CssParameter>
52      <CssParameter name="stroke-width">2</CssParameter>
53    </LineSymbolizer>
54  </Rule>
55  <Rule>
56    <Filter>[piste:type] = 'nordic' and [lit]='yes'</Filter>
57    &maxscale_zoom13;
58    <LineSymbolizer>
59      <CssParameter name="stroke">&nordic-color;</CssParameter>
60      <CssParameter name="stroke-width">6</CssParameter>
61      <CssParameter name="stroke-dasharray">1,21</CssParameter>
62      <CssParameter name="stroke-linejoin">round</CssParameter>
63      <CssParameter name="stroke-linecap">round</CssParameter>
64    </LineSymbolizer>
65  </Rule>
66
67  <Rule>
68    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'novice'</Filter>
69    &maxscale_zoom12;
70    &minscale_zoom13;
71    <LineSymbolizer>
72      <CssParameter name="stroke">#00A245</CssParameter>
73      <CssParameter name="stroke-width">1.5</CssParameter>
74      <CssParameter name="stroke-opacity">0.65</CssParameter>
75    </LineSymbolizer>
76  </Rule>
77  <Rule>
78    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'novice'</Filter>
79    &maxscale_zoom14;
80    &minscale_zoom14;
81    <LineSymbolizer>
82      <CssParameter name="stroke">#00A245</CssParameter>
83      <CssParameter name="stroke-width">5</CssParameter>
84      <CssParameter name="stroke-opacity">0.65</CssParameter>
85    </LineSymbolizer>
86  </Rule>
87  <Rule>
88    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'novice'</Filter>
89    &maxscale_zoom15;
90    <LineSymbolizer>
91      <CssParameter name="stroke">#00A245</CssParameter>
92      <CssParameter name="stroke-width">7.5</CssParameter>
93      <CssParameter name="stroke-opacity">0.65</CssParameter>
94    </LineSymbolizer>
95  </Rule>
96
97  <Rule>
98    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'easy'</Filter>
99    &maxscale_zoom12;
100    &minscale_zoom13;
101    <LineSymbolizer>
102      <CssParameter name="stroke">#00A4DF</CssParameter>
103      <CssParameter name="stroke-width">1.5</CssParameter>
104      <CssParameter name="stroke-opacity">0.65</CssParameter>
105    </LineSymbolizer>
106  </Rule>
107  <Rule>
108    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'easy'</Filter>
109    &maxscale_zoom14;
110    &minscale_zoom14;
111    <LineSymbolizer>
112      <CssParameter name="stroke">#00A4DF</CssParameter>
113      <CssParameter name="stroke-width">5</CssParameter>
114      <CssParameter name="stroke-opacity">0.65</CssParameter>
115    </LineSymbolizer>
116  </Rule>
117  <Rule>
118    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'easy'</Filter>
119    &maxscale_zoom15;
120    <LineSymbolizer>
121      <CssParameter name="stroke">#00A4DF</CssParameter>
122      <CssParameter name="stroke-width">7.5</CssParameter>
123      <CssParameter name="stroke-opacity">0.65</CssParameter>
124    </LineSymbolizer>
125  </Rule>
126
127  <Rule>
128    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'intermediate'</Filter>
129    &maxscale_zoom12;
130    &minscale_zoom13;
131    <LineSymbolizer>
132      <CssParameter name="stroke">#E70019</CssParameter>
133      <CssParameter name="stroke-width">1.5</CssParameter>
134      <CssParameter name="stroke-opacity">0.65</CssParameter>
135    </LineSymbolizer>
136  </Rule>
137  <Rule>
138    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'intermediate'</Filter>
139    &maxscale_zoom14;
140    &minscale_zoom14;
141    <LineSymbolizer>
142      <CssParameter name="stroke">#E70019</CssParameter>
143      <CssParameter name="stroke-width">5</CssParameter>
144      <CssParameter name="stroke-opacity">0.65</CssParameter>
145    </LineSymbolizer>
146  </Rule>
147  <Rule>
148    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'intermediate'</Filter>
149    &maxscale_zoom15;
150    <LineSymbolizer>
151      <CssParameter name="stroke">#E70019</CssParameter>
152      <CssParameter name="stroke-width">7.5</CssParameter>
153      <CssParameter name="stroke-opacity">0.65</CssParameter>
154    </LineSymbolizer>
155  </Rule>
156
157  <Rule>
158    <Filter>[piste:type] = 'downhill' and ([piste:difficulty] = 'advanced' or [piste:difficulty] = 'expert')</Filter>
159    &maxscale_zoom12;
160    &minscale_zoom13;
161    <LineSymbolizer>
162      <CssParameter name="stroke">#17180D</CssParameter>
163      <CssParameter name="stroke-width">1.5</CssParameter>
164      <CssParameter name="stroke-opacity">0.65</CssParameter>
165    </LineSymbolizer>
166  </Rule>
167  <Rule>
168    <Filter>[piste:type] = 'downhill' and ([piste:difficulty] = 'advanced' or [piste:difficulty] = 'expert')</Filter>
169    &maxscale_zoom14;
170    &minscale_zoom14;
171    <LineSymbolizer>
172      <CssParameter name="stroke">#17180D</CssParameter>
173      <CssParameter name="stroke-width">5</CssParameter>
174      <CssParameter name="stroke-opacity">0.65</CssParameter>
175    </LineSymbolizer>
176  </Rule>
177  <Rule>
178    <Filter>[piste:type] = 'downhill' and ([piste:difficulty] = 'advanced' or [piste:difficulty] = 'expert')</Filter>
179    &maxscale_zoom15;
180    <LineSymbolizer>
181      <CssParameter name="stroke">#17180D</CssParameter>
182      <CssParameter name="stroke-width">7.5</CssParameter>
183      <CssParameter name="stroke-opacity">0.65</CssParameter>
184    </LineSymbolizer>
185  </Rule>
186
187<!-- Expert orange #FF8040 -->
188
189  <Rule>
190    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'freeride'</Filter>
191    &maxscale_zoom12;
192    &minscale_zoom13;
193    <LineSymbolizer>
194      <CssParameter name="stroke">#F6E760</CssParameter>
195      <CssParameter name="stroke-width">1.5</CssParameter>
196      <CssParameter name="stroke-opacity">0.65</CssParameter>
197    </LineSymbolizer>
198  </Rule>
199  <Rule>
200    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'freeride'</Filter>
201    &maxscale_zoom15;
202    <LineSymbolizer>
203      <CssParameter name="stroke">#F6E760</CssParameter>
204      <CssParameter name="stroke-width">7.5</CssParameter>
205      <CssParameter name="stroke-opacity">0.65</CssParameter>
206    </LineSymbolizer>
207  </Rule>
208  <Rule>
209    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'freeride'</Filter>
210    &maxscale_zoom14;
211    &minscale_zoom14;
212    <LineSymbolizer>
213      <CssParameter name="stroke">#F6E760</CssParameter>
214      <CssParameter name="stroke-width">5</CssParameter>
215      <CssParameter name="stroke-opacity">0.65</CssParameter>
216    </LineSymbolizer>
217  </Rule>
218
219  <Rule>
220    <Filter>[piste:type]='hike' and not &tunnel;</Filter>
221    &maxscale_zoom12;
222    &minscale_zoom13;
223    <LineSymbolizer>
224      <CssParameter name="stroke">&wintertrail-color;</CssParameter>
225      <CssParameter name="stroke-linejoin">round</CssParameter>
226      <CssParameter name="stroke-linecap">round</CssParameter>
227      <CssParameter name="stroke-width">0.4</CssParameter>
228      <CssParameter name="stroke-dasharray">2,1</CssParameter>
229    </LineSymbolizer>
230  </Rule>
231  <Rule>
232    <Filter>[piste:type]='hike' and not &tunnel;</Filter>
233    &maxscale_zoom13;
234    <LineSymbolizer>
235      <CssParameter name="stroke">&wintertrail-color;</CssParameter>
236      <CssParameter name="stroke-linejoin">round</CssParameter>
237      <CssParameter name="stroke-linecap">round</CssParameter>
238      <CssParameter name="stroke-width">0.75</CssParameter>
239      <CssParameter name="stroke-dasharray">4,2</CssParameter>
240    </LineSymbolizer>
241  </Rule>
242
243</Style>
244
245<Style name="symbols-winter">
246  <Rule>
247    &maxscale_zoom13;
248    <Filter>[leisure]='ski_playground'</Filter>
249    <PointSymbolizer file="&symbols;/skiplayground.png"
250       type="png" width="15" height="15"
251       allow_overlap="false"/>
252  </Rule>
253  <Rule>
254    &maxscale_zoom13;
255    <Filter>[sport]='biathlon'</Filter>
256    <PointSymbolizer file="&symbols;/biathlon.png"
257       type="png" width="15" height="15"
258       allow_overlap="false"/>
259  </Rule>
260  <Rule>
261    &maxscale_zoom13;
262    <Filter>[sport]='ski_jump_take_off'</Filter>
263    <PointSymbolizer file="&symbols;/skijump.png"
264       type="png" width="15" height="15"
265       allow_overlap="false"/>
266  </Rule>
267</Style>
268
269&layer-world;
270&layer-landscape;
271&layer-linefeatures;
272&layer-buildings;
273&layer-roads;
274&layer-nationalpark;
275
276<Layer name="skiing" status="on" srs="&osm2pgsql_projection;">
277    <StyleName>skiing</StyleName>
278    <Datasource>
279      <Parameter name="table">
280      (select way,"piste:type","piste:grooming","piste:difficulty",route,lit
281       from &prefix;_line
282       where "piste:type" in ('nordic','downhill','hike')
283          or "piste:grooming" is not null
284          or route='ski'
285      ) as skiing
286      </Parameter>
287      &datasource-settings;
288   </Datasource>
289</Layer>
290
291&layer-roadnames;
292&layer-powerlines;
293&layer-symbols-facilities;
294&layer-symbols-hiking;
295
296<Layer name="symbols-winter" status="on" srs="&osm2pgsql_projection;">
297  <StyleName>symbols-winter</StyleName>
298  <Datasource>
299    <Parameter name="table">
300    (select *
301    from &prefix;_point
302    where sport in ('biathlon','ski_jump_take_off')
303       or landuse='winter_sports'
304       or leisure='ski_playground'
305    ) as symbols</Parameter>
306    &datasource-settings;
307  </Datasource>
308</Layer>
309<Layer name="symbols-winter-poly" status="on" srs="&osm2pgsql_projection;">
310  <StyleName>symbols-winter</StyleName>
311  <Datasource>
312    <Parameter name="table">
313    (select *
314    from &prefix;_polygon
315    where sport is not null
316       or landuse='winter_sports'
317       or leisure='ski_playground'
318    ) as symbols</Parameter>
319    &datasource-settings;
320  </Datasource>
321</Layer>
322
323&layer-text-water;
324&layer-areatext;
325&layer-placenames;
326</Map>
Note: See TracBrowser for help on using the repository browser.