Skip to content

Commit 894e7bc

Browse files
testowerjosee-sabourin
authored andcommitted
Fix geofencing_zones ref MobilityData/gbfs#308 and MobilityData/gbfs@c89f7ba (#44)
(cherry picked from commit a53af4a)
1 parent 35775c8 commit 894e7bc

File tree

1 file changed

+105
-107
lines changed

1 file changed

+105
-107
lines changed

geofencing_zones.json

Lines changed: 105 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -31,129 +31,127 @@
3131
"type": "object",
3232
"properties": {
3333
"geofencing_zones": {
34-
"type": "array",
35-
"items": {
36-
"type": "object",
37-
"properties": {
38-
"type": {
39-
"description": "FeatureCollection as per IETF RFC 7946.",
40-
"type": "string",
41-
"enum": [
42-
"FeatureCollection"
43-
]
44-
},
45-
"features": {
46-
"description": "Array of objects.",
47-
"type": "array",
48-
"items": {
49-
"title": "GeoJSON Feature",
50-
"type": "object",
34+
"type": "object",
35+
"description": "Each geofenced zone and its associated rules and attributes is described as an object within the array of features.",
36+
"properties": {
37+
"type": {
38+
"description": "FeatureCollection as per IETF RFC 7946.",
39+
"type": "string",
40+
"enum": [
41+
"FeatureCollection"
42+
]
43+
},
44+
"features": {
45+
"description": "Array of objects.",
46+
"type": "array",
47+
"items": {
48+
"title": "GeoJSON Feature",
49+
"type": "object",
50+
"properties": {
51+
"type": {
52+
"type": "string",
53+
"enum": [
54+
"Feature"
55+
]
56+
},
5157
"properties": {
52-
"type": {
53-
"type": "string",
54-
"enum": [
55-
"Feature"
56-
]
57-
},
58+
"description": "Describing travel allowances and limitations.",
59+
"type": "object",
5860
"properties": {
59-
"description": "Describing travel allowances and limitations.",
60-
"type": "object",
61-
"properties": {
62-
"name": {
63-
"description": "Public name of the geofencing zone.",
64-
"type": "string"
65-
},
66-
"start": {
67-
"description": "Start time of the geofencing zone in POSIX time.",
68-
"type": "number",
69-
"minimum": 1450155600
70-
},
71-
"end": {
72-
"description": "End time of the geofencing zone in POSIX time.",
73-
"type": "number",
74-
"minimum": 1450155600
75-
},
76-
"rules": {
77-
"description": "Array that contains one object per rule.",
78-
"type": "array",
79-
"items": {
80-
"type":"object",
81-
"properties": {
82-
"vehicle_type_id": {
83-
"type": "array",
84-
"description": "Array of vehicle type IDs for which these restrictions apply.",
85-
"items": {"type": "string"}
86-
},
87-
"ride_allowed": {
88-
"description": "Is the undocked ride allowed to stat and end in this zone?",
89-
"type": "boolean"
90-
},
91-
"ride_through_allowed": {
92-
"description": "Is the ride allowed to travel through this zone?",
93-
"type": "boolean"
94-
},
95-
"maximum_speed_kph": {
96-
"description": "What is the maximum speed allowed, in kilometers per hour?",
97-
"type": "number",
98-
"minimum": 0
99-
}
61+
"name": {
62+
"description": "Public name of the geofencing zone.",
63+
"type": "string"
64+
},
65+
"start": {
66+
"description": "Start time of the geofencing zone in POSIX time.",
67+
"type": "number",
68+
"minimum": 1450155600
69+
},
70+
"end": {
71+
"description": "End time of the geofencing zone in POSIX time.",
72+
"type": "number",
73+
"minimum": 1450155600
74+
},
75+
"rules": {
76+
"description": "Array that contains one object per rule.",
77+
"type": "array",
78+
"items": {
79+
"type":"object",
80+
"properties": {
81+
"vehicle_type_id": {
82+
"type": "array",
83+
"description": "Array of vehicle type IDs for which these restrictions apply.",
84+
"items": {"type": "string"}
10085
},
101-
"required": [
102-
"ride_allowed",
103-
"ride_through_allowed"
104-
]
105-
}
86+
"ride_allowed": {
87+
"description": "Is the undocked ride allowed to stat and end in this zone?",
88+
"type": "boolean"
89+
},
90+
"ride_through_allowed": {
91+
"description": "Is the ride allowed to travel through this zone?",
92+
"type": "boolean"
93+
},
94+
"maximum_speed_kph": {
95+
"description": "What is the maximum speed allowed, in kilometers per hour?",
96+
"type": "number",
97+
"minimum": 0
98+
}
99+
},
100+
"required": [
101+
"ride_allowed",
102+
"ride_through_allowed"
103+
]
106104
}
107105
}
108-
},
109-
"geometry": {
110-
"description": "A polygon that describes where rides might not be able to start, end, go through, or have otehr limitations. Must follow the right-hand rule.",
111-
"title": "GeoJSON MultiPolygon",
112-
"type": "object",
113-
"properties": {
114-
"type": {
115-
"type": "string",
116-
"enum": [
117-
"MultiPolygon"
118-
]
119-
},
120-
"coordinates": {
106+
}
107+
},
108+
"geometry": {
109+
"description": "A polygon that describes where rides might not be able to start, end, go through, or have otehr limitations. Must follow the right-hand rule.",
110+
"title": "GeoJSON MultiPolygon",
111+
"type": "object",
112+
"properties": {
113+
"type": {
114+
"type": "string",
115+
"enum": [
116+
"MultiPolygon"
117+
]
118+
},
119+
"coordinates": {
120+
"type": "array",
121+
"items": {
121122
"type": "array",
122123
"items": {
123124
"type": "array",
125+
"minItems": 4,
124126
"items": {
125127
"type": "array",
126-
"minItems": 4,
128+
"minItems": 2,
127129
"items": {
128-
"type": "array",
129-
"minItems": 2,
130-
"items": {
131-
"type": "number"
132-
}
130+
"type": "number"
133131
}
134132
}
135133
}
136134
}
137-
},
138-
"required": [
139-
"type",
140-
"coordinates"
141-
]
142-
}
143-
},
144-
"required": [
145-
"type",
146-
"geometry",
147-
"properties"
148-
]
149-
}
135+
}
136+
},
137+
"required": [
138+
"type",
139+
"coordinates"
140+
]
141+
}
142+
},
143+
"required": [
144+
"type",
145+
"geometry",
146+
"properties"
147+
]
150148
}
151-
},
152-
"required": [
153-
"type",
154-
"features"
155-
]
156-
}
149+
}
150+
},
151+
"required": [
152+
"type",
153+
"features"
154+
]
157155
}
158156
}
159157
}

0 commit comments

Comments
 (0)