Example Traffic Flow DATEX II Response
This section breaks down the DATEX II Flow XML Response. The Traffic Flow Response is a DATEX II Class B Extension. This extension is still compatible with the non- extended version of DATEX II (Class A). Therefore, for ElaboratedData (Flow), we have extended the TravelTimeData class to support AverageSpeed, Traffic Status (Level of Service), Jam Factor and Flow Sub-Sections and lane-level traffic. We created a new class TravelTimeSection to represent Flow Sections, which is used by our extended class TravelTimeDataExtended. We created the class LaneInfo to represent lane-level traffic. For an in-depth explanation of DATEX II Class B Extensions, see the DATEX II Extension Guide.
This response contains the following high level elements
- a timestamp of the obtained traffic data
- an
<ElaboratedData>
element that contains the OpenLR data and other details
Example XML Response
<?xml version="1.0" encoding="UTF-8"?>
<d2LogicalModel xmlns="http://datex2.eu/schema/2/2_0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" modelBaseVersion="2" xsi:schemaLocation="http://datex2.eu/schema/2/2_3/DATEXIISchema_2_2_3.xsd">
<exchange>
<supplierIdentification>
<country>other</country>
<nationalIdentifier />
</supplierIdentification>
</exchange>
<payloadPublication lang="en" xsi:type="ElaboratedDataPublication">
<publicationTime>2018-06-15T00:00:00Z</publicationTime>
<publicationCreator>
<country>other</country>
<nationalIdentifier />
</publicationCreator>
<headerInformation>
<confidentiality>noRestriction</confidentiality>
<informationStatus>real</informationStatus>
</headerInformation>
<elaboratedData>
<basicData xsi:type="TravelTimeData">
<measurementOrCalculationTime>2018-06-15T00:00:00Z</measurementOrCalculationTime>
<pertinentLocation xsi:type="Linear">
<linearExtension>
<openlrExtendedLinear>
<firstDirection>
<openlrLocationReferencePoint>
<openlrCoordinate>
<latitude>52.474598</latitude>
<longitude>4.654298</longitude>
</openlrCoordinate>
<openlrLineAttributes>
<openlrFunctionalRoadClass>FRC1</openlrFunctionalRoadClass>
<openlrFormOfWay>motorway</openlrFormOfWay>
<openlrBearing>281</openlrBearing>
</openlrLineAttributes>
<openlrPathAttributes>
<openlrLowestFRCToNextLRPoint>FRC1</openlrLowestFRCToNextLRPoint>
<openlrDistanceToNextLRPoint>500</openlrDistanceToNextLRPoint>
</openlrPathAttributes>
</openlrLocationReferencePoint>
<openlrLocationReferencePoint>
<openlrCoordinate>
<latitude>52.472345</latitude>
<longitude>4.652345</longitude>
</openlrCoordinate>
<openlrLineAttributes>
<openlrFunctionalRoadClass>FRC1</openlrFunctionalRoadClass>
<openlrFormOfWay>motorway</openlrFormOfWay>
<openlrBearing>267</openlrBearing>
</openlrLineAttributes>
<openlrPathAttributes>
<openlrLowestFRCToNextLRPoint>FRC1</openlrLowestFRCToNextLRPoint>
<openlrDistanceToNextLRPoint>500</openlrDistanceToNextLRPoint>
</openlrPathAttributes>
</openlrLocationReferencePoint>
<openlrLastLocationReferencePoint>
<openlrCoordinate>
<latitude>52.471325</latitude>
<longitude>4.651895</longitude>
</openlrCoordinate>
<openlrLineAttributes>
<openlrFunctionalRoadClass>FRC1</openlrFunctionalRoadClass>
<openlrFormOfWay>motorway</openlrFormOfWay>
<openlrBearing>260</openlrBearing>
</openlrLineAttributes>
</openlrLastLocationReferencePoint>
<openlrOffsets>
<openlrPositiveOffset>0</openlrPositiveOffset>
<openlrNegativeOffset>0</openlrNegativeOffset>
</openlrOffsets>
</firstDirection>
</openlrExtendedLinear>
</linearExtension>
</pertinentLocation>
<travelTimeType>instantaneous</travelTimeType>
<travelTime>
<duration>180</duration>
</travelTime>
<freeFlowSpeed>
<speed>50</speed>
</freeFlowSpeed>
<travelTimeDataExtension>
<travelTimeDataExtended>
<travelTimeSection>
<jamFactor>0.500000</jamFactor>
<freeFlowSpeed>
<speed>50</speed>
</freeFlowSpeed>
<averageSpeed>
<speed>20</speed>
</averageSpeed>
<trafficStatus>
<trafficStatusValue>freeFlow</trafficStatusValue>
</trafficStatus>
<travelTime>
<duration>180</duration>
</travelTime>
<length>
<integerMetreDistance>1000</integerMetreDistance>
</length>
</travelTimeSection>
</travelTimeDataExtended>
</travelTimeDataExtension>
</basicData>
</elaboratedData>
</payloadPublication>
</d2LogicalModel>