-
Notifications
You must be signed in to change notification settings - Fork 0
/
Hiking.mrules
496 lines (459 loc) · 11.5 KB
/
Hiking.mrules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
// Maperitive rendering ruleset for hiking maps. The map style resembles
// that of paper hiking maps produced by Alpine Association of Slovenia (http://www.pzs.si/).
// http://maperitive.net
// Created by Igor Brejc
// Released under the Creative Commons Attribution-ShareAlike 3.0 License (http://creativecommons.org/licenses/by-sa/3.0/)
// Icons used: Map icons CC-0 from SJJB Management (http://www.sjjb.co.uk/mapicons)
// History:
// --------
// 2011-11-26: Updated by Igor Brejc
// - made a finer distinction between major and minor contour lines (now that Maperitive supports subpixel accuracy)
// 2011-09-20: Updated by Igor Brejc
// - turned off forest texture
// - moved alpine hut in front of peaks
// - added rendering of living_street, highway=construction and (railway|public_transport)=platform
// - added special rendering for tunnels
// TODO (stuff still missing, will be added soon)
// join all hiking paths
// natural reserve
// bus stop "icons/SJJB/png/transport_bus_stop.glow.32.png"
// parking "icons/SJJB/png/transport_parking.n.32.png"
// hunting stand
// viewpoint "icons/SJJB/png/tourist_view_point.p.32.png"
// hiking routes (SLO)
// surface unpaved
// marsh
// border
// tower
// quarry
// ruins
// church - icon
// camping
// mountain hut
// barrier
// ditch
// bench
// information table
// guidepost
features
church : amenity=place_of_worship AND (religion=christian OR religion=Christian)
food : amenity=restaurant OR amenity=fast_food OR tourism=guest_house
alpine hut : tourism=alpine_hut
shelter : amenity=shelter
place : node[place OR landuse=farmyard] area[place OR landuse=farmyard]
railway station : railway=station
points
peak : natural=peak
power tower : @isOneOf(power, tower, pole, station, sub_station)
fountain: natural=spring or amenity=fountain or man_made=water_well
fountain drinkingwater: amenity=drinking_water or drinking_water=yes
lines
aerialway : aerialway
contour major : contour[@isMulti(elevation, 50)]
contour minor : contour[@isMulti(elevation, 10) and not @isMulti(elevation, 50)]
hiking route : relation[type=route route=foot] way[trailblazed=yes]
// hiking route major : relation[type=route route=foot @isOneOf(network, iwn, nwn)]
// hiking route minor : relation[type=route route=foot @isOneOf(network, rwn, lwn)]
// hiking route other : trailblazed=yes
foot path major : @isOneOf(highway,pedestrian,footway,path,steps) AND (NOT trail_visibility OR @isOneOf(trail_visibility, excellent, good))
foot path minor : @isOneOf(highway,pedestrian,footway,path,steps) AND (trail_visibility AND NOT @isOneOf(trail_visibility, excellent, good))
road major : @isOneOf(highway,motorway,motorway_link,trunk,trunk_link,primary,primary_link,secondary,secondary_link,tertiary)
road minor : @isOneOf(highway,residential,unclassified,living_street,construction,service)
track major: highway=track and (@isOneOf(tracktype,grade1,grade2) OR NOT tracktype)
track : highway=track
railway : railway=rail
power line : @isOneOf(power, line, minor_line)
stream : waterway=stream or waterway=river
areas
building : building=yes
residential : landuse=residential
forest : landuse=forest OR natural=wood OR leisure=park
water : natural=water OR waterway=riverbank OR landuse=reservoir OR landuse=basin
nature reserve : boundary=national_park OR boundary=protected_area OR leisure=nature_reserve
military : landuse=military OR military=danger_area
properties
curved : true
text-halo-width : 30%
text-halo-opacity : 0.75
map-background-color : #fffefd
rules
target : place
for : place=city
define
min-zoom : 8
max-zoom : 14
font-size : 8:12;10:16;14:20
elsefor : place=town
define
min-zoom : 10
font-size : 10:12;16:20
elsefor : place=village
define
min-zoom : 13
font-size : 13:10;16:20
elsefor : place=hamlet
define
min-zoom : 14.5
font-size : 14.5:10;16:16
elsefor : place=farm OR landuse=farmyard
define
min-zoom : 15
font-size : 15:8;16:14
else
stop
define
font-weight : bold
text : @up(name)
draw : text
target: alpine hut
define
icon-image : icons/SJJB/png/accommodation_alpinehut.glow.32.png
icon-width : 11:16;14:34
min-zoom : 11
draw : icon
define
font-family : Arial Black
font-weight : bold
font-size : 13:13;20:24
font-stretch : 0.7
min-zoom : 13
text-align-vertical : near
text-offset-vertical : 100%
draw : text
target : peak
define
fill-color : black
line-style : none
min-zoom : 11
shape : circle
shape-size : 11:3;15:8
draw : shape
define
font-family : Cambria
font-style : italic
font-weight : bold
font-size : 13:10;15:20
min-zoom : 13
text : @if(name, name @if(ele, "\n(" ele ")"), ele)
text-align-vertical : near
text-color : black
text-max-width : 15
text-offset-vertical : 50%
text-halo-width : 30%
text-halo-opacity : 0.75
draw : text
target: shelter
define
icon-image : icons/SJJB/png/accommodation_shelter2.n.32.png
icon-width : 14:16;15:24
min-zoom : 14
draw : icon
target: food
define
icon-image : icons/SJJB/png/food_restaurant.n.32.png
icon-width : 14:16;20:30
min-zoom : 14
draw : icon
define
font-family : Arial
font-weight : bold
font-size : 14:12;20:20
font-stretch : 0.8
min-zoom : 15.5
text-align-vertical : near
text-offset-vertical : 100%
draw : text
target: church
define
icon-image : icons/SJJB/png/place_of_worship_christian3.glow.32.png
icon-width : 14:16;20:30
min-zoom : 14
draw : icon
define
font-family : Arial
font-weight : bold
font-size : 14:10;20:20
min-zoom : 15
text-align-vertical : near
text-offset-vertical : 100%
draw : text
target : railway station
define
min-zoom : 11
shape : square
shape-size : 11:0;13:4;15:20
fill-color : white
draw : shape
target: fountain*
define
min-zoom:14
shape : custom
shape-def : m:15,15;a:15,15,30,0;m:0,0;a:15,15,15,15
shape-size : 14:3;18:80
shape-aspect : 2
line-color : #00f
line-width : 14:1;18:3
draw : shape
target: fountain drinkingwater
define
min-zoom:14
shape:circle
shape-size : 14:3;18:8
line-color : #00f
line-width : 14:1;18:3
fill-color : transparent
draw : shape
target : power tower
define
min-zoom : 15.5
shape : square
shape-size : 16:7;20:12
fill-color : black
line-style : none
for : power=pole
define
shape-size:16:3;20:4
draw : shape
// lines
target : aerialway
define
shape-size : 12:2;16:6
shape-spacing : 11:1;13:4;14:6
for : aerialway=cable_car OR aerialway=gondola
define
min-zoom : 12.5
fill-color : white
line-width : 13:2;15:3
elsefor : aerialway=chair_lift
define
min-zoom : 13.5
fill-color : black
line-width : 13:1;14:2
else
define
min-zoom : 14
fill-color : black
line-width : 13:1;14:2
draw : line
define
line-width : 2
draw : shape
target : power line
define
curved : false
min-zoom : 15.5
line-width : 1
draw : line
target: hiking route*
define
line-color : red
line-opacity : 0.8
line-offset : 14:0;15:3;16:5
line-offset-sides : left
for : network=nwn
define
min-zoom : 10
line-width : 10:1;11:2;15:7
else
define
min-zoom : 12
line-width : 11:1;14:2;15:4
draw : line
target: hiking path
define
min-zoom : 12
line-color : red
line-opacity : 0.8
line-width : 11:1;14:2;15:4
line-offset : 14:0;15:3;16:5
line-offset-sides : left
line-style : dash
draw : line
target : railway
define
line-width : 9:1;10:2;13:2;14:3
draw : line
target : road *
if : road major
define
min-zoom : 10
line-color : #FFE66B
else
define
min-zoom : 14
line-color : white
define
line-width : 10:0.5;13:2;14:2;16:3
border-style : solid
border-color : black
border-width : 80%
border-opacity : 0.8
draw : line
target : road minor
define
min-zoom : 10
max-zoom : 14
line-color : black
line-width : 1
border-style : none
draw : line
target : track major
define
min-zoom : 14
line-color : white
line-width : 13.9:1;14:2;16:3
border-style : solid
border-color : black
border-width : 60%
border-opacity : 0.8
draw : line
define
min-zoom : 12
max-zoom : 14
line-color : black
line-width : 1
border-style : none
draw : line
target : track minor
define
min-zoom : 14.5
line-color : white
line-width : 13.9:1;14:2;16:3
border-style : solid
border-color : black
border-width : 60%
border-opacity : 0.8
for : tracktype=grade1 or not tracktype
define
line-style : solid
for : tracktype=grade2
define
line-style: dashlong
for : tracktype=grade3
define
line-style: dash
for : tracktype=grade4
define
line-style: dashdot
for : tracktype=grade5
define
line-style: dashdotdot
for : tunnel=yes
define
border-style : dot
for : bridge=yes
define
border-color : #000
draw : line
target : foot path*
define
line-color : black
line-style : dash
border-style : none
if : *major
define
min-zoom : 14.5
line-width : 14.5:1;15.5:2
else
define
min-zoom : 15
line-width : 1
draw : line
target : stream
define
min-zoom : 13
line-color : #78C1C1
line-width : 13:1;14:2;16:3
draw : line
define
min-zoom : 15
font-size : 15:10;17:17
font-style : italic
font-weight : bold
text-color : #78C1C1 black 10%
map.rendering.lflp.min-buffer-space : 5
map.rendering.lflp.max-allowed-corner-angle : 90
draw : text
target: contour*
define
line-color : #7f3300
line-opacity : 0.6
curved : true
if : *major
define
map.rendering.contour.label : true
min-zoom : 12
line-width : 11:0.75;13:1.25;15:2
font-size : 10
font-style : italic
font-weight : normal
text-halo-width : 35%
text-halo-opacity : 1
text-halo-color : #F1EEE8
else
define
min-zoom : 13
line-width : 0.65
draw : contour
// areas
target : building
define
fill-color : black
line-style : none
min-zoom : 12
draw : fill
target : nature_reserve
define
line-color : #8DC56C black 20%
line-opacity : 1
line-width : 3
line-style : dash
font-size : 3:3;12:12
text-color : green
font-weight : normal
text : @up(name)
draw : line
define
min-zoom : 13.5
draw : text
target : military
define
fill-color : red
fill-hatch : swne
fill-hatch-color : white
fill-hatch-opacity : 0
line-style : none
draw : fill
target : water
define
line-style : none
line-width : 1
fill-color : #78C1C1 white 10%
draw : fill
define
min-zoom : 15
font-size : 15:10;17:17
font-style : italic
font-weight : bold
text-color : #78C1C1 black 10%
draw : text
target : forest
define
line-style : none
line-width : 1
min-zoom : 9
fill-color : #8DC56C white 60%
//fill-texture : Textures/ForestNoiseLight.jpg
draw : fill
define
min-zoom : 17
draw : text
target : residential
define
line-style : none
line-width : 1
fill-color : #DCDCDC white 30%
draw : fill
define
min-zoom : 17
draw : text