REST API, Service version 1.0.0
Traffic#
To get the traffic information by country or an restricted area.
Summary#
- Request
- Mandatory parameters
- Optional parameters
- Response
- Details of fields
- Response samples
Request#
The request must be sent with the HTTP method POST and the HTTP header Content-Type set to application/json.
Sample:
URI: /bgis/service/traffic/1.0
POST data:
{
"boundingBox" : {
"minLon" : 2.24801,
"minLat" : 48.80938,
"maxLon" : 2.42045,
"maxLat" : 48.90529
},
"outputLanguage" : "fr"
}All coordinates are defined by longitude and latitude, see the coordinate system glossary for more details.
Parameters#
The parameters bbox and countryCode can used alternately, but the presence of one of them in the request is mandatory.
geoserverstringGeoserver name.
swidxinteger (int32)deprecatedSwitch index.
countryCodestringCountry ISO Code. Performs a data extract operation inside the specified Iso code filter.
timestampinteger (int64)Time stamp in milliseconds.
boundingBoxBoundingBoxThe bounding box make a filter on an specific area.
elementIdstringTraffic element ID.
reverseDirectionbooleanDefine the side of road will be used.
optionsenum[]Options of traffic info service.
9 accepted values
STATSEnable the data outputs like jam factor, speed and other information. POLYLINEEnable the polyline geometry output. SYNCALERTCEnable the Alert-C outputs. OPENLREnable the OpenLR outputs. TRAFFIC_PREDICTIVEEnable the predictive traffic information. TRAFFIC_HISTORICAL(Beta) Enable the historical traffic information. ONLY_BLOCKED_ROADTo get only the blocked roads (closed). EXCLUDE_BLOCKED_ROADTo exclude all blocked roads (closed). previousUpdateTimestampinteger (int64)deprecatedThe previous time stamp of update, can be used for synchronization mode.
outputLanguagestringOutput language.
Response#
Details of fields#
countryInitializedbooleanCountry initialized.
trafficResponseElementsTrafficRespElement[]Traffic response elements.
TrafficRespElement fields
trafficItemTrafficItemTraffic Item.
TrafficItem fields
infoTrafficElementInfoTraffic information of element.
TrafficElementInfo fields
idstringcountryCodestringcopyrightstringreleaseDatestring (date-time)lastUpdateDatestring (date-time)
elementIdstringElement ID.
reverseDirectionbooleanTrue for inverse road direction.
boundingBoxBoundingBoxBounding box of geometry in WGS84.
jamFactornumber (float)Percent (%) of traffic jam. Between 0.00 (free way) to 100.00 (full jam).
reasonenumTrafficReason.
10 accepted values
NANot available. CONGESTIONtraffic congestion (jam). CARRIAGEWAY_REDUCEDCarriage-way reduced. ACCIDENTAccident. INCIDENTIncident. INFORMATIONInformation. NON_RECOMMANDED_ROADNon re-commanded road. ROAD_CONDITION_DETERIORATEDRoad condition deteriorated. BLOCKED_ROADBlocked road. ROAD_UNDER_CONTRUCTIONRoad under construction. reasonCommentsTrafficResComment[]List of reason comments.
TrafficResComment fields
languagestringcommentstring
reasonCoordinateCoordinateCoordinate of the reason event.
polylineCoordinate[]Polyline.
segmentInfosTrafficSegInfo[]Segment Info.
TrafficSegInfo fields
idstringUnique identifier of road segment.
reverseDirectionbooleanThe route travel is in opposite way of geometry.
tmcInternalIdinteger (int64)AlertcTrafficElement.
alertcEbuCountryCodestringAlertcTrafficElement.
alertcTableIdinteger (int64)AlertcTrafficElement.
alertcLocationIdinteger (int64)AlertcTrafficElement.
alertcExtendinteger (int32)AlertcTrafficElement.
alertcCodeinteger (int32)AlertcTrafficElement.
openLrBase64stringOpenLrTrafficElement.
Response samples#
JSON Sample: