-
-
Notifications
You must be signed in to change notification settings - Fork 115
/
planetilerspec.schema.json
120 lines (120 loc) · 3.75 KB
/
planetilerspec.schema.json
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
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/onthegomap/planetiler/main/planetiler-custommap/planetilerspec.schema.json",
"title": "Planetiler Specification",
"description": "Planetiler schema specification with example input features and the expected output features",
"type": "object",
"properties": {
"examples": {
"description": "A list of example input features, and the output vector tile features they should map to",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "Unique name for this test case",
"type": "string"
},
"input": {
"description": "The input feature from a source",
"type": "object",
"properties": {
"source": {
"description": "ID of the source this feature comes from",
"type": "string"
},
"geometry": {
"description": "Geometry type of the input feature",
"type": "string",
"enum": [
"polygon",
"line",
"point"
]
},
"tags": {
"description": "Key/value attributes on the source feature",
"oneOf": [
{
"type": "object"
},
{
"type": "null"
}
]
}
}
},
"output": {
"description": "The output vector tile feature(s) this map to, or [] for no features",
"oneOf": [
{
"$ref": "#/$defs/output"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/output"
}
}
]
}
}
}
}
},
"$defs": {
"output": {
"type": "object",
"properties": {
"layer": {
"description": "Vector tile layer of the expected output feature",
"type": "string"
},
"geometry": {
"description": "Geometry type of the expected output feature",
"$ref": "#/$defs/geometry"
},
"min_zoom": {
"description": "Min zoom level that the output feature appears in",
"type": "integer"
},
"max_zoom": {
"description": "Max zoom level that the output feature appears in",
"type": "integer"
},
"min_size": {
"description": "Minimum length of line features or square root of the minimum area of polygon features to emit below the maximum zoom-level of the map",
"type": "number"
},
"tags": {
"description": "Attributes expected on the output vector tile feature, or null if the attribute should not be set. Use allow_extra_tags: true to fail if any other tags appear besides the ones specified here",
"oneOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"allow_extra_tags": {
"description": "If true, then fail when extra attributes besides tags appear on the output feature. If false or unset then ignore them.",
"type": "boolean"
},
"at_zoom": {
"description": "Some attributes change by zoom level, so get values at this zoom level for comparison",
"type": "integer"
}
}
},
"geometry": {
"type": "string",
"enum": [
"polygon",
"line",
"point"
]
}
}
}