This repository has been archived by the owner on Jul 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
data.yml
127 lines (127 loc) · 3.01 KB
/
data.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
_prefs:
disabled: []
inspector: false
mapid: ''
rev: ''
saveCenter: false
name: MBS compatible from ClearTables
description: A style designed for use with ClearTables
attribution: 'Data © OpenStreetMap contributors'
center:
- 0
- 0
- 4
minzoom: 0
maxzoom: 16
# Various parts to be included later on
_parts:
extents: &extents
extent: -20037508,-20037508,20037508,20037508
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"
osm2pgsql: &osm2pgsql
type: postgis
dbname: "gis"
key_field: ""
geometry_field: "way"
extent: "-20037508,-20037508,20037508,20037508"
Layer:
- id: water
geometry: polygon
<<: *extents
Datasource:
<<: *osm2pgsql
table: |-
(SELECT
way
FROM water_areas
WHERE way_area > 0.01*!pixel_width!::real*!pixel_height!::real
UNION ALL
SELECT
way
FROM ocean
) AS water
- id: waterway
geometry: linestring
<<: *extents
Datasource:
<<: *osm2pgsql
table: |-
(SELECT
way,
waterway::text AS class
-- todo: intermittent streams
FROM waterways
WHERE waterway IN ('river', 'canal')
OR (z(!scale_denominator!) >= 12 AND waterway IN ('stream'))
OR (z(!scale_denominator!) >= 14 AND waterway IN ('drain', 'ditch'))
ORDER BY layer
) AS waterways
properties:
minzoom: 8
- id: aeroway
# both line and poly
<<: *extents
Datasource:
<<: *osm2pgsql
table: |-
(SELECT
way,
aeroway AS type
FROM aeroway_line
) AS admin_line
properties:
minzoom: 2
- id: admin
geometry: linestring
<<: *extents
Datasource:
<<: *osm2pgsql
table: |-
(SELECT
way,
level admin_level,
0 AS maritime,
0 AS disputed
FROM admin_line
WHERE level BETWEEN 2 AND 4
) AS admin_line
properties:
minzoom: 9
- id: barrier_line
geometry: linestring
<<: *extents
Datasource:
<<: *osm2pgsql
table: |-
(SELECT
way,
CASE barrier
WHEN 'fence' THEN 'fence'
WHEN 'wall' THEN 'fence'
WHEN 'hedge' THEN 'hedge'
END AS class
FROM barrier_line
WHERE barrier IN ('fence', 'wall', 'hedge')
UNION ALL
SELECT
way,
'cliff' AS class
FROM landform_line
WHERE landform = 'cliff'
) AS barrier_line
properties:
minzoom: 12
- id: building
geometry: polygon
<<: *extents
Datasource:
<<: *osm2pgsql
table: |-
(SELECT
way
FROM buildings
WHERE way_area > 0.01*!pixel_width!::real*!pixel_height!::real
) AS buildings
properties:
minzoom: 12