BeMapAPI
BeMap 4.1.0
API reference: POST /traffic/1.0

REST API, Service version 1.0.0

Traffic#

To get the traffic information by country or an restricted area.

Summary#

  1. Request
    1. Mandatory parameters
    2. Optional parameters
  2. Response
    1. Details of fields
    2. 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:

javascript
{
	"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.

  • geoserverstring

    Geoserver name.

  • swidxinteger (int32)deprecated

    Switch index.

  • countryCodestring

    Country ISO Code. Performs a data extract operation inside the specified Iso code filter.

  • timestampinteger (int64)

    Time stamp in milliseconds.

  • boundingBoxBoundingBox

    The bounding box make a filter on an specific area.

    BoundingBox fields
    • minLonnumber (double)

      Minimum longitude, in degrees decimal (WGS84).

    • minLatnumber (double)

      Minimum latitude, in degrees decimal (WGS84).

    • maxLonnumber (double)

      Maximum longitude, in degrees decimal (WGS84).

    • maxLatnumber (double)

      Maximum latitude, in degrees decimal (WGS84).

  • elementIdstring

    Traffic element ID.

  • reverseDirectionboolean

    Define 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.
    SYNC
    ALERTCEnable 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)deprecated

    The previous time stamp of update, can be used for synchronization mode.

  • outputLanguagestring

    Output language.

Response#

Details of fields#

  • countryInitializedboolean

    Country initialized.

  • trafficResponseElementsTrafficRespElement[]

    Traffic response elements.

    TrafficRespElement fields
    • trafficItemTrafficItem

      Traffic Item.

      TrafficItem fields
      • infoTrafficElementInfo

        Traffic information of element.

        TrafficElementInfo fields
        • idstring
        • countryCodestring
        • copyrightstring
        • releaseDatestring (date-time)
        • lastUpdateDatestring (date-time)
      • elementIdstring

        Element ID.

      • reverseDirectionboolean

        True for inverse road direction.

      • boundingBoxBoundingBox

        Bounding box of geometry in WGS84.

        BoundingBox fields
        • minLonnumber (double)

          Minimum longitude, in degrees decimal (WGS84).

        • minLatnumber (double)

          Minimum latitude, in degrees decimal (WGS84).

        • maxLonnumber (double)

          Maximum longitude, in degrees decimal (WGS84).

        • maxLatnumber (double)

          Maximum latitude, in degrees decimal (WGS84).

      • jamFactornumber (float)

        Percent (%) of traffic jam. Between 0.00 (free way) to 100.00 (full jam).

      • reasonenum

        TrafficReason.

        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
        • languagestring
        • commentstring
      • reasonCoordinateCoordinate

        Coordinate of the reason event.

        Coordinate fields
        • lonnumber (double)required

          Longitude in degrees decimal (WGS84).

          Also accepted as longitude.

        • latnumber (double)required

          Latitude in degrees decimal (WGS84).

          Also accepted as latitude.

      • polylineCoordinate[]

        Polyline.

        Coordinate fields
        • lonnumber (double)required

          Longitude in degrees decimal (WGS84).

          Also accepted as longitude.

        • latnumber (double)required

          Latitude in degrees decimal (WGS84).

          Also accepted as latitude.

      • segmentInfosTrafficSegInfo[]

        Segment Info.

        TrafficSegInfo fields
        • idstring

          Unique identifier of road segment.

        • reverseDirectionboolean

          The route travel is in opposite way of geometry.

      • tmcInternalIdinteger (int64)

        AlertcTrafficElement.

      • alertcEbuCountryCodestring

        AlertcTrafficElement.

      • alertcTableIdinteger (int64)

        AlertcTrafficElement.

      • alertcLocationIdinteger (int64)

        AlertcTrafficElement.

      • alertcExtendinteger (int32)

        AlertcTrafficElement.

      • alertcCodeinteger (int32)

        AlertcTrafficElement.

      • openLrBase64string

        OpenLrTrafficElement.

Response samples#

JSON Sample:

javascript