/
cadastre-no-hatch.mrules
398 lines (377 loc) · 10.4 KB
/
cadastre-no-hatch.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
// Author: Nakaner
// Version: 2013-01-26
//
// About this style? 1) A style which is only black and white to be able to add coloured notes.
// 2) The style should look like German cadastre plans.
// 3) The style is designed for mapping building use and house numbers.
// 4) At the moment, this style does not support streets mapped as areas as
// the cadastre has.
// Features: buildings and their use, house numbers, streets, street names, waterways
//
// Licence: Creative Commons Attribution-ShareAlike 2.0 and newer
//
// Source: http://wiki.openstreetmap.org/w/index.php?title=User:Nakaner/Cadastre_Style
// Feedback wanted at: http://wiki.openstreetmap.org/wiki/User_talk:Nakaner/Cadastre_Style
//
// TODO:
// - canals, drains, docks
// - topographical features, e.g. trees, fences
// - entrances into buildings
// - oneways
// - steps
// - railway bridges
// - administrative boundaries
features
lines
//highways mapped as lines
highway motorway : highway=motorway OR highway=trunk
highway motorway link : highway=motorway_link OR highway=trunk_link
highway main : highway=primary OR highway=secondary OR highway=tertiary OR highway=unclassified
highway main link : highway=primary_link OR highway=secondary_link
highway major : highway=residential OR highway=living_street OR highway=pedestrian
highway minor : highway=service
highway track : highway=track
highway foot : highway=path OR highway=footway OR highway=cycleway
//water
water river : waterway=river
water stream : waterway=stream
water ditch : waterway=ditch
//railways
railway tram : railway=tram
railway light rail : railway=light_rail
railway subway : railway=subway
railway rail : (railway=rail OR railway=narrow_gauge) AND NOT tunnel=yes
railway rail tunnel : (railway=rail OR railway=narrow_gauge) AND tunnel=yes
railway disused : disused=yes
points
address node : node[addr:housenumber]
areas
water lake : landuse=reservoir OR natural=water
water riverbank : waterway=riverbank
//buildings
building use residential : building=residential OR building=apartments OR building=dormitory OR building=house OR building=terrace OR building=detached
building use commercial : building=commercial
building use barn : building=barn
building use industrial : building=industrial OR ((building=yes) AND (man_made=works))
building use warehouse : building=warehouse
building use church : bulding=church OR ((amenity=place_of_worship) AND (religion=christian))
building use hospital : building=hospital
building use school : building=school OR (building=yes AND amenity=school)
building use university : building=university OR (building=yes AND amenity=university)
building use service : building=service
building use hut : building=hut
building use farm : building=farm OR bulding=farm_auxiliary
building use garage : building=garage OR building=garages
building use roof : building=roof
building use public : building=public OR building=civic OR (building=yes AND (amenity=townhall OR amenity=community_center))
building use retail : (building=retail) OR (shop)
building use kindergarten : building=kindergarten OR (building=yes AND amenity=kindergarten)
building unknown : building=yes
properties
map-background-color : #FFFFFF
map-background-opacity : 1
map-sea-color : #FFFFFF
font-family : Verdana
text-max-width : 7
text-halo-width : 0%
text-align-horizontal : center
text-align-vertical : near
text-offset-vertical : 0
rules
//buildings
target : building unknown
if : building use*
stop
else
define
line-style : solid
line-color : black
line-width : 0.5
line-end-cap : square
line-start-cap : square
font-size : 15:4;18:10;20:14
min-zoom : 15
text-color : black
text-halo-width : 2
text-offset-vertical : 15:-2;18:-4.5;20:-7
text : [[addr:housenumber]]
draw : line
draw : text
target : building use*
define
line-style : solid
line-width : 0.5
line-color : black
line-end-cap : square
line-start-cap : square
font-size : 15:4;18:9;20:14
min-zoom : 15
text-color : black
text-halo-width : 2
text-offset-vertical : 15:-2;18:-4.5;20:-7
if : *use*
if : *commercial
define
text : @if([[addr:housenumber]],"Komm" "\n" [[addr:housenumber]], "Komm")
elseif : *barn
define
text : "Wirtg" "\n " [[addr:housenumber]]
elseif : *industrial
define
text : "Fabr" "\n" [[addr:housenumber]]
elseif : *warehouse
define
text : "Lagg" "\n" [[addr:housenumber]]
elseif : *church
define
text : "Kirche" "\n" [[addr:housenumber]]
elseif : *hospital
define
text : "Krhs" "\n" [[addr:housenumber]]
elseif : *school
define
text : "Schule" "\n" [[addr:housenumber]]
elseif : *university
define
text : "Hochsch" "\n" [[addr:housenumber]]
elseif : *service
define
text : "Btrg" "\n" [[addr:housenumber]]
elseif : *hut
define
text : "Hütte" "\n" [[addr:housenumber]]
elseif : *farm
define
text : "Wirtg" "\n" [[addr:housenumber]]
elseif : *garage
define
text : @if([[addr:housenumber]],"Gar" "\n" [[addr:housenumber]], "Gar")
elseif : *hangar
define
text : "Lagg" "\n" [[addr:housenumber]]
elseif : *roof
define
text : "Vord" "\n" [[addr:housenumber]]
elseif : *retail
define
text : "Hand" "\n" [[addr:housenumber]]
elseif : *kindergarten
define
text : "Kiga" "\n" [[addr:housenumber]]
elseif : *industrial
define
text : "Fabr" "\n" [[addr:housenumber]]
elseif : *residential
define
text-offset-vertical : 15:-4;18:-9;20:-14
text : "Whs" "\n" [[addr:housenumber]]
else
define
text : [[addr:housenumber]]
draw : line
draw : text
//adresses
target : address node
define
font-size : 15:4;18:8.5;20:11
min-zoom : 15
text : [[addr:housenumber]]
text-color : black
text-halo-width : 0
draw : text
//streets
target : highway*
define
text : name
text-color : black
font-weight : bold
text-halo-width : 0
font-size : 15:3.5;17:5;18:8;20:11
if : *motorway*
define
line-end-cap : round
line-start-cap : round
line-color : #B9B9B9
line-width : 15:7;17:9;18:14;20:20
border-color : #3C3C3C
border-width : 21%
border-style : solid
for : bridge=yes
define
border-width : 35%
border-color : black
if : *link
define
line-width : 15:5;17:6.5;18:9;20:14
elseif : *main*
define
line-end-cap : round
line-start-cap : round
line-color : #B9B9B9
line-width : 15:5.5;17:7;18:11;20:16
border-color : #585858
border-width : 21%
border-style : solid
for : bridge=yes
define
border-width : 35%
border-color : black
if : *link
define
line-width : 15:4;17:5;18:8;20:12
elseif : *major
define
line-end-cap : round
line-start-cap : round
min-zoom : 12
line-color : #C3C3C3
line-width : 15:5;17:6.5;18:9.5;20:14
border-color : #585858
border-width : 12%
border-style : solid
for : bridge=yes
define
border-width : 35%
border-color : black
elseif : *minor
define
line-end-cap : round
line-start-cap : round
min-zoom : 15
line-color : #CFCFCF
line-width : 15:3;17:5.2;18:7.5;20:10
border-color : #585858
border-width : 7%
border-style : solid
for : bridge=yes
define
border-width : 35%
border-color : black
elseif : *track
define
line-end-cap : round
line-start-cap : round
min-zoom : 15
line-color : #E9E9E9
line-width : 15:3;17:5.2;18:7.5;20:10
border-color : #585858
border-width : 7%
border-style : solid
for : bridge=yes
define
border-width : 35%
border-color : black
elseif : *foot
define
line-end-cap : round
line-start-cap : round
min-zoom : 15
line-color : #D3D3D3
line-width : 15:1.8;17:4;18:6.2;20:7
for : bridge=yes
define
border-width : 35%
border-color : black
else
stop
for : tunnel=yes OR tunnel=passage OR covered=yes
define
line-style : dot
line-end-cap : none
line-start-cap : none
border-style : none
draw : line
draw : text
//railways
target : railway*
if : *disused
stop
else
define
line-end-cap : none
line-start-cap : none
if : *rail
define
line-width : 15:3;17:4.5;18:7;20:9.7
line-color : black
border-color : black
draw : line
define
line-color : #F2F2F2
line-style : dashlong
draw : line
elseif : *rail tunnel
define
line-width : 15:3;17:4.5;18:7;20:9.7
line-color : black
draw : line
define
line-color : white
line-style : dashlong
draw : line
define
line-color : white
line-style : dot
draw : line
else
for : tunnel=yes
define
line-style : dot
if : *tram
define
line-width : 15:3;17:4;18:5.5;20:8
line-color : black
draw : line
elseif : *light rail
define
line-width : 15:3;17:4;18:5.5;20:8
line-color : black
draw : line
elseif : *subway
define
line-width : 15:3;17:4;18:5.5;20:8
line-color : black
draw : line
for : tunnel=yes
define
line-style : dot
line-end-cap : none
line-start-cap : none
border-style : none
//water
target : water*
define
text : name
text-color : white
font-weight : bold
line-end-cap : round
line-start-cap : round
for : tunnel=yes OR culvert=yes
define
line-style : dot
line-end-cap : none
line-start-cap : none
if : *stream
define
line-width : 15:4;17:6;18:8.5;20:12
line-color : #666666
font-size : 15:2;17:4;18:6;20:8.5
elseif : *river
define
line-width : 15:7;17:9;18:11.5;20:17
line-color : #666666
font-size : 15:5.5;17:7.5;18:10;20:15
elseif : *riverbank
define
fill-color : #666666
fill-hatch : solid
line-style : none
draw : fill
elseif : *lake
define
fill-color : #666666
fill-hatch : solid
line-style : none
draw : fill
draw : line
draw : text