forked from usdot-jpo-ode/wzdx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SwzDeviceFeed.json
585 lines (585 loc) · 19.6 KB
/
SwzDeviceFeed.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
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
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
{
"$id": "https://raw.githubusercontent.com/usdot-jpo-ode/wzdx/main/schemas/4.0/SwzDeviceFeed.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "WZDx v4.0 SwzDeviceFeed",
"description": "The GeoJSON output of a WZDx smart work zone device data feed (v4.0)",
"type": "object",
"properties": {
"feed_info": {
"$ref": "https://raw.githubusercontent.com/usdot-jpo-ode/wzdx/main/schemas/4.0/FeedInfo.json"
},
"type": {
"description": "The GeoJSON type",
"enum": ["FeatureCollection"]
},
"features": {
"description": "An array of GeoJSON Feature objects which represent field devices deployed in a smart work zone",
"type": "array",
"items": {
"$ref": "#/definitions/FieldDeviceFeature"
}
},
"bbox": {
"$ref": "https://raw.githubusercontent.com/usdot-jpo-ode/wzdx/main/schemas/4.0/BoundingBox.json"
}
},
"required": ["feed_info", "type", "features"],
"definitions": {
"FieldDeviceFeature": {
"title": "Field Device Feature (GeoJSON Feature)",
"description": "The GeoJSON feature container for a WZDx field device",
"type": "object",
"properties": {
"id": {
"description": "A unique identifier issued by the data feed provider to identify the field device",
"type": "string"
},
"type": {
"description": "The GeoJSON object type; must be 'Feature'",
"enum": ["Feature"]
},
"properties": {
"type": "object",
"properties": {
"core_details": {
"$ref": "#/definitions/FieldDeviceCoreDetails"
}
},
"required": ["core_details"],
"oneOf": [
{
"$ref": "#/definitions/ArrowBoard"
},
{
"$ref": "#/definitions/Camera"
},
{
"$ref": "#/definitions/DynamicMessageSign"
},
{
"$ref": "#/definitions/FlashingBeacon"
},
{
"$ref": "#/definitions/HybridSign"
},
{
"$ref": "#/definitions/LocationMarker"
},
{
"$ref": "#/definitions/TrafficSensor"
}
]
},
"geometry": {
"oneOf": [
{
"$ref": "https://geojson.org/schema/Point.json"
}
]
},
"bbox": {
"$ref": "https://raw.githubusercontent.com/usdot-jpo-ode/wzdx/main/schemas/4.0/BoundingBox.json"
}
},
"required": ["id","type","properties","geometry"]
},
"FieldDeviceCoreDetails": {
"title": "Field Device Core Details",
"description": "The core details—both configuration and current state—of a field device that are shared by all types of field devices",
"type": "object",
"properties": {
"device_type": {
"$ref": "#/definitions/FieldDeviceType"
},
"data_source_id": {
"description": "Identifies the data source from which the field device information is sourced from",
"type": "string"
},
"road_names": {
"description": "A list of publicly known names of the road on which the field device is located. This may include the road number designated by a jurisdiction such as a county, state or interstate (e.g. I-5, VT 133)",
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
},
"device_status": {
"$ref": "#/definitions/FieldDeviceStatus"
},
"update_date": {
"description": "The UTC date and time (formatted according to RFC 3339, Section 5.6) when the field device data was last updated (e.g. 2020-11-03T19:37:00Z)",
"type": "string",
"format": "date-time"
},
"has_automatic_location": {
"description": "A yes/no value indicating if the field device location (parent FieldDeviceFeature's geometry) is determined automatically from an onboard GPS (true) or manually set/overidden (false)",
"type": "boolean"
},
"name": {
"type": "string",
"description": "A human-readable name for the field device"
},
"description": {
"type": "string",
"description": "A description of the field device."
},
"status_messages": {
"type": "array",
"description": "A list of messages associated with the device's status, if applicable. Used to provide additional information about the status such as specific warning or error message.",
"items": {
"type": "string"
}
},
"road_event_ids": {
"type": "array",
"description": "A list of one or more IDs of a RoadEventFeatures that the device is associated with",
"items": {
"type": "string"
}
},
"milepost": {
"type": "number",
"description": "The linear distance measured against a milepost marker along a roadway where the device is located"
},
"make": {
"type": "string",
"description": "The make or manufacturer of the device"
},
"model": {
"type": "string",
"description": "The model of the device"
},
"serial_number": {
"type": "string",
"description": "The serial number of the device"
},
"firmware_version": {
"type": "string",
"description": "The version of firmware the device is using to operate"
}
},
"required": [
"device_type",
"data_source_id",
"road_names",
"device_status",
"update_date",
"has_automatic_location"
]
},
"ArrowBoard": {
"title": "Arrow Board Field Device",
"description": "An electronic, connected arrow board which can display an arrow pattern to direct traffic",
"type": "object",
"allOf": [
{
"properties": {
"core_details": {
"properties": {
"device_type": {
"const": "arrow-board"
}
},
"required": ["device_type"]
}
},
"required": ["core_details"]
},
{
"properties": {
"core_details": {
"$ref": "#/definitions/FieldDeviceCoreDetails"
},
"pattern": {
"$ref": "#/definitions/ArrowBoardPattern"
},
"is_moving": {
"type": "boolean",
"description": "A yes/no value indicating if the arrow board is actively moving (not statically placed) as part of a mobile work zone operation."
},
"is_in_transport_position": {
"type": "boolean",
"description": "A yes/no value indicating if the arrow board is in the stowed/transport position (true) or deployed/upright position (false)"
}
},
"required": [
"core_details",
"pattern"
]
}
]
},
"Camera": {
"title": "Camera Field Device",
"description": "A camera device deployed in the field, capable of capturing still images",
"type": "object",
"allOf": [
{
"properties": {
"core_details": {
"properties": {
"device_type": {
"const": "camera"
}
},
"required": ["device_type"]
}
},
"required": ["core_details"]
},
{
"properties": {
"core_details": {
"$ref": "#/definitions/FieldDeviceCoreDetails"
},
"image_url": {
"type": "string",
"format": "uri",
"description": "A URL pointing to an image file for the camera image still"
},
"image_timestamp": {
"type": "string",
"format": "date-time",
"description": "The UTC date and time when the image was captured"
}
},
"required": [
"core_details"
],
"dependencies": {
"image_url": [
"image_timestamp"
]
}
}
]
},
"DynamicMessageSign": {
"title": "Dynamic Message Sign Field Device",
"description": "An electronic traffic sign deployed on the roadway, used to provide information to travelers",
"allOf": [
{
"properties": {
"core_details": {
"properties": {
"device_type": {
"const": "dynamic-message-sign"
}
},
"required": ["device_type"]
}
},
"required": ["core_details"]
},
{
"properties": {
"core_details": {
"$ref": "#/definitions/FieldDeviceCoreDetails"
},
"message_multi_string": {
"type": "string",
"description": "A MULTI-formatted string describing the message currently posted to the sign"
}
},
"required": [
"core_details",
"message_multi_string"
]
}
]
},
"FlashingBeacon": {
"title": "Flashing Beacon Field Device",
"description": "A flashing beacon light of any form (e.g. trailer-mounted, vehicle), used to indicate something and capture driver attention",
"allOf": [
{
"properties": {
"core_details": {
"properties": {
"device_type": {
"const": "flashing-beacon"
}
},
"required": ["device_type"]
}
},
"required": ["core_details"]
},
{
"properties": {
"core_details": {
"$ref": "#/definitions/FieldDeviceCoreDetails"
},
"function": {
"$ref": "#/definitions/FlashingBeaconFunction"
},
"is_flashing": {
"type": "boolean",
"description": "A yes/no value indicating if the flashing beacon is currently in use and flashing"
}
},
"required": [
"core_details",
"function"
]
}
]
},
"HybridSign": {
"title": "Hybrid Sign Field Device",
"description": "A hybrid sign that contains static text (e.g. on an aluminum sign) along with a single electronic message display, used to provide information to travelers",
"type": "object",
"allOf": [
{
"properties": {
"core_details": {
"properties": {
"device_type": {
"const": "hybrid-sign"
}
},
"required": ["device_type"]
}
},
"required": ["core_details"]
},
{
"properties": {
"core_details": {
"$ref": "#/definitions/FieldDeviceCoreDetails"
},
"dynamic_message_function": {
"$ref": "#/definitions/HybridSignDynamicMessageFunction"
},
"dynamic_message_text": {
"type": "string",
"description": "A text representation of the message currently posted to the dynamic electronic component of the hybrid sign"
},
"static_sign_text": {
"type": "string",
"description": "The static text on the non-electronic component of the hybrid sign"
}
},
"required": [
"core_details",
"dynamic_message_function"
]
}
]
},
"LocationMarker": {
"title": "Location Marker Field Device",
"description": "Any GPS-enabled ITS device that is placed at a point on a roadway to dynamically know the location of something (often the beginning or end of a work zone)",
"type": "object",
"allOf": [
{
"properties": {
"core_details": {
"properties": {
"device_type": {
"const": "location-marker"
}
},
"required": ["device_type"]
}
},
"required": ["core_details"]
},
{
"properties": {
"core_details": {
"$ref": "#/definitions/FieldDeviceCoreDetails"
},
"marked_locations": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/MarkedLocation"
}
}
},
"required": ["core_details", "marked_locations"]
}
]
},
"MarkedLocation": {
"title": "Marked Location",
"description": "Describes a specific location where a LocationMarker is placed, such as the start or end of a work zone road event",
"properties": {
"type": {
"$ref": "#/definitions/MarkedLocationType"
},
"road_event_id": {
"type": "string",
"description": "The ID of a RoadEventFeature that the MarkedLocation applies to"
}
},
"required": ["type"]
},
"TrafficSensor": {
"title": "Traffic Sensor Field Device",
"description": "A traffic sensor deployed on a roadway which captures traffic metrics (e.g. speed, volume, occupancy) over a collection interval",
"type": "object",
"allOf": [
{
"properties": {
"core_details": {
"properties": {
"device_type": {
"const": "traffic-sensor"
}
},
"required": ["device_type"]
}
},
"required": ["core_details"]
},
{
"properties": {
"core_details": {
"$ref": "#/definitions/FieldDeviceCoreDetails"
},
"collection_interval_start_date": {
"type": "string",
"format": "date-time",
"description": "The UTC date and time where the TrafficSensor data collection started. The averages and totals contained in the TrafficSensor data apply to the inclusive interval of 'collection_interval_start_date' to 'collection_interval_end_date'"
},
"collection_interval_end_date": {
"type": "string",
"format": "date-time",
"description": "The UTC date and time where the TrafficSensor data collection ended. The averages and totals contained in the TrafficSensor data apply to the inclusive interval of 'collection_interval_start_date' to 'collection_interval_end_date'"
},
"average_speed_kph": {
"type": "integer",
"minimum": 0,
"description": "The average speed of vehicles across all lanes over the collection interval in kilometers per hour"
},
"volume_vph": {
"type": "integer",
"minimum": 0,
"description": "The rate of vehicles passing by the sensor during the collection interval in vehicles per hour"
},
"occupancy_percent": {
"type": "integer",
"minimum": 0,
"description": "The percent of time the roadway section monitored by the sensor was occupied by a vehicle over the collection interval"
},
"lane_data": {
"type": "array",
"items": {
"$ref": "#/definitions/TrafficSensorLaneData"
}
}
},
"required": [
"core_details",
"collection_interval_start_date",
"collection_interval_end_date"
]
}
]
},
"TrafficSensorLaneData": {
"title": "Traffic Sensor Lane Data",
"description": "data for a single lane within a RoadEvent measured by a TrafficSensor deployed on the roadway",
"properties": {
"road_event_id": {
"type": "string",
"description": "The ID of a RoadEventFeature that the measured lane occurs in"
},
"lane_order": {
"type": "integer",
"minimum": 1,
"description": "The lane's position in sequence within the road event specified by the 'road_event_id' property"
},
"average_speed_kph": {
"type": "integer",
"minimum": 1,
"description": "The average speed of traffic in the lane over the collection interval (in kilometers per hour)"
},
"volume_vph": {
"type": "integer",
"minimum": 0,
"description": "The rate of vehicles passing by the sensor in the lane during the collection interval (in vehicles per hour)"
},
"occupancy_percent": {
"type": "integer",
"minimum": 0,
"description": "The percent of time the lane monitored by the sensor was occupied by a vehicle over the collection interval"
}
},
"required": [
"road_event_id",
"lane_order"
]
},
"ArrowBoardPattern": {
"title": "Arrow Board Pattern Enumerated Type",
"description": "a list of options for the posted pattern on an ArrowBoard",
"enum": [
"bidirectional-arrow-flashing",
"bidirectional-arrow-static",
"blank",
"diamonds-alternating",
"four-corners-flashing",
"left-arrow-flashing",
"left-arrow-sequential",
"left-arrow-static",
"left-chevron-flashing",
"left-chevron-sequential",
"left-chevron-static",
"line-flashing",
"right-arrow-flashing",
"right-arrow-sequential",
"right-arrow-static",
"right-chevrons-flashing",
"right-chevrons-sequential",
"right-chevrons-static",
"unknown"
]
},
"FieldDeviceType": {
"title": "Field Device Type Enumerated Type",
"description": "The type of field device",
"enum": [
"arrow-board",
"camera",
"dynamic-message-sign",
"flashing-beacon",
"hybrid-sign",
"location-marker",
"traffic-sensor"
]
},
"FieldDeviceStatus": {
"title": "Field Device Status Enumerated Type",
"description": "The operational status of a field device",
"enum": ["ok", "warning", "error", "unknown"]
},
"FlashingBeaconFunction": {
"title": "Flashing Beacon Function Enumerated Type",
"description": "Options for what a FlashingBeacon is being used to indicate",
"enum": ["vehicle-entering", "queue-warning", "reduced-speed", "workers-present"]
},
"HybridSignDynamicMessageFunction": {
"title": "Hybrid Sign Dynamic Message Function Enumerated Type",
"description": "Options for the function of the dynamic message displayed by the electronic display on a HybridSign",
"enum": ["speed-limit", "travel-time", "other"]
},
"MarkedLocationType": {
"title": "Marked Location Type Enumerated Type",
"description": "Options for what a MarkedLocation can mark, such as the start or end of a road event",
"enum": [
"afad",
"flagger",
"lane-shift",
"lane-closure",
"temporary-traffic-signal",
"road-event-start",
"road-event-end",
"work-zone-start",
"work-zone-end"
]
}
}
}