Vector Incident Tiles
Important notes:
- This TomTom Orbis API is in public preview.
- This API is powered by the TomTom Orbis Maps.
- See the TomTom Orbis Maps documentation for more information.
Purpose
The Traffic API Vector Incidents Tiles endpoint provides data on zoom levels ranging from 0 to 22.
- For zoom level 0, the world is displayed on a single tile, while at zoom level 22, the world is divided into 244 tiles.
- See: Zoom Levels and Tile Grid.
The service delivers traffic incidents data packaged in a vector representation of squared sections called vector tiles.
- Each tile includes a pre-defined collection of road shapes with traffic incidents data.
- The format of a tile is formally described using the protobuf schema.
Tiles resolution
Road geometry is stored as coordinates in the range 0-4095. Coordinates (0,0) define the top-left corner of the tile.
Vector format
The Vector format is a binary format created by using Google Protocol Buffers to serialize the data according to this defined vector schema.
- The data is mapped to protobuf layers called "Traffic incident flow" and "Traffic incident points".
- Besides the protobuf layers, the protobuf tags are also used to further describe the traffic.
- The protobuf tags are split into two categories: default and on-demand.
- The default tags are used unless they are filtered out by the
tags
request parameter. - The on-demand tags are used only if they were added by the
tags
request parameter.
- The default tags are used unless they are filtered out by the
Currently, the following tags are used.
Default tags
Tag | Present in the layer | Description |
---|---|---|
|
| The icon categories associated with the single incident.
|
|
| The tag presence indicates if the road has left-hand traffic. If the tag
if it is not present, the road has right-hand traffic. |
|
| The magnitude of delay associated with the incident.
|
|
| The tag value describes the road category.
|
|
| The tag presence indicates if the road has a subcategory. Not all road categories have subcategories.
|
|
| The beginning of incidents is described as the
|
On-demand tags
Tag | Present in the layer | Description |
---|---|---|
|
| A description of the incident with the corresponding |
|
| The tag presence indicates if the incident causes any delay.
If the tag is requested, but still it's not present, there
is no delay information associated with the incident.
The delay value is measured in seconds. It is calculated against
free-flow travel time (the travel time when the traffic is
minimal, e.g., night traffic). |
|
| The tag presence indicates if the traffic is part of a
two-way road (two different geometries, each with a value
for one side). If the tag is not present, the flow covers
the whole one-way road. |
|
| Start time of the incident, if available.
The date is described in ISO8601 format. |
|
| Estimated end date of the incident, if available.
The date is described in ISO8601 format. |
|
| The ID of the traffic incident, common among Traffic
Incident API services where it is available. |
|
| One of the Community Attributes (ACI).
|
|
| One of the Community Attributes (ACI). This is the
number of reports given by actual end-users. |
|
| One of the Community Attributes (ACI). The date in
ISO8601 format,
when the last time the incident was reported.
It gives the user confidence that the incident is fresh. |
|
| The tag presence indicates if there is average speed
information associated with the incident. If the tag
is requested, but still it's not present, there is
no speed information associated with it. The average
speed in measured in km/h within the area marked by
an incident. |
|
| The OpenLR code describing the incident. |
|
| An enumeration string describing if the incident
occurrence is now or in the future.
|
| Contains a version of the API to call.
Value: The current version is |
Request data
HTTPS method: GET
- Constants and parameters enclosed in curly brackets { } must be replaced with their values.
- Please see the following Request parameters section with the required and optional parameters tables for their values. The generic request format is as follows.
https://{baseURL}/maps/orbis/traffic/tile/incidents/{zoom}/{x}/{y}.{format}?apiVersion=1&key={Your_API_Key}&t={t}
Note: pbf
= Protocolbuffer Binary Format
https://api.tomtom.com/maps/orbis/traffic/tile/incidents/5/4/8.pbf?apiVersion=1&key={Your_API_Key}
curl 'https://api.tomtom.com/maps/orbis/traffic/tile/incidents/5/4/8.pbf?apiVersion=1&key={Your_API_Key}'
Request parameters
The following table describes the parameters that can be used in a request.
- Required parameters must be used or the call will fail.
- Parameters and values are case-sensitive.
- Optional parameters may be used.
Required parameters | Description |
---|---|
| The base URL for calling TomTom services. |
| The zoom level of the tile to be rendered. |
| The |
| The |
| The format of the response. |
| An API Key valid for the requested service. |
| Parameter allowing the use of a new API version for this endpoint. |
Optional parameters | Description |
---|---|
| The Traffic Model ID is the reference value for the state of traffic at a particular time.
Default value: |
| The list of the values representing the available tags
in the tile.
By default, only the default tags are attached to the tile geometry. See Vector format for details.
Value: Comma-separated list. |
| This filter allows the choice of types of road categories to be
included in the response. The filter narrows down the road categories
available at particular zoom level. Multiple values are supported and
should be separated by a comma.
|
| This filter allows the choice of types of incidents and future
incidents to be included in the response. Filtering takes into
account the main icon category of the incident. Both value types
can be used: numeric and descriptive strings. Multiple values
are supported and should be separated by a comma.
|
| This filter allows the choice of incidents based on their
occurrence in time. Multiple values are supported and
they should be separated by a comma.
|
| The language code for the output language. It affects the
description fields in the response. When an incident
description does not have a translation, an English
description is returned. |
Request headers
The following table lists HTTP request headers of particular interest to clients of the Traffic Vector Incidents Tiles API endpoint.
Required headers | Description |
---|---|
TomTom-Api-Version | Contains a version of the API to call. |
Optional headers | Description |
---|---|
Accept-Encoding | Contains the content encoding (usually a compression
algorithm), that the client is able to understand. |
If-None-Match | Contains an identifier for a specific version of resource.
The server will send back the requested resource, with
a 200 HTTP status code, only if it doesn't have an ETag
matching the given one. |
Tracking-ID | Specifies an identifier for the request.
Value: |
Response data
Successful response
The Traffic Vector Incidents Tiles API endpoint, for a single request, returns a binary response body which must be deserialized by client code generated by the Google Protocol Buffers compiler. The following example uses a simple text representation of the serialized binary vector tile data to illustrate the response content.
Example request
https://api.tomtom.com/maps/orbis/traffic/tile/incidents/14/8186/5450.pbf?&key={Your_API_Key}
Example response
1layer: 02 name: Traffic incident flow3 version: 24 extent: 40965 feature: 06 id: (none)7 geomtype: linestring8 geometry:9 LINESTRING[count=2](574 4378,524 4506)10 properties:11 icon_category_0=912 magnitude_of_delay=013 road_category="primary"14 left_hand_traffic=115 feature: 116 id: (none)17 geomtype: linestring18 geometry:19 LINESTRING[count=2](1482 4476,1445 4506)20 properties:21 icon_category_0=922 magnitude_of_delay=023 road_category="tertiary"24 left_hand_traffic=125 feature: 226 id: (none)27 geomtype: linestring28 geometry:29 LINESTRING[count=2](1445 4506,1482 4476)30 properties:31 icon_category_0=932 magnitude_of_delay=033 road_category="tertiary"34 left_hand_traffic=135 feature: 336 id: (none)37 geomtype: linestring38 geometry:39 LINESTRING[count=2](1482 4476,1445 4506)40 properties:41 icon_category_0=642 icon_category_1=943 magnitude_of_delay=344 road_category="tertiary"45 left_hand_traffic=146 feature: 447 id: (none)48 geomtype: linestring49 geometry:50 LINESTRING[count=3](3221 -410,3232 -408,3246 -410)51 properties:52 icon_category_0=653 icon_category_1=954 magnitude_of_delay=355 road_category="primary"56 left_hand_traffic=157 feature: 558 id: (none)59 geomtype: linestring60 geometry:61 LINESTRING[count=2](3444 4506,3490 4384)62 properties:63 icon_category_0=964 magnitude_of_delay=065 road_category="primary"66 left_hand_traffic=167 feature: 668 id: (none)69 geomtype: linestring70 geometry:71 LINESTRING[count=7](3560 2748,3556 2698,3554 2604,3558 2472,3556 2406,3568 2128,3596 1754)72 properties:73 icon_category_0=974 icon_category_1=975 magnitude_of_delay=076 road_category="primary"77 left_hand_traffic=178 feature: 779 id: (none)80 geomtype: linestring81 geometry:82 LINESTRING[count=6](3628 1322,3612 1494,3582 1952,3568 2128,3556 2406,3558 2472)83 properties:84 icon_category_0=985 magnitude_of_delay=086 road_category="primary"87 left_hand_traffic=188 feature: 889 id: (none)90 geomtype: linestring91 geometry:92 LINESTRING[count=7](4506 405,4442 364,4364 300,4078 116,4032 88,3976 44,3942 20)93 properties:94 icon_category_0=695 magnitude_of_delay=196 road_category="primary"97 left_hand_traffic=198 feature: 999 id: (none)100 geomtype: linestring101 geometry:102 LINESTRING[count=7](3942 20,3976 44,4032 88,4078 116,4364 300,4442 364,4506 405)103 properties:104 icon_category_0=6105 magnitude_of_delay=2106 road_category="primary"107 left_hand_traffic=1108layer: 1109 name: Traffic incident points110 version: 2111 extent: 4096112 feature: 0113 id: (none)114 geomtype: point115 geometry:116 POINT(574,4378)117 properties:118 icon_category_0=9119 magnitude_of_delay=0120 road_category="primary"121 left_hand_traffic=1122 point_type="start_point"123 feature: 1124 id: (none)125 geomtype: point126 geometry:127 POINT(1482,4476)128 properties:129 icon_category_0=9130 magnitude_of_delay=0131 road_category="tertiary"132 left_hand_traffic=1133 point_type="start_point"134 feature: 2135 id: (none)136 geomtype: point137 geometry:138 POINT(1482,4476)139 properties:140 icon_category_0=6141 icon_category_1=9142 magnitude_of_delay=3143 road_category="tertiary"144 left_hand_traffic=1145 point_type="start_point"146 feature: 3147 id: (none)148 geomtype: point149 geometry:150 POINT(3560,2748)151 properties:152 icon_category_0=9153 icon_category_1=9154 magnitude_of_delay=0155 road_category="primary"156 left_hand_traffic=1157 point_type="start_point"158 feature: 4159 id: (none)160 geomtype: point161 geometry:162 POINT(3628,1322)163 properties:164 icon_category_0=9165 magnitude_of_delay=0166 road_category="primary"167 left_hand_traffic=1168 point_type="start_point"169 feature: 5170 id: (none)171 geomtype: point172 geometry:173 POINT(3942,20)174 properties:175 icon_category_0=6176 magnitude_of_delay=2177 road_category="primary"178 left_hand_traffic=1179 point_type="start_point"
Error response
The Traffic API Vector Incident Tiles endpoint for an invalid single request returns a response body in JSON format.
Error response field structure
Field | Description |
---|---|
| Main object of the error response. |
| One of a server-defined set of error codes. |
| A human-readable description of the error code. |
1{2 "detailedError": {3 "code": "INVALID_REQUEST",4 "message": "Invalid zoom value. Allowed values are <0,22>."5 }6}
Response codes
Code | Meaning & possible causes |
---|---|
200 | OK |
304 | Not modified |
400 | Bad request:
|
403 | Forbidden: The supplied API Key is not valid for this request. |
405 | Method Not Allowed: The provided HTTP request method is known by the server, but is not supported by the target resource. |
429 | Too Many Requests: Too many requests were sent in a given amount of time for the supplied API Key. |
500 | Internal Server Error: There is a problem with the TomTom Maps Vector Tile service. |
503 | Service currently unavailable: The service is currently unavailable. |
596 | Service not found: Unknown version of the service. |
Response headers
The following table lists HTTP response headers of particular interest to clients of the Traffic API Vector Incidents Tiles endpoint.
Header | Description |
---|---|
Access-Control-Allow-Origin | Indicates that cross-origin resource sharing (CORS) is allowed. |
Allow | Lists the set of supported HTTP methods. The header is
sent in case a |
Content-Encoding | Indicates which encodings were applied to the response body. |
Content-Length | Contains information about the size of the response body. |
Content-Type | Indicates the media type of the resource returned. |
Date | Contains the date and time when the message was originated. |
ETag | Contains an identifier for a specific version of resource. |
Expires | Contains the date after which the response is considered outdated. |
TrafficModelID | Contains the reference value for the state of traffic at a particular time.
Value: |
Tracking-ID | An identifier for the request. If the Tracking-ID
header was specified in the request, it is replicated in the response.
Otherwise, it is generated automatically by the service. For details
check RFC 4122. It is only meant
to be used for support and does not involve tracking of you or your
users in any form. |