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
RevLine 
[22444]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
[25036]6<!ENTITY background-color "#FFF"><!-- background (default land) -->
[22444]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 -->
[24370]13<!ENTITY water-color "#0076AD"><!-- water -->
14<!ENTITY waterline-color "#006594"><!-- stream, shoreline -->
[22444]15<!ENTITY naturearea-color "#007D33">
16<!ENTITY trail-color "#DDD"><!-- path, track, footway, cycleway -->
[27672]17<!ENTITY nordic-color "#F90025"><!-- piste:type=nordic -->
[24810]18<!ENTITY sled-color "#CDABDE"><!-- piste:type=sled -->
[24726]19<!ENTITY wintertrail-color "#444"><!-- piste:type=hike -->
[22444]20
21%sharedentities;
22%entities;
23]>
24
[23111]25<Map bgcolor="&water-color;" srs="&osm2pgsql_projection;"
26     minimum_version="0.7.1">
[22444]27  &fontset-settings;
28
[29093]29<Style name="snowplowing">
30  <Rule>
[29094]31    <Filter>&residential_road; and ([snowplowing]='no' or [piste:type] = 'nordic')</Filter>
[29093]32    &maxscale_zoom12;
33    &minscale_zoom12;
34    <LineSymbolizer>
35      <CssParameter name="stroke">&trail-color;</CssParameter>
[29094]36      <CssParameter name="stroke-width">1.1</CssParameter>
[29093]37      <CssParameter name="stroke-linejoin">round</CssParameter>
38      <CssParameter name="stroke-linecap">round</CssParameter>
39    </LineSymbolizer>
40  </Rule>
41  <Rule>
[29094]42    <Filter>&residential_road; and ([snowplowing]='no' or [piste:type] = 'nordic')</Filter>
[29093]43    &maxscale_zoom13;
44    &minscale_zoom13;
45    <LineSymbolizer>
46      <CssParameter name="stroke">&trail-color;</CssParameter>
[29094]47      <CssParameter name="stroke-width">1.6</CssParameter>
[29093]48      <CssParameter name="stroke-linejoin">round</CssParameter>
49      <CssParameter name="stroke-linecap">round</CssParameter>
50    </LineSymbolizer>
51  </Rule>
52  <Rule>
[29094]53    <Filter>&residential_road; and ([snowplowing]='no' or [piste:type] = 'nordic')</Filter>
[29093]54    &maxscale_zoom14;
55    &minscale_zoom14;
56    <LineSymbolizer>
57      <CssParameter name="stroke">&trail-color;</CssParameter>
[29094]58      <CssParameter name="stroke-width">2.5</CssParameter>
[29093]59      <CssParameter name="stroke-linejoin">round</CssParameter>
60      <CssParameter name="stroke-linecap">round</CssParameter>
61    </LineSymbolizer>
62  </Rule>
63  <Rule>
[29094]64    <Filter>&residential_road; and ([snowplowing]='no' or [piste:type] = 'nordic')</Filter>
[29093]65    &maxscale_zoom15;
66    <LineSymbolizer>
67      <CssParameter name="stroke">&trail-color;</CssParameter>
[29094]68      <CssParameter name="stroke-width">3.3</CssParameter>
[29093]69      <CssParameter name="stroke-linejoin">round</CssParameter>
70      <CssParameter name="stroke-linecap">round</CssParameter>
71    </LineSymbolizer>
72  </Rule>
73</Style>
74
[22444]75<Style name="skiing">
76  <Rule>
[27672]77    <Filter>[piste:grooming]='backcountry'</Filter>
[23307]78    &maxscale_zoom13;
[22444]79    <LineSymbolizer>
80      <CssParameter name="stroke">&nordic-color;</CssParameter>
[27669]81      <CssParameter name="stroke-width">3</CssParameter>
[27668]82      <CssParameter name="stroke-dasharray">2,5</CssParameter>
[22444]83    </LineSymbolizer>
84  </Rule>
85  <Rule>
86    <Filter>[piste:grooming] = 'scooter'</Filter>
[23307]87    &maxscale_zoom11;
[22444]88    <LineSymbolizer>
89      <CssParameter name="stroke">&nordic-color;</CssParameter>
90      <CssParameter name="stroke-width">1.5</CssParameter>
[27668]91      <CssParameter name="stroke-dasharray">22,8</CssParameter>
[22444]92    </LineSymbolizer>
93  </Rule>
94  <Rule>
[23137]95    <Filter>[piste:type] = 'nordic' and not ([piste:grooming] = 'backcountry' or [piste:grooming] = 'scooter')</Filter>
[23307]96    &maxscale_zoom11;
[22444]97    <LineSymbolizer>
98      <CssParameter name="stroke">&nordic-color;</CssParameter>
99      <CssParameter name="stroke-width">2</CssParameter>
100    </LineSymbolizer>
101  </Rule>
[23298]102  <Rule>
[29091]103    <Filter>[piste:type] = 'nordic' and ([lit]='yes' or [piste:lit]='yes')</Filter>
[23307]104    &maxscale_zoom13;
[23298]105    <LineSymbolizer>
106      <CssParameter name="stroke">&nordic-color;</CssParameter>
[23307]107      <CssParameter name="stroke-width">6</CssParameter>
108      <CssParameter name="stroke-dasharray">1,21</CssParameter>
[23298]109      <CssParameter name="stroke-linejoin">round</CssParameter>
110      <CssParameter name="stroke-linecap">round</CssParameter>
111    </LineSymbolizer>
112  </Rule>
[22444]113
114  <Rule>
115    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'novice'</Filter>
[27674]116    &maxscale_zoom11;
[23345]117    &minscale_zoom13;
[22444]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>
[23345]125    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'novice'</Filter>
126    &maxscale_zoom14;
127    &minscale_zoom14;
[22444]128    <LineSymbolizer>
[23345]129      <CssParameter name="stroke">#00A245</CssParameter>
130      <CssParameter name="stroke-width">5</CssParameter>
[22444]131      <CssParameter name="stroke-opacity">0.65</CssParameter>
132    </LineSymbolizer>
133  </Rule>
134  <Rule>
[23345]135    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'novice'</Filter>
136    &maxscale_zoom15;
[22444]137    <LineSymbolizer>
[23345]138      <CssParameter name="stroke">#00A245</CssParameter>
139      <CssParameter name="stroke-width">7.5</CssParameter>
[22444]140      <CssParameter name="stroke-opacity">0.65</CssParameter>
141    </LineSymbolizer>
142  </Rule>
[23345]143
[22444]144  <Rule>
[23345]145    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'easy'</Filter>
[27674]146    &maxscale_zoom11;
[23345]147    &minscale_zoom13;
[22444]148    <LineSymbolizer>
[23345]149      <CssParameter name="stroke">#00A4DF</CssParameter>
[22444]150      <CssParameter name="stroke-width">1.5</CssParameter>
151      <CssParameter name="stroke-opacity">0.65</CssParameter>
152    </LineSymbolizer>
153  </Rule>
154  <Rule>
[23345]155    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'easy'</Filter>
[23344]156    &maxscale_zoom14;
[23345]157    &minscale_zoom14;
[23344]158    <LineSymbolizer>
[23345]159      <CssParameter name="stroke">#00A4DF</CssParameter>
[23344]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>
[23345]166    &maxscale_zoom15;
[23344]167    <LineSymbolizer>
168      <CssParameter name="stroke">#00A4DF</CssParameter>
[23345]169      <CssParameter name="stroke-width">7.5</CssParameter>
[23344]170      <CssParameter name="stroke-opacity">0.65</CssParameter>
171    </LineSymbolizer>
172  </Rule>
[23345]173
[23344]174  <Rule>
175    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'intermediate'</Filter>
[27674]176    &maxscale_zoom11;
[23345]177    &minscale_zoom13;
[23344]178    <LineSymbolizer>
179      <CssParameter name="stroke">#E70019</CssParameter>
[23345]180      <CssParameter name="stroke-width">1.5</CssParameter>
[23344]181      <CssParameter name="stroke-opacity">0.65</CssParameter>
182    </LineSymbolizer>
183  </Rule>
184  <Rule>
[23345]185    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'intermediate'</Filter>
[23344]186    &maxscale_zoom14;
[23345]187    &minscale_zoom14;
[23344]188    <LineSymbolizer>
[23345]189      <CssParameter name="stroke">#E70019</CssParameter>
[23344]190      <CssParameter name="stroke-width">5</CssParameter>
191      <CssParameter name="stroke-opacity">0.65</CssParameter>
192    </LineSymbolizer>
193  </Rule>
194  <Rule>
[23345]195    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'intermediate'</Filter>
196    &maxscale_zoom15;
[23344]197    <LineSymbolizer>
[23345]198      <CssParameter name="stroke">#E70019</CssParameter>
199      <CssParameter name="stroke-width">7.5</CssParameter>
[23344]200      <CssParameter name="stroke-opacity">0.65</CssParameter>
201    </LineSymbolizer>
202  </Rule>
203
204  <Rule>
[23345]205    <Filter>[piste:type] = 'downhill' and ([piste:difficulty] = 'advanced' or [piste:difficulty] = 'expert')</Filter>
[27674]206    &maxscale_zoom11;
[23345]207    &minscale_zoom13;
[23344]208    <LineSymbolizer>
[23345]209      <CssParameter name="stroke">#17180D</CssParameter>
210      <CssParameter name="stroke-width">1.5</CssParameter>
[23344]211      <CssParameter name="stroke-opacity">0.65</CssParameter>
212    </LineSymbolizer>
213  </Rule>
214  <Rule>
[23345]215    <Filter>[piste:type] = 'downhill' and ([piste:difficulty] = 'advanced' or [piste:difficulty] = 'expert')</Filter>
216    &maxscale_zoom14;
217    &minscale_zoom14;
[23344]218    <LineSymbolizer>
[23345]219      <CssParameter name="stroke">#17180D</CssParameter>
220      <CssParameter name="stroke-width">5</CssParameter>
[23344]221      <CssParameter name="stroke-opacity">0.65</CssParameter>
222    </LineSymbolizer>
223  </Rule>
224  <Rule>
[23345]225    <Filter>[piste:type] = 'downhill' and ([piste:difficulty] = 'advanced' or [piste:difficulty] = 'expert')</Filter>
[23344]226    &maxscale_zoom15;
227    <LineSymbolizer>
[23345]228      <CssParameter name="stroke">#17180D</CssParameter>
[23344]229      <CssParameter name="stroke-width">7.5</CssParameter>
230      <CssParameter name="stroke-opacity">0.65</CssParameter>
231    </LineSymbolizer>
232  </Rule>
[23345]233
[24740]234  <!-- Expert orange #FF8040 -->
[23345]235
[23344]236  <Rule>
[23345]237    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'freeride'</Filter>
[27674]238    &maxscale_zoom11;
[23345]239    &minscale_zoom13;
[23344]240    <LineSymbolizer>
[23345]241      <CssParameter name="stroke">#F6E760</CssParameter>
242      <CssParameter name="stroke-width">1.5</CssParameter>
[23344]243      <CssParameter name="stroke-opacity">0.65</CssParameter>
244    </LineSymbolizer>
245  </Rule>
246  <Rule>
247    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'freeride'</Filter>
[24740]248    &maxscale_zoom14;
249    &minscale_zoom14;
[23344]250    <LineSymbolizer>
251      <CssParameter name="stroke">#F6E760</CssParameter>
[24740]252      <CssParameter name="stroke-width">5</CssParameter>
[23344]253      <CssParameter name="stroke-opacity">0.65</CssParameter>
254    </LineSymbolizer>
255  </Rule>
[23345]256  <Rule>
257    <Filter>[piste:type] = 'downhill' and [piste:difficulty] = 'freeride'</Filter>
[24740]258    &maxscale_zoom15;
[23345]259    <LineSymbolizer>
260      <CssParameter name="stroke">#F6E760</CssParameter>
[24740]261      <CssParameter name="stroke-width">7.5</CssParameter>
[23345]262      <CssParameter name="stroke-opacity">0.65</CssParameter>
263    </LineSymbolizer>
264  </Rule>
[23344]265
[24726]266  <Rule>
[24810]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>
[24811]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>
[24810]294
295  <Rule>
[24740]296    <Filter>[piste:type] = 'hike'</Filter>
[24726]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>
[24740]308    <Filter>[piste:type] = 'hike'</Filter>
309    &maxscale_zoom14;
[24726]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
[22515]319</Style>
[22444]320
[22515]321<Style name="symbols-winter">
322  <Rule>
323    &maxscale_zoom13;
[29091]324    <Filter>[piste:type]='playground'</Filter>
[29105]325    <PointSymbolizer file="&symbols;/skiplayground.png" allow_overlap="false"/>
[22515]326  </Rule>
327  <Rule>
328    &maxscale_zoom13;
329    <Filter>[sport]='biathlon'</Filter>
[29105]330    <PointSymbolizer file="&symbols;/biathlon.png" allow_overlap="false"/>
[22515]331  </Rule>
332  <Rule>
333    &maxscale_zoom13;
334    <Filter>[sport]='ski_jump_take_off'</Filter>
[29105]335    <PointSymbolizer file="&symbols;/skijump.png" allow_overlap="false"/>
[22515]336  </Rule>
[22444]337</Style>
338
339&layer-world;
340&layer-landscape;
341&layer-linefeatures;
[23116]342&layer-buildings;
[22444]343&layer-roads;
344&layer-nationalpark;
345
[29093]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
[29094]352       where snowplowing='no'
[29093]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
[22444]361<Layer name="skiing" status="on" srs="&osm2pgsql_projection;">
362    <StyleName>skiing</StyleName>
363    <Datasource>
364      <Parameter name="table">
[29091]365      (select way,"piste:type","piste:grooming","piste:difficulty","piste:lit",lit
[22444]366       from &prefix;_line
[25596]367       where "piste:type" in ('nordic','downhill','hike','sled','sleigh')
[22444]368          or "piste:grooming" is not null
369      ) as skiing
370      </Parameter>
371      &datasource-settings;
372   </Datasource>
373</Layer>
374
[23134]375&layer-roadnames;
[22444]376&layer-powerlines;
[22515]377&layer-symbols-facilities;
[22444]378&layer-symbols-hiking;
[22515]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
[24619]386    where sport in ('biathlon','ski_jump_take_off')
[22515]387       or landuse='winter_sports'
[29091]388       or "piste:type"='playground'
[22515]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
[23111]399    where sport is not null
[22515]400       or landuse='winter_sports'
[29091]401       or "piste:type"='playground'
[22515]402    ) as symbols</Parameter>
403    &datasource-settings;
404  </Datasource>
405</Layer>
406
[24369]407&layer-text-water;
[22444]408&layer-areatext;
409&layer-placenames;
410</Map>
Note: See TracBrowser for help on using the repository browser.