Wzdx.Models
0.3.0
dotnet add package Wzdx.Models --version 0.3.0
NuGet\Install-Package Wzdx.Models -Version 0.3.0
<PackageReference Include="Wzdx.Models" Version="0.3.0" />
<PackageVersion Include="Wzdx.Models" Version="0.3.0" />
<PackageReference Include="Wzdx.Models" />
paket add Wzdx.Models --version 0.3.0
#r "nuget: Wzdx.Models, 0.3.0"
#:package Wzdx.Models@0.3.0
#addin nuget:?package=Wzdx.Models&version=0.3.0
#tool nuget:?package=Wzdx.Models&version=0.3.0
<img src="https://github.com/usdot-jpo-ode/wzdx/blob/main/images/wzdx_logo_blue_orange_x.png" height="150"/>
Work Zone Data Exchange (WZDx) Specification
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.
The goal of WZDx is to enable widespread access to up-to-date information about dynamic conditions occurring on roads such as construction events. Currently, many IOOs maintain data on work zone activity. However, a lack of common data standards and convening mechanisms makes it difficult and costly for third parties such as original equipment manufacturers (OEMs) and navigation applications to access and use these data across various jurisdictions. WZDx defines a common language for describing work zone information. This simplifies the design process for producers and the processing logic for consumers and makes work zone data more accessible.
Specifically, WZDx defines the structure and content of several GeoJSON documents that are each intended to be distributed as a data feed. The feeds describe a variety of high-level road work-related information such as the location and status of work zones, detours, and field devices.
WZDX Models
This project contains various classes and builders used to build WZDx 3.x and 4.2 feeds.
License
The Washington State Department of Transportation created this project as part of a federal grant to expand the use of the WZDx specification. The WZDx.Models library and code is now licensed under the CC0-1.0, just like the specification format it creates.
All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with the waiver of copyright interest. See LICENSE for more details.
Namespaces
GeoJson
- Converters
- Geometries
v3
- Feeds
- WorkZones (RoadEvents)
v4
- Feeds
- Devices
- WorkZones (RoadEvents, e.g., Detours, Restrictions, WorkZones )
Builders
- v4
Usage
Model objects in this package can be used independently to create a feed. However, it is highly encourged that you build your WZDx feed using the built in builder classes.
These builders ensure a valid feed output is generated.
Example: Creating a v4 workzone/detour (wzdxfeed) feed can be done using the builder classes either individually or fluently:
Converting to Json
The models and converters designed within make use of Newtonsoft Json serialization and it is recommended to use over the .Net Json serializer.
Using individual builders:
var feedBuilder = RoadEventFeedBuilder.Factory("wsdot").Create();
var sourceBuilder = new RoadEventSourceBuilder("wsdot-cia");
feedBuilder = feedBuilder.WithSource(sourceBuilder);
var featureBuilder = new WorkZoneRoadEventFeatureBuilder("wsdot-wzdb",
"work-zone-002E",
"SR-90", Direction.Eastbound);
featureBuilder = featureBuilder.WithGeometry(MultiPoint.FromCoordinates(new[] { Position.From(0, 0), Position.From(10, 10) }));
sourceBuilder = sourceBuilder.WithFeature(featureBuilder);
RoadEventsFeed wzdx = feedBuilder.Result();
Using fluent builder interface:
RoadEventsFeed wzdx = RoadEventFeedBuilder
.Factory("wsdot")
.Create()
.WithSource("wsdot-wzdb", sourceBuilder => sourceBuilder
.WithFeature("work-zone-001N", feature => feature
.WorkZone("SR-5", Direction.Northbound, MultiPoint.FromCoordinates(new[] { Position.From(0, 0), Position.From(10, 10) }))
/* additional feature details */
)
.WithFeature("work-zone-001S", feature => feature
.WorkZone("SR-5", Direction.Southbound, MultiPoint.FromCoordinates(new[] { Position.From(0, 0), Position.From(10, 10) }))
/* additional feature details */
)
.WithFeature("detour-001S", feature => feature
.Detour("SR-5", Direction.Northbound, LineString.FromCoordinates(new[] { Position.From(0, 0), Position.From(10, 10) }))
/* additional feature details */
))
.Result();
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Newtonsoft.Json (>= 13.0.3)
- System.ComponentModel.Annotations (>= 5.0.0)
-
.NETStandard 2.1
- Newtonsoft.Json (>= 13.0.3)
- System.ComponentModel.Annotations (>= 5.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.