forked from Ahlzen/TopOSM
-
Notifications
You must be signed in to change notification settings - Fork 1
/
features_water.mss
198 lines (179 loc) · 5.02 KB
/
features_water.mss
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
/* -*- css -*- */
#waterlines {
::mainline {
// rivers/canals
[zoom >= 7][waterway = 'river'],
[zoom >= 7][waterway = 'canal'][disused != 'yes'] {
line-color: @waterlinecolor;
line-join: round;
line-cap: round;
[zoom >= 7][zoom < 10] {
line-width: 0.5;
}
[zoom >= 10][zoom < 14] {
line-width: 0.8;
}
[zoom >= 14] {
line-width: 5;
}
}
// derelict canals
[zoom >= 14][waterway = 'derelict_canal'],
[zoom >= 14][waterway = 'canal'][disused = 'yes'] {
line-color: @waterlinecolor;
line-join: round;
line-cap: round;
[zoom >= 14][zoom < 15] {
line-width: 2;
line-dasharray: 15,5;
}
[zoom >= 15] {
line-width: 2;
line-dasharray: 30,10;
}
}
// streams
[zoom >= 10][waterway = 'stream'] {
line-color: @waterlinecolor;
line-join: round;
line-cap: round;
[zoom >= 10][zoom < 14] {
line-width: 0.5;
}
[zoom >= 14] {
line-width: 1.5;
}
}
// minor waterways
[zoom >= 14][waterway = 'drain'],
[zoom >= 14][waterway = 'ditch'],
[zoom >= 14][waterway = 'brook'] {
line-color: @waterlinecolor;
line-join: round;
line-cap: round;
line-width: 0.8;
}
}
::tunnels[tunnel = 'yes'] {
[zoom >= 11][waterway = 'river'],
[zoom >= 11][waterway = 'canal'][disused != 'yes'] {
line-color: @waterlinecolor;
line-join: round;
line-cap: round;
[zoom >= 11][zoom < 14] {
line-width: 1.6;
line-dasharray: 1.6,10;
}
[zoom >= 14] {
line-width: 8;
line-dasharray: 8,30;
}
}
[zoom >= 11][waterway = 'stream'] {
line-color: @waterlinecolor;
line-join: round;
line-cap: round;
[zoom >= 11][zoom < 14] {
line-width: 1;
line-dasharray: 2,15;
}
[zoom >= 14] {
line-width: 3;
line-dasharray: 3,20;
}
}
[zoom >= 14][waterway = 'drain'],
[zoom >= 14][waterway = 'ditch'],
[zoom >= 14][waterway = 'brook'] {
line-color: @waterlinecolor;
line-join: round;
line-cap: round;
line-width: 1.6;
line-dasharray: 1.6,10;
}
}
}
/*
* The water area rules are split into multiple layers for efficiency reasons.
* Each zoom level group has a clause in the selection SQL that excludes any
* polygons with an area less than the size of a single pixel. This is really
* important for the outline layers because the ST_Union() done on them gets
* more expensive the more polygons it hat to consider. It also helps the speed
* of the water fill layers, though the performance improvement isn't as marked.
*/
.waterareas_z2[zoom >= 2][zoom < 7] {
polygon-fill: @waterfillcolor;
}
.waterareas_z7[zoom >= 7][zoom < 9] {
polygon-fill: @waterfillcolor;
}
.waterareas_z9[zoom >= 9][zoom < 11] {
polygon-fill: @waterfillcolor;
}
.waterareas_z11[zoom >= 11][zoom < 14] {
polygon-fill: @waterfillcolor;
}
.waterareas_z14[zoom >= 14] {
polygon-fill: @waterfillcolor;
}
.waterareaoutlines_z7[zoom >= 7][zoom < 9] {
[way_area > 8000000] {
line-color: @waterlinecolor;
line-width: 0.4;
}
}
.waterareaoutlines_z9[zoom >= 9][zoom < 11] {
[way_area > 4000000] {
line-color: @waterlinecolor;
line-width: 0.5;
}
}
.waterareaoutlines_z11[zoom >= 11][zoom < 14] {
line-color: @waterlinecolor;
line-width: 0.8;
}
.waterareaoutlines_z14[zoom >= 14] {
line-color: @waterlinecolor;
line-width: 1.5;
}
.waterareaoutlines_intermittent[zoom >= 12] {
line-color: @waterlinecolor;
[zoom >= 12][zoom < 14] {
line-width: 0.8;
line-dasharray: 4,2;
}
[zoom >= 14] {
line-width: 1.5;
line-dasharray: 8,4;
}
}
.coastlines[zoom >= 6] {
line-color: @waterlinecolor;
line-join: round;
line-cap: round;
[zoom >= 6][zoom < 10] {
line-width: 0.5;
}
[zoom >= 10] {
line-width: 0.8
}
}
#waterlinefills {
[zoom >= 14][waterway = 'river'],
[zoom >= 14][waterway = 'canal'][disused != 'yes'] {
line-color: @waterfillcolor;
line-width: 2;
line-join: round;
line-cap: round;
}
}
#water-features {
[zoom >= 13][natural = 'wetland'] {
polygon-pattern-file: url('symbols/marsh.png');
}
[zoom >= 10][natural = 'glacier'] {
line-color: @glacierlinecolor;
line-width: 0.7;
line-dasharray: 5,5;
}
}