Closed DeraldDudley closed 2 years ago
@DeraldDudley thanks for starting this PR. I agree that separating the road event core information from the properties specific to the type of road event is important for scalability. I generally support the changes described in the PR comment.
I skimmed the files changed but have not reviewed in depth yet. As you noted in the "Changes in this PR", the PR is not complete/should not be merged as the examples and several READMEs need to be updated and that cannot happen without the other v4.0 changes being completed first. If this was merged there would be massive merge conflicts requiring hours of manually merging as the other v4.0 changes were merged. Thus I converted this PR to a draft to clarify it is not ready to be merged into the release branch.
Updates following spec update subgroup meeting:
core_details
property where the value is the RoadEventCoreDetails objectAs I was working on the PR for the smart work zone field devices (see #195), I had a thought regarding the name of the work zone road event. In this PR the object is named WorkZoneEvent
. I first thought, how about WorkZoneRoadEvent
, as it is more clear, since it is a road event with type work-zone
. The WorkZoneRoadEvent
name makes it easy to tell that the object is a type of road event and will contain the RoadEventCoreDetails
and occur within a RoadEventFeature
.
I then thought, maybe the benefit of the suffix convention doesn't matter that much and the object should just be called WorkZone
.
Edit: WorkZone is not as semantic as a WorkZoneRoadEvent may not be a work zone itself, just part of a work zone.
In summary, I like am fine with WorkZone
or WorkZoneRoadEvent
more thanWorkZoneEvent
.
Regarding the following:
Rename WZDxFeed to RoadEventFeed: This is an editorial change and has no effect on feed publication. Recommended because it aligns with the specification’s naming conventions and it more accurately reflects what the feeds are.
A concern with this change is that it precludes this feed from being able to include any other features except road events. Changing the name of the WZDxFeed
to RoadEventFeed
is taking the approach that a "feed" should be defined by the content, rather than the use case or intended consumer (see this comment in #191).
So let's step back to the definition of a feed: a feed is a is a way of delivering structured data from one system to another. In WZDx, the structure of the data provided by a feed is defined by a single object (containing many sub-objects) which appears the content of a GeoJSON file. In WZDx, the root (highest level) object is a GeoJSON FeatureCollection containing information about the feed (RoadEventFeedInfo) and a list of RoadEventFeatures.
New feeds that were discussed, such as a structures feed, field devices feed, or smart work zones only differ by what types of features they allow in the "features" array of the feed (FeatureCollection) object. Specifically, the RoadEventFeed allows only RoadEventFeatures, the smart work zones feed allows RoadEventFeatures and FieldDeviceFeatures, and the field devices feed allows only FieldDeviceFeatures. Maybe the "WZDxFeed" can be a comprehensive feed allowing all types of features defined in WZDx.
Or, WZDx can just define one feed (the WZDxFeed) and separating that feed into smaller feeds with sub-sets of content is outside the realm of the specification and up to the producer. For example, a producer could provide a URL which is a WZDx feed that contains only work zones, another URL for a feed with just restrictions, and another for field devices. All feeds would be valid WZDx feeds, however, the WZDx spec only defines the one feed that could contain all information.
We have to make a decision on this before this PR or the PR for #195 can be finalized.
@DeraldDudley I created #209 to supersede this PR and tagged you as a reviewer.
Normalize the RoadEvent Object
The RoadEvent object, in version 3.1 of the Work Zone Data Specification comingles Road Events, Work Zone Events, and Detour Events in a single class. Comingling objects in a single class deviates from the well-established best practice of data normalization. Normalization is important in data design because it reduces redundant data storage, retrieval, maintenance, and exchange.
Normalization is important to the Work Zone Data Working group because it eliminates the unnecessary exchange of unneeded, or unwanted, data and enables the publication of basic features like named roads or restrictions. Without normalization, the required fields of the work-zone event prohibit the specification from being used to publish anything other than a Work Zone Feature or a related Detour Feature. In the case of publishing a Detour, it forces the use of unneeded and irrelevant properties to describe a detour. This makes the specification inflexible and hard to scale. With normalization the specification becomes flexible, easy to scale, can be used to address non-work-zone related use-cases, and maximizes the specifications social benefit.
Normalizing the content of the specification's data model will split the RoadEvent object. The first derivative is a “minimum-content” version of the RoadEvent which requires only the properties necessary to publish a named road segment. The second derivative is the newly formatted work-zone feature. The new format nests the “minimum-content” RoadEvent within the work-zone feature and carries only the properties needed to describe a work-zone. The last derivative, a normalized Detour feature, nests the “minimum-content” RoadEvent within the detour feature and carries only the properties needed to describe a detour.
Changes to the Road Event Object
Requirements: Carry only the properties necessary to locate and describe the simplest use-case of mapping a named road segment.
RoadEvent Object
The
RoadEvent
object contains the minimum-content needed to locate a named road segment.Properties
event_type
data_source_id
data_source_id
property of a RoadEventDataSource included within the same WZDx GeoJSON document.road_names
road_name
is not provided.road_number
androad_name
properties and conformance will be required in a future release.direction
northbound
(for I-5 North)relationship
description
creation_date
2016-11-03T19:37:00Z
.update_date
2016-11-03T19:37:00Z
.Used By
properties
road_event
road_event
road_event
Important Notes
The value of the
RoadEvent
'sdata_source_id
property MUST match the value of thedata_source_id
property of a RoadEventDataSource that is included in the same WZDx GeoJSON document.Changes to the Work-Zone Event Object
Requirements: Include the RoadEvent object and carry only the properties necessary to describe the a work-zone segment.
WorkZoneEvent Object
The
WorkZoneEvent
object contains information that describes where, when, and what activities are taking place in a work-zone, along a road segment.Properties
road_event
start_date
2016-11-03T19:37:00Z
.end_date
2016-11-03T19:37:00Z
.start_date_accuracy
end_date_accuracy
beginning_accuracy
ending_accuracy
vehicle_impact
lanes
beginning_cross_street
ending_cross_street
beginning_milepost
lrs_type
property on the RoadEventDataSource object.ending_milepost
lrs_type
property on the RoadEventDataSource object.event_status
types_of_work
workers_present
reduced_speed_limit
restrictions
Used By
properties
Important Notes
None
Changes to the Detour Event Object
Requirements: Include the RoadEvent object and carry only the properties necessary to describe a detour segment.
DetourEvent Object
The
DetourEvent
object contains information that describes where, when, and what activity are taking place in a detour, along a road segment.Properties
road_event
start_date
2016-11-03T19:37:00Z
.end_date
2016-11-03T19:37:00Z
.start_date_accuracy
end_date_accuracy
beginning_cross_street
ending_cross_street
beginning_milepost
lrs_type
property on the RoadEventDataSource object.ending_milepost
lrs_type
property on the RoadEventDataSource object.event_status
Used By
properties
Important Notes
None
Changes in P.R.
Normalize Road Event: This is a major change that breaks backwards compatibility. Recommended to foster scalability and for data storage, exchange, and publication efficiency. This action derives/creates: 1.1. A normalized RoadEvent feature 1.2. A new event_type value called “road” so a RoadEvent object can be instantiated. 1.3. A Normalized WorkZoneEvent 1.4. A Normalized DetourEvent
Rename WZDxFeed to RoadEventFeed: This is an editorial change and has no effect on feed publication. Recommended because it aligns with the specification’s naming conventions and it more accurately reflects what the feeds are.
Update Examples (Not included in this pull request): Update examples to reflect new data model and formatting. I did not attempt this because I’m not sue what the other pull requests are changing.
Update Data Model (Not included in this pull request): I did not attempt this because I’m not sue what the other pull requests are changing. 4.1. Update the RoadEvent, WorkZoneEvent, and DetourEvent objects in the data model. Ensures the specification and the model agree. 4.2. Insert the RoadEventFeatureCollection: This is an editorial change and has no effect on feed publication. Recommended because it more accurately reflect how the feeds are publish and better aligns with the GeoJSON specification