Traffic TPEG API Developer's Guide

Getmessages Multi-Radius Proximity Example

All Multi-Radius getmessages requests be preceeded by an initsession request (which contains the Getmessage URL) and must be encrypted as described in Retrieving traffic information. The following request body shows a request for traffic information around the point defined by latitude 52.5158426 and longitude 13.412532. The radius is defined in the getmessage Multi-Radius request

Usually we need to filter traffic data based on types of the road, because there is no need to display detailed traffic information for long distance from current position. To decrease traffic data amounth exchange between server and client, TDA service has the possibility to filter TPEG messeges depending on their Functional Classes (FC).

FC is a road type indicator, reflecting traffic speed and volume, as well as the importance and connectivity of the road. The following values are supported:

  • 1: a road with high volume, maximum speed traffic
  • 2: a road with high volume, high speed traffic
  • 3: a road with high volume traffic
  • 4: a road with high volume traffic at moderate speeds between neighborhoods
  • 5: a road whose volume and traffic flow are below the level of any other functional class
Here is an example of how API would be able to request traffic with given filtering:
  • radius 10 km → FC from 1 to 5
  • radius 20 km → FC from 1 to 3
  • radius 60 km → FC 1

Every bigger radius excludes all previous smaller radiuses, thus only smallest radius becomes a circle, all others become rings, see picture below:

Figure 1. Multi-Radius filtering based on given radiuses
<?xml version="1.0" encoding="UTF-8" ?>
<get-messages>
    <locations>
      <loc lat="52.5158426" lon="13.412532"/>
    </locations>
  <filters>
    <radiusWithFC radius="10" fc="1,2,3,4,5"/>
    <radiusWithFC radius="30" fc="1,2,3"/>
    <radiusWithFC radius="60" fc="1"/>
  </filters>
</get-messages>