The Work Zone Data Exchange (WZDx) Specification aims to make harmonized work zone data provided by infrastructure owners and operators (IOOs) available for third party use, making travel on public roads safer and more efficient through ubiquitous access to data on work zone activity.
Creative Commons Zero v1.0 Universal
92
stars
62
forks
source link
Replace the subidentifier field with a Relationship object #108
Replace the subidentifier field with a Relationship object
The specification currently uses the road_events.subidentifier field as a foreign key to relate objects. However, the field does not explicitly describe how linked features are related. Replacing road_events.subidentifier with a Relation object, like the one used in JSCalendar, will relate road event features and explicitly describe how features are related.
The Relationship object as defined in the JSCalendar Specification.
A Relation object defines the relation to other objects, using a possibly empty set of relation types. The object that defines this relation is the linking object, while the other object is the linked object.
The Relation object has the following properties:
@type: "String" (mandatory)
Specifies the type of this object. This MUST be "Relation".
Describes how the linked object is related to the linking object. The relation is defined as a set of relation types. If empty, the relationship between the two objects is unspecified. Keys in the set MUST be one of the following values, or specified in the property definition where the Relation object is used, or a value registered in the IANA JSCalendar Enum Registry, or a vendor-specific value:
"first": The linked object is the first in a series the linking object is part of.
"next": The linked object is the next in a series the linking object is part of.
"child": The linked object is a subpart of the linking object.
"parent": The linking object is a subpart of the linked object.
The value for each key in the set MUST be true.
The Relationship object used in the Work Zone Data Specification.
Hierarchical Example
In the example below, the first road event feature ("road_event_id": "1") is the parent of the second, third, and fourth features ("road_event_id": "2", "road_event_id": "3", "road_event_id": "4")
Note the relationship in the first feature ("road_event_id": "1") can be left blank. The children can point to the parent with the same effect.
The example below shows how to relate and order road event features.
The first road event feature ("road_event_id": "1") begins the sequence and identifies the second feature ("road_event_id": "2") as next in the sequence.
The second feature identifies the first feature ("road_event_id": "1") as the beginning of the sequence and the third feature ("road_event_id": "3") as next in the sequence.
The third feature identifies the first feature ("road_event_id": "1") as the beginning of the sequence and the fourth feature ("road_event_id": "4") as next in the sequence.
The fourth feature identifies the first feature ("road_event_id": "1") as the beginning of the sequence.
Replace the subidentifier field with a Relationship object
The specification currently uses the road_events.subidentifier field as a foreign key to relate objects. However, the field does not explicitly describe how linked features are related. Replacing road_events.subidentifier with a Relation object, like the one used in JSCalendar, will relate road event features and explicitly describe how features are related.
The Relationship object as defined in the JSCalendar Specification.
A Relation object defines the relation to other objects, using a possibly empty set of relation types. The object that defines this relation is the linking object, while the other object is the linked object.
The Relation object has the following properties:
Specifies the type of this object. This MUST be "Relation".
Describes how the linked object is related to the linking object. The relation is defined as a set of relation types. If empty, the relationship between the two objects is unspecified. Keys in the set MUST be one of the following values, or specified in the property definition where the Relation object is used, or a value registered in the IANA JSCalendar Enum Registry, or a vendor-specific value:
The value for each key in the set MUST be true.
The Relationship object used in the Work Zone Data Specification.
Hierarchical Example
Sequential Example