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

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

Simplification of PointSymbolizer? (Mapnik 0.7.1)

File size: 14.0 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" allow_overlap="false"/>
326  </Rule>
327  <Rule>
328    &maxscale_zoom13;
329    <Filter>[sport]='biathlon'</Filter>
330    <PointSymbolizer file="&symbols;/biathlon.png" allow_overlap="false"/>
331  </Rule>
332  <Rule>
333    &maxscale_zoom13;
334    <Filter>[sport]='ski_jump_take_off'</Filter>
335    <PointSymbolizer file="&symbols;/skijump.png" allow_overlap="false"/>
336  </Rule>
337</Style>
338
339&layer-world;
340&layer-landscape;
341&layer-linefeatures;
342&layer-buildings;
343&layer-roads;
344&layer-nationalpark;
345
346<Layer name="snowplowing" status="on" srs="&osm2pgsql_projection;">
347    <StyleName>snowplowing</StyleName>
348    <Datasource>
349      <Parameter name="table">
350      (select way,highway,snowplowing,"piste:type","piste:grooming"
351       from &prefix;_line
352       where snowplowing='no'
353          or "piste:type" in ('nordic')
354          or "piste:grooming" is not null
355      ) as snowplowing
356      </Parameter>
357      &datasource-settings;
358   </Datasource>
359</Layer>
360
361<Layer name="skiing" status="on" srs="&osm2pgsql_projection;">
362    <StyleName>skiing</StyleName>
363    <Datasource>
364      <Parameter name="table">
365      (select way,"piste:type","piste:grooming","piste:difficulty","piste:lit",lit
366       from &prefix;_line
367       where "piste:type" in ('nordic','downhill','hike','sled','sleigh')
368          or "piste:grooming" is not null
369      ) as skiing
370      </Parameter>
371      &datasource-settings;
372   </Datasource>
373</Layer>
374
375&layer-roadnames;
376&layer-powerlines;
377&layer-symbols-facilities;
378&layer-symbols-hiking;
379
380<Layer name="symbols-winter" status="on" srs="&osm2pgsql_projection;">
381  <StyleName>symbols-winter</StyleName>
382  <Datasource>
383    <Parameter name="table">
384    (select *
385    from &prefix;_point
386    where sport in ('biathlon','ski_jump_take_off')
387       or landuse='winter_sports'
388       or "piste:type"='playground'
389    ) as symbols</Parameter>
390    &datasource-settings;
391  </Datasource>
392</Layer>
393<Layer name="symbols-winter-poly" status="on" srs="&osm2pgsql_projection;">
394  <StyleName>symbols-winter</StyleName>
395  <Datasource>
396    <Parameter name="table">
397    (select *
398    from &prefix;_polygon
399    where sport is not null
400       or landuse='winter_sports'
401       or "piste:type"='playground'
402    ) as symbols</Parameter>
403    &datasource-settings;
404  </Datasource>
405</Layer>
406
407&layer-text-water;
408&layer-areatext;
409&layer-placenames;
410</Map>
Note: See TracBrowser for help on using the repository browser.