forked from hotosm/HDM-CartoCSS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
project.yml
693 lines (624 loc) · 23.2 KB
/
project.yml
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
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
bounds: &world
- -180
- -85
- 180
- 85
_parts:
# let's factorize default values used by layers
extents: &extents
extent: *world
srs-name: "3857"
srs: "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over"
class: ''
status: 'on'
extents84: &extents84
extent: *world
srs-name: "WGS84"
srs: "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
postgis: &postgis
type: postgis
dbname: osm
key_field: ""
geometry_field: way
extent: -20037508,-20037508,20037508,20037508
host: localhost
user: hot
password: m4d31nfr4nc3
center:
- 29.9377
- -3.4216
- 15
format: png
interactivity: false
minzoom: 0
maxzoom: 20
srs: +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over
Stylesheet:
- "palette.mss"
- "base.mss"
- "roads.mss"
- "poi.mss"
- "power.mss"
- "labels.mss"
Layer:
- Datasource:
file: http://data.openstreetmapdata.com/simplified-land-polygons-complete-3857.zip
type: shape
class: shp
geometry: polygon
<<: *extents
id: land-low
- id: land-high
Datasource:
file: http://data.openstreetmapdata.com/land-polygons-split-3857.zip
type: shape
class: shp
geometry: polygon
<<: *extents
- id: landuse_gen0
<<: *extents
Datasource:
<<: *postgis
table: |-
( SELECT
way, way_area AS area, COALESCE(landuse, leisure, "natural", highway, amenity, tourism) AS type, tags->'landfill:type' as landfill_type
FROM
planet_osm_polygon
WHERE
way_area > 100000 ORDER BY way_area DESC
) AS data
advanced:
extent_from_subquery: 'true'
- id: landuse_gen1
<<: *extents
Datasource:
<<: *postgis
table: >-
( SELECT way, way_area AS area, COALESCE(landuse, leisure, "natural",
highway, amenity, tourism) AS type, tags->'landfill:type' as
landfill_type FROM planet_osm_polygon WHERE way_area > 10000 AND
COALESCE(landuse, leisure, "natural", highway, amenity, tourism) IS NOT NULL
ORDER BY way_area DESC
) AS data
advanced:
extent_from_subquery: 'true'
- id: landuse
<<: *extents
Datasource:
<<: *postgis
table: |-
( SELECT way, way_area AS area, COALESCE(landuse, leisure, "natural", highway, amenity, tourism) AS type, tags->'landfill:type' as landfill_type
FROM planet_osm_polygon
WHERE COALESCE(landuse, leisure, "natural", highway, amenity, tourism) IS NOT NULL
ORDER BY way_area DESC) AS data
advanced:
extent_from_subquery: 'true'
- geometry: raster
extent: *world
id: hillshade
Datasource:
file: DEM/data/hillshade.vrt
type: gdal
srs-name: 900913
srs: +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over
status: 'off'
- geometry: linestring
extent: *world
id: contour_line
Datasource:
file: DEM/data/contour-25m.shp
type: shape
srs-name: autodetect
srs: +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over
status: 'off'
- id: waterway_low
<<: *extents
Datasource:
<<: *postgis
table: >-
( SELECT way, waterway AS type,
CASE WHEN intermittent IN ('yes') OR tags@> hstore('seasonal','yes') THEN
'yes'
ELSE 'no' END AS seasonal
FROM planet_osm_line
WHERE waterway IN ('river', 'canal')) as h2olow
advanced:
extent_from_subquery: 'true'
- id: waterway_med
Datasource:
<<: *postgis
table: >-
( SELECT way, waterway AS type,
CASE WHEN intermittent IN ('yes') OR tags@> hstore('seasonal','yes') THEN
'yes'
ELSE 'no' END AS seasonal
FROM planet_osm_line
WHERE waterway IN ('river', 'canal', 'stream')) as h2o
- id: waterway_high
<<: *extents
Datasource:
<<: *postgis
table: >-
( SELECT way, waterway AS type,
CASE WHEN intermittent IN ('yes') OR tags@> hstore('seasonal','yes') THEN
'yes'
ELSE 'no' END AS seasonal
FROM planet_osm_line
WHERE waterway IN ('river', 'canal', 'stream', 'ditch', 'drain')) as h2o
advanced:
extent_from_subquery: 'true'
- id: water_gen0
<<: *extents
Datasource:
<<: *postgis
table: >-
( SELECT way, "natural" AS type, way_area AS area
FROM planet_osm_polygon
WHERE ("natural" IN ('water', 'pond')
OR waterway IN ('basin', 'canal', 'mill_pond', 'pond', 'riverbank'))
AND way_area > 10000
) AS data
advanced:
extent_from_subquery: 'true'
- id: water_gen1
<<: *extents
Datasource:
<<: *postgis
table: >-
( SELECT way, "natural" AS type, way_area AS area
FROM planet_osm_polygon
WHERE ("natural" IN ('water', 'pond')
OR waterway IN ('basin', 'canal', 'mill_pond', 'pond', 'riverbank'))
AND way_area > 1000
) AS data
advanced:
extent_from_subquery: 'true'
- id: water
<<: *extents
Datasource:
<<: *postgis
table: >-
( SELECT way, way_area AS area
FROM planet_osm_polygon
WHERE "natural" IN ('water', 'pond')
OR waterway IN ('basin', 'canal', 'mill_pond', 'pond', 'riverbank', 'dock')
) AS data
advanced:
extent_from_subquery: 'true'
- id: landuse_overlays
<<: *extents
Datasource:
<<: *postgis
table: |-
( SELECT way, way_area AS area, COALESCE(leisure) AS type
FROM planet_osm_polygon
WHERE leisure = 'nature_reserve'
ORDER BY way_area DESC
) AS data
advanced:
extent_from_subquery: 'true'
- id: admin-high
<<: *extents
Datasource:
<<: *postgis
table: |-
( SELECT
ST_Intersection(way, !bbox!) AS way, admin_level::integer,
CASE WHEN tags->'maritime'='yes' THEN 'yes' ELSE 'no' END AS maritime
FROM
planet_osm_roads
WHERE
"boundary" = 'administrative'
AND admin_level IN ('1','2','3','4', '5', '6', '7', '8', '9', '10')
AND "boundary" IS NOT NULL
AND way && !bbox!
ORDER BY
admin_level DESC
) AS data
advanced:
extent_from_subquery: 'true'
- id: admin-med
<<: *extents
Datasource:
<<: *postgis
table: |-
( SELECT
ST_Intersection(way, !bbox!) AS way, admin_level::integer,
CASE WHEN tags->'maritime'='yes' THEN 'yes' ELSE 'no' END AS maritime
FROM
planet_osm_roads
WHERE
"boundary" = 'administrative'
AND admin_level IN ('1','2','3','4', '5', '6', '7', '8')
AND "boundary" IS NOT NULL
AND way && !bbox!
ORDER BY
admin_level DESC
) AS data
advanced:
extent_from_subquery: 'true'
- id: admin-low
<<: *extents
Datasource:
<<: *postgis
table: |-
( SELECT
way, admin_level::integer,
CASE WHEN tags->'maritime'='yes' THEN 'yes' ELSE 'no' END AS maritime
FROM
planet_osm_roads
WHERE
"boundary" = 'administrative'
AND admin_level IN ('1','2','3','4')
AND "boundary" IS NOT NULL
ORDER BY
admin_level DESC
) AS data
advanced:
extent_from_subquery: 'true'
- id: buildings
<<: *extents
Datasource:
<<: *postgis
table: |-
( SELECT
way, CASE WHEN amenity IS NOT NULL or shop IS NOT NULL THEN 'yes' ELSE 'no' END AS poi, building AS type
FROM
planet_osm_polygon
WHERE
building NOT IN ('0','false', 'no')
) AS data
advanced:
extent_from_subquery: 'true'
- id: aeroway-poly
<<: *extents
Datasource:
<<: *postgis
table: "( SELECT way, aeroway AS type, tunnel FROM planet_osm_polygon WHERE aeroway IN ('apron', 'runway', 'taxiway')) AS data"
advanced:
extent_from_subquery: 'true'
- id: aeroway
<<: *extents
Datasource:
<<: *postgis
table: |-
( SELECT way, aeroway AS type, tunnel FROM planet_osm_line
WHERE aeroway IN ('apron', 'runway', 'taxiway')
) AS data
advanced:
extent_from_subquery: 'true'
- id: turning_circle_case
<<: *extents
Datasource:
<<: *postgis
table: "( SELECT way \n FROM planet_osm_point \n WHERE highway = 'turning_circle'\n) AS data"
advanced:
extent_from_subquery: 'true'
- id: roads_high
<<: *extents
Datasource:
<<: *postgis
table: |-
( SELECT
way, name, access, construction, stratum, type,
CASE
WHEN smoothness IN ('bad', 'very_bad', 'horrible', 'very_horrible') THEN 'bad'
ELSE 'good'
END AS condition,
CASE
WHEN surface IN ('paved', 'paving_stones', 'asphalt', 'concrete') THEN 'paved'
WHEN (surface IS NULL AND type IN ('trunk', 'trunk_link', 'motorway', 'motorway_link', 'primary', 'primary_link', 'secondary', 'secondary_link', 'tertiary', 'tertiary_link')) THEN 'paved'
ELSE 'unpaved'
END AS surface,
CASE
WHEN tunnel IS NOT NULL AND tunnel!='no' THEN 'tunnel'
WHEN bridge IS NOT NULL AND bridge!='no' THEN 'bridge'
WHEN ford IS NOT NULL AND ford!='no' THEN 'ford'
ELSE NULL
END AS structure,
CASE
WHEN type IN ('motorway', 'trunk', 'trunk_link') THEN 'motorway'
WHEN type ~ E'\\w+_link$' THEN regexp_replace(type, '_link', '')
WHEN type IN ('unclassified', 'road', 'service') THEN 'standard'
WHEN type IN ('residential', 'living_street') THEN 'urban'
WHEN type IN ('path', 'cycleway', 'footway', 'pedestrian', 'steps', 'bridleway') THEN 'noauto'
ELSE type
END AS style
FROM
( SELECT
way, name, bridge, access, surface, tunnel, tags->'smoothness' AS smoothness, tags->'ford' AS ford, layer, tags->'narrow' AS narrow, construction,
CASE
WHEN layer ~ E'^-?\\d{1,4}$' THEN layer::integer
ELSE 0
END AS stratum,
CASE
WHEN highway='construction' AND construction IS NOT NULL THEN construction
ELSE highway
END AS type,
CASE
WHEN highway IN ('trunk', 'motorway') THEN 1
WHEN highway IN ('primary', 'secondary', 'tertiary') THEN 10
WHEN highway IN ('tertiary') THEN 100
ELSE 1000
END AS prio
FROM
planet_osm_line
WHERE
highway IS NOT NULL
AND way && !bbox!
ORDER BY
stratum, prio DESC, z_order
) as a
WHERE
a.type!='construction' and (a.construction!='yes' OR a.construction IS NULL)
) AS data
advanced:
extent_from_subquery: 'true'
- id: ferry
<<: *extents
Datasource:
<<: *postgis
table: "( SELECT way, route, name, z_order FROM planet_osm_line WHERE route IS NOT NULL AND route='ferry' ORDER BY z_order) as ferry"
advanced:
extent_from_subquery: 'true'
- id: railway
<<: *extents
Datasource:
<<: *postgis
table: "( SELECT way, tunnel, bridge, railway, service, CASE WHEN railway in ('spur','siding') or (railway='rail' and service in ('spur','siding','yard')) THEN 'yard' WHEN railway='disused' THEN 'disused' WHEN railway='rail' THEN 'main' ELSE 'other' END AS type FROM planet_osm_line WHERE railway IS NOT NULL AND railway!='abandoned' ORDER BY z_order) as rail"
advanced:
extent_from_subquery: 'true'
- id: roads_med
<<: *extents
Datasource:
<<: *postgis
table: >-
( SELECT way, highway AS type
FROM planet_osm_roads
WHERE highway IN ('motorway', 'trunk', 'primary', 'secondary',
'motorway_link', 'trunk_link')
) AS data
advanced:
extent_from_subquery: 'true'
- id: roads_low
<<: *extents
Datasource:
<<: *postgis
table: |-
( SELECT way, highway AS type, bridge, tunnel
FROM planet_osm_roads
WHERE highway IN ('motorway', 'trunk')
) AS data
advanced:
extent_from_subquery: 'true'
- id: turning_circle_fill
<<: *extents
Datasource:
<<: *postgis
table: "( SELECT way \n FROM planet_osm_point\n WHERE highway = 'turning_circle'\n) AS data"
advanced:
extent_from_subquery: 'true'
- id: barrier_lines
<<: *extents
class: barriers
Datasource:
<<: *postgis
table: '(select way, barrier from planet_osm_line where barrier is not null) as data'
advanced:
extent_from_subquery: 'true'
- id: barrier_areas
<<: *extents
class: barriers
Datasource:
<<: *postgis
table: |-
( SELECT
way,barrier,"natural"
FROM
planet_osm_polygon
WHERE
barrier IS NOT NULL OR "natural"='hedge'
) AS barriers
advanced:
extent_from_subquery: 'true'
- id: power-poly
<<: *extents
class: power-poi
Datasource:
<<: *postgis
table: "(SELECT way, power AS type, tags->'generator:source' AS source, name FROM planet_osm_polygon WHERE power IS NOT NULL) as data"
advanced:
extent_from_subquery: 'true'
- id: power-line
<<: *extents
Datasource:
<<: *postgis
table: "(SELECT way, power AS type, tags->'generator:source' AS source, name FROM planet_osm_line WHERE power IS NOT NULL) as data"
advanced:
extent_from_subquery: 'true'
- id: power-point
<<: *extents
class: power-poi
Datasource:
<<: *postgis
table: "(SELECT way, power AS type, tags->'generator:source' AS source, name FROM planet_osm_point WHERE power IS NOT NULL) as data"
advanced:
extent_from_subquery: 'true'
- id: airport-point
<<: *extents
class: airport
Datasource:
<<: *postgis
table: "(select way,name,CASE WHEN tags ? 'iata' THEN 'airport' WHEN aeroway='aerodrome' THEN 'airfield' ELSE null END AS aeroway FROM planet_osm_point WHERE aeroway='aerodrome') as data"
advanced:
extent_from_subquery: 'true'
- id: airport-poly
<<: *extents
class: airport
Datasource:
<<: *postgis
table: "(select way,name,CASE WHEN tags ? 'iata' THEN 'airport' WHEN aeroway='aerodrome' THEN 'airfield' ELSE null END AS aeroway FROM planet_osm_polygon WHERE aeroway='aerodrome') as data"
advanced:
extent_from_subquery: 'true'
- id: poi-point
<<: *extents
class: poi
Datasource:
<<: *postgis
table: |-
( SELECT
way, name, COALESCE(amenity, leisure, shop, tourism, office, highway, tags->'emergency', barrier) AS main, man_made, religion,
CASE WHEN shop IS NOT NULL AND shop!='no' THEN shop ELSE NULL END AS shop,
tags->'craft' as craft, tags->'pump' as pump, tags->'drinking_water' as drinking_water, "tower:type", power, tags->'content' AS content, lower(operator) AS operator
FROM
planet_osm_point
WHERE
amenity IS NOT NULL OR shop IS NOT NULL OR tags ? 'craft'
OR tourism IN ('alpine_hut','camp_site','caravan_site','guest_house','hostel','hotel','motel','museum','viewpoint','bed_and_breakfast','information','chalet')
OR highway IN ('bus_stop','traffic_signals','ford', 'street_lamp')
OR man_made IN ('mast','water_tower', 'tower', 'water_well', 'watermill', 'storage_tank')
OR historic IN ('memorial','archaeological_site')
OR leisure IN ('playground','slipway', 'beach_resort')
OR office IN ('ngo', 'government') OR tags @> hstore ('emergency', 'fire_hydrant')
OR power IN ('generator', 'sub_station', 'tower', 'pole') OR barrier IN ('border_control')
) AS data
advanced:
extent_from_subquery: 'true'
- id: poi-poly
<<: *extents
class: poi
Datasource:
<<: *postgis
table: |-
( SELECT
way, name, COALESCE(amenity, leisure, shop, tourism, office, highway, tags->'emergency', barrier) AS main, man_made, religion,
CASE WHEN shop IS NOT NULL AND shop!='no' THEN shop ELSE NULL END AS shop,
tags->'craft' as craft, tags->'pump' as pump, tags->'drinking_water' as drinking_water, "tower:type",
power, tags->'content' AS content, lower(operator) AS operator
FROM
planet_osm_polygon
WHERE
amenity IS NOT NULL OR shop IS NOT NULL
OR tourism IN ('alpine_hut','camp_site','caravan_site','guest_house','hostel','hotel','motel','museum','viewpoint','bed_and_breakfast','information','chalet')
OR highway IN ('bus_stop','traffic_signals') OR historic in ('memorial','archaeological_site') OR leisure='playground'
OR power IN ('plant', 'sub_station') OR office IN ('ngo', 'government')
) AS data
advanced:
extent_from_subquery: 'true'
- id: low_place
<<: *extents
Datasource:
<<: *postgis
table: "( SELECT way, CASE WHEN place='country' THEN 1 WHEN capital='yes' AND admin_level='2' THEN 10 WHEN place='state' THEN 20 WHEN place='city' THEN 21 WHEN place='town' THEN 30 ELSE 100 END as prio, place AS type, name, z_order, CASE WHEN population ~ E'^\\d{1,9}$' THEN population::integer ELSE NULL END AS population, CASE WHEN capital='yes' AND admin_level='2' THEN 'country' ELSE NULL END AS is_capital FROM planet_osm_point WHERE place in ('country', 'state', 'city', 'town') AND place IS NOT NULL ORDER BY prio, population DESC NULLS LAST) AS data"
advanced:
extent_from_subquery: 'true'
- id: place
<<: *extents
Datasource:
<<: *postgis
table: "( SELECT way, CASE WHEN place='country' THEN 1 WHEN capital='yes' AND admin_level='2' THEN 10 WHEN place='state' THEN 20 WHEN place='town' THEN 30 WHEN place='village' THEN 40 ELSE 100 END as prio, place AS type, name, z_order, CASE WHEN population ~ E'^\\d{1,9}$' THEN population::integer ELSE NULL END AS population, CASE WHEN capital='yes' AND admin_level='2' THEN 'country' ELSE NULL END AS is_capital FROM planet_osm_point WHERE place in ('country', 'state', 'city', 'town', 'village', 'hamlet', 'suburb', 'neighbourhood', 'locality') AND place IS NOT NULL ORDER BY prio, population DESC NULLS LAST) AS data"
advanced:
extent_from_subquery: 'true'
- id: area_label
<<: *extents
Datasource:
<<: *postgis
table: '( SELECT COALESCE(landuse, leisure, "natural", highway, amenity, tourism) AS type, name, way_area AS area, ST_PointOnSurface(way) AS way FROM planet_osm_polygon WHERE name IS NOT NULL AND (landuse IS NOT NULL OR leisure IS NOT NULL OR "natural" IS NOT NULL) AND way && !bbox! AND ST_IsValid(way) ORDER BY area DESC) AS data'
advanced:
extent_from_subquery: 'true'
- id: motorway_label
<<: *extents
Datasource:
<<: *postgis
table: "( SELECT way, highway AS type, name, ref, CASE WHEN oneway IN ('yes', '-1') THEN oneway ELSE 'no' END AS oneway, CHAR_LENGTH(ref) AS reflen FROM planet_osm_line WHERE highway IN ('motorway', 'trunk') AND (name IS NOT NULL OR ref IS NOT NULL)) AS data"
advanced:
extent_from_subquery: 'true'
- id: mainroad_label
<<: *extents
Datasource:
<<: *postgis
table: "( SELECT way, highway AS type, name, CASE WHEN oneway IN ('yes', '-1') THEN oneway ELSE 'no' END AS oneway FROM planet_osm_line WHERE (name IS NOT NULL OR oneway IN ('yes', '-1')) AND highway IN ('primary', 'secondary', 'tertiary')) AS data"
advanced:
extent_from_subquery: 'true'
- id: minorroad_label
<<: *extents
Datasource:
<<: *postgis
table: >-
( SELECT way, highway AS type, name, CASE WHEN oneway IN ('yes', '-1')
THEN oneway ELSE 'no' END AS oneway FROM planet_osm_line WHERE (name IS
NOT NULL OR oneway IN ('yes', '-1')) AND highway IN ('residential',
'unclassified', 'road', 'living_street', 'unknown')
) AS data
advanced:
extent_from_subquery: 'true'
- id: admin-label-5-10
<<: *extents
Datasource:
<<: *postgis
table: |-
( SELECT
ST_Intersection(p.way, !bbox!) AS way, name, cast(regexp_replace(admin_level,'[^0-9]','','g') AS integer) AS admin_level
FROM
planet_osm_polygon p
WHERE
ST_Intersects(p.way,!bbox!) AND not ST_Covers(p.way, !bbox!)
AND boundary='administrative' AND admin_level IN ('5', '6', '7', '8', '9', '10')
ORDER BY
admin_level
) AS data
advanced:
extent_from_subquery: 'true'
- id: admin-label-1-4
<<: *extents
Datasource:
<<: *postgis
table: |-
( SELECT
ST_Intersection(p.way, !bbox!) AS way, name, cast(regexp_replace(admin_level,'[^0-9]','','g') AS integer) AS admin_level
FROM
planet_osm_polygon p
WHERE
ST_Intersects(p.way, !bbox!) AND not ST_Covers(p.way, !bbox!)
AND boundary='administrative' AND admin_level IN ('0', '2', '3', '4')
ORDER BY
admin_level
) AS data
advanced:
extent_from_subquery: 'true'
- id: waterway_label
<<: *extents
Datasource:
<<: *postgis
table: "( SELECT way, waterway AS type, name\n FROM planet_osm_line\n WHERE waterway IN ('canal', 'river', 'stream') \n AND name IS NOT NULL\n) AS data"
advanced:
extent_from_subquery: 'true'
- id: natural_point_label
<<: *extents
Datasource:
<<: *postgis
table: |-
( SELECT
way, "natural" AS type, name,
CASE WHEN ele ~ E'^\\d{1,5}$' THEN ele::integer ELSE null END as ele
FROM
planet_osm_point
WHERE
"natural" IS NOT NULL AND "natural" IN ('peak', 'bay', 'volcano')
ORDER BY ele DESC NULLS LAST
) AS data
advanced:
extent_from_subquery: 'true'
- id: housenumber
<<: *extents
Datasource:
<<: *postgis
table: " (select way,\"addr:housenumber\" AS housenumber, CASE WHEN \"addr:housenumber\" ~ E'^\\d+$' AND mod(\"addr:housenumber\"::bigint, 5) IN (0, 1) THEN 'yes' ELSE 'no' END AS mod5 FROM planet_osm_polygon WHERE \"addr:housenumber\" IS NOT NULL AND building IS NOT NULL UNION SELECT way,\"addr:housenumber\" AS housenumber, CASE WHEN \"addr:housenumber\" ~ E'^\\d+$' AND mod(\"addr:housenumber\"::bigint, 5) IN (0, 1) THEN 'yes' ELSE 'no' END AS mod5 FROM planet_osm_point WHERE \"addr:housenumber\" IS NOT NULL) as data"
advanced:
extent_from_subquery: 'true'
scale: 1
metatile: 8
attribution: 'Data © OpenStreetMap (and) contributors under ODbL 1.0'
description: ''
name: hdm
compareUrl: 'http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png'