-
Notifications
You must be signed in to change notification settings - Fork 6
/
tests.yml
252 lines (245 loc) · 6.05 KB
/
tests.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
# yaml-language-server: $schema=https://raw.githubusercontent.com/onthegomap/planetiler/main/planetiler-custommap/planetilerspec.schema.json
# Tests cases for the overture profile that verify input features map to certain output vector tile features
# To run them:
# java -cp planetiler.jar Overture.java --tests overturelayers/tests.yml
# optionally, you can add --watch to watch this file and rerun on any changes
examples:
- name: buildings
input:
geometry: polygon
tags:
theme: buildings
type: building
height: 21.34
num_floors: 4
subtype: transportation
class: parking
has_parts: true
output:
layer: building
allow_extra_tags: false
min_zoom: 13
tags:
class: parking
height: 21.34
num_floors: 4
subtype: transportation
parts: has
- name: building part
input:
geometry: polygon
tags:
theme: buildings
type: building_part
height: 21.34
num_floors: 4
subtype: transportation
class: parking
output:
layer: building
allow_extra_tags: false
min_zoom: 14
tags:
class: parking
height: 21.34
num_floors: 4
subtype: transportation
parts: is
- name: river
input:
geometry: line
tags:
theme: base
type: water
subtype: river
class: river
is_salt: false
is_intermittent: false
names:
primary: Root River
output:
allow_extra_tags: false
layer: water
min_zoom: 9
tags:
class: river
is_intermittent: false
is_salt: false
subtype: river
name: Root River
- name: prominent river
input:
geometry: line
tags:
theme: base
type: water
subtype: river
class: river
names:
primary: Rio Sanatana
wikidata: Q7420045
output:
allow_extra_tags: false
min_zoom: 9
tags:
class: river
name: Rio Sanatana
subtype: river
- name: simple road with full length attributes
input:
geometry: line
tags:
theme: transportation
type: segment
subtype: road
class: residential
names:
primary: Nicola Street
speed_limits:
- max_speed:
value: 30
unit: mph
- min_speed:
value: 10
unit: kph
when:
recognized: ["as_private"]
road_surface:
- value: paved
access_restrictions:
- access_type: "denied"
when:
heading: backward
width_rules:
- value: 5.5
level_rules:
- value: 1
road_flags:
- values:
- is_bridge
lanes:
- value:
- direction: backward
- direction: forward
output:
allow_extra_tags: false
min_zoom: 14
tags:
class: residential
subtype: road
surface: paved
name: Nicola Street
is_bridge: true
max_speed: 30mph
min_speed: 10kph
min_speed_when: >-
{"recognized":["as_private"]}
access: denied
access_when: >-
{"heading":"backward"}
width: 5.5
lanes: >-
[{"direction":"backward"},{"direction":"forward"}]
level: 1
- name: simple road with partial length attributes
input:
geometry: line
tags:
theme: transportation
type: segment
subtype: road
class: residential
names:
primary: Nicola Street
speed_limits:
- max_speed:
value: 30
unit: mph
between: [0, 0.5]
- min_speed:
value: 10
unit: kph
when:
recognized: ["as_private"]
between: [0, 0.5]
access_restrictions:
- access_type: "denied"
when:
heading: backward
between: [0, 0.5]
width_rules:
- value: 5.5
between: [0, 0.5]
level_rules:
- value: 1
between: [0, 0.5]
road_surface:
- value: paved
between: [0, 0.5]
road_flags:
- values: [is_bridge]
between: [0, 0.5]
lanes:
- value:
- direction: backward
- direction: forward
between: [0, 0.5]
output:
- allow_extra_tags: false
min_zoom: 14
tags:
class: residential
subtype: road
surface: paved
is_bridge: true
name: Nicola Street
max_speed: 30mph
min_speed: 10kph
min_speed_when: >-
{"recognized":["as_private"]}
access: denied
access_when: >-
{"heading":"backward"}
width: 5.5
lanes: >-
[{"direction":"backward"},{"direction":"forward"}]
level: 1
- allow_extra_tags: false
min_zoom: 14
tags:
class: residential
subtype: road
name: Nicola Street
- name: simple road with partial name
input:
geometry: line
tags:
theme: transportation
type: segment
subtype: road
class: residential
names:
primary: Full Name
common:
es: Full Name ES
rules:
- variant: common
value: Partial Name
between: [0, 0.5]
- variant: common
language: "es"
value: Partial Name ES
between: [0, 0.5]
output:
- allow_extra_tags: false
tags:
name: Full Name
name:es: Full Name ES
class: residential
subtype: road
- allow_extra_tags: false
tags:
name: Partial Name
name:es: Partial Name ES
class: residential
subtype: road