Apply a Bounding Box Filter

To request data for only a specific region that can be defined by a bounding box, use a JSON query with a bounding box filter to define the location:

{
    "loc":{"geo":{"bbox": [<latitude-SW>, <longitude-SW>, <latitude-NE>, <longitude-NE>]}}
    ...
}

The bounding box must be specified by an array of four decimal values, defining the latitude and longitude of the south-west corner of the bounding box followed by the latitude and longitude of its north-east corner.

When requesting incidents, make sure to include the "incident" element in your JSON query:

{
    "loc":{"geo":{"bbox": [<latitude-SW>, <longitude-SW>, <latitude-NE>, <longitude-NE>]}},
    "incident": {}
}

When requesting flow data, you need to include the "flow" element in your JSON query:

{
    "loc":{"geo":{"bbox": [<latitude-SW>, <longitude-SW>, <latitude-NE>, <longitude-NE>]}},
    "flow": {}
}

Send an HTTP POST request to either the DATEX II incident or the DATEX II flow endpoint with your JSON data in the POST body:

http://data.traffic.api.here.com/datex/2.3/incident/content.xml

For a complete example with a bounding box in a request, see Traffic Incidents Within a Bounding Box in DATEX II.

results matching ""

    No results matching ""