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

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

osm2pgsql import rules updated, remove piste:type=playground

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