Traffic Flow Data with DLR
The user wants to obtain traffic flow data with a Dynamic Location Reference (DLR), around Alexanderplatz, Berlin.
Request
The query parameter bbox
defines the latitudes and longitudes of the top left and bottom right corners of the bounding box. The optional query parameter responseattributes
requests that the response include additional information on the shape of the roadway corresponding to the flow items
https://traffic.ls.hereapi.com/traffic/6.2/flow.xml
?apiKey={YOUR_API_KEY}
&bbox=52.5233,13.4035;52.5181,13.4159
&locationreferences=shp
Response
-
<SHP>
element for the shape which includes theFC
attribute for the functional class information
<?xml version="1.0" encoding="UTF-8"?>
<TRAFFICML_REALTIME CREATED_TIMESTAMP="2017-06-02T18:08:33Z" MAP_VERSION="" UNITS="metric" VERSION="3.2" xmlns="http://traffic.nokia.com/trafficml-flow-3.2">
<RWS EBU_COUNTRY_CODE="D" EXTENDED_COUNTRY_CODE="E0" MAP_VERSION="201702" TABLE_ID="1" TY="SHP" UNITS="metric">
<RW PBT="2017-06-02T18:04:27Z" mid="c60928a9-61d2-45b7-bc41-8e0c9704a7cc~779602169N">
<FIS>
<FI>
<SHP FC="4" FW="SD" LE="0.06078" LID="779602169T">52.51483,13.39008 52.51477,13.38919</SHP>
<CF CN="0.77" FF="24.0" JF="8.0833" SP="9.23" SU="9.23" TY="TR"/>
</FI>
</FIS>
</RW>
<RW PBT="2017-06-02T18:08:34Z" mid="d2269eae-5fa5-447d-97c8-d3139db0ef92~923839888P">
<FIS>
<FI>
<SHP FC="4" FW="SD" LE="0.10319" LID="923839888F">52.4788,13.43603 52.47898,13.43752</SHP>
<CF CN="0.86" FF="29.0" JF="8.30276" SP="9.98" SU="9.98" TY="TR"/>
</FI>
</FIS>
</RW>
<RW PBT="2017-06-02T18:08:26Z" mid="4a85b6e8-21c4-463f-ae66-89b99b620e9d~53473556P">
<FIS>
<FI>
<SHP FC="5" FW="SD" LE="0.17662" LID="53473556F">52.49518,13.38403 52.49673,13.38459</SHP>
<CF CN="0.75" FF="39.0" JF="6.90229" SP="17.74" SU="17.74" TY="TR"/>
</FI>
</FIS>
</RW>
</RWS>
</TRAFFICML_REALTIME>