Traffic segment
Resources
Common
Getting Started
Tools
Versions
Contribute
Drafts
Overview
purpose | Traffic-speed data for a road segment |
method | GET |
Parameters
This resource supports the bbox
, geography
, tolerance
, jurisdiction
, updated
, road
, and area
filters with the same semantics as in Event. Field selection is likely to be particular useful on this resource, as clients may want to regularly fetch current speeds without re-downloading geospatial data. Some URL parameters are common to all resources: format, version, accept-language, and limit.
Example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<open511
xml:lang="en"
xml:base="http://my.city.gov/api/"
xmlns:gml="http://www.opengis.net/gml"
version="v1"
>
<traffic_segments>
<traffic_segment>
<link rel="self" href="/api/traffic_segments/my.city.gov/52" />
<link rel="jurisdiction" href="/api/jurisdiction/my.city.gov" />
<id>my.city.gov/52</id>
<updated>2013-10-22T15:45:00Z</updated>
<roads>
<road>
<link rel="self" href="/api/roads/my.city.gov/highway-2" />
<name>Highway 2</name>
<direction>N</direction>
<from>Exit 10</from>
<to>Exit 12</to>
</road>
</roads>
<geography>
<gml:LineString srsName="urn:ogc:def:crs:EPSG::4326">
<gml:posList>47.33 -71.17 47.36 -71.15 47.35 -71.1 47.4 -71.2</gml:posList>
</gml:LineString>
</geography>
<current_speed>30</current_speed>
<current_travel_time>333</current_travel_time>
<historical_speed>40</historical_speed>
<historical_travel_time>250</historical_travel_time>
<link rel="historical_traffic_conditions" href="/api/traffic_segments/my.city.gov/52/historical_conditions" />
<areas>
<area>
<link rel="self" href="http://geonames.org/6076945/about.rdf" />
<id>geonames.org/6076945</id>
<name>Monte Creek</name>
</area>
</areas>
</traffic_segment>
</traffic_segments>
<pagination>
<offset>0</offset>
</pagination>
</open511>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
"traffic_segments": [
{
"id": "my.city.gov/52",
"updated": "2013-10-22T15:45:00Z",
"jurisdiction_url": "/api/jurisdiction/my.city.gov",
"url": "/api/traffic_segments/my.city.gov/52",
"current_travel_time": 333,
"current_speed": 30,
"historical_speed": 40,
"historical_travel_time": 250,
"historical_traffic_conditions_url": "/api/traffic_segments/my.city.gov/52/historical_conditions",
"roads": [
{
"url": "/api/roads/my.city.gov/highway-2",
"to": "Exit 12",
"direction": "N",
"from": "Exit 10",
"name": "Highway 2"
}
],
"geography": {
"type": "LineString",
"coordinates": [
[
-71.17,
47.33
],
[
-71.15,
47.36
],
[
-71.1,
47.35
],
[
-71.2,
47.4
]
]
},
"areas": [
{
"url": "http://geonames.org/6076945/",
"id": "geonames.org/6076945",
"name": "Monte Creek"
}
]
}
],
"pagination": {
"offset": 0
},
"meta": {
"version": "v1"
}
}
Traffic segment data structure
Field | Type | Description |
---|---|---|
id | Open511 ID | Mandatory A globally unique ID for the traffic segment, following the Open511 ID format. |
self | Link | Mandatory Self link to the current resource. |
jurisdiction | Link | Mandatory Link to the jurisdiction publishing the traffic segment. |
updated | DateTime | Mandatory When the content of the resource last changed. More specifically, must be the time at which the current version of this resource first became available via this Open511 API. Clients are likely to poll for changes via requests like |
geography | Geospatial | Mandatory Geographical coordinates for this segment. May be Point or LineString. If LineString, coordinates must be ordered properly in the direction of the road. |
roads | Collection of road elements | Mandatory Roads to which this segment belongs. Usually a segment belongs to a single road, but the format supports multiple roads for cases where, for example, a single physical stretch of road is considered part of multiple numbered highways. |
current_speed | Integer | Mandatory The speed of traffic, as of the time in |
current_travel_time | Integer | Optional The time, in seconds, to drive through this segment. (Only makes sense if |
historical_speed | Integer | Optional The usual speed for this segment at this time of the day; the exact semantics of how this number is calculated may differ between jurisdictions. |
historical_travel_time | Integer | Optional The usual time, in seconds, to drive through this segment at this time of the day. |
historical_traffic_conditions | Link | Optional A link to a list of historical traffic condition resources for this segment. |
name | Free text | Optional A descriptive name for the road segment. |
areas | Collections of area elements | Optional Areas within which this segment falls. |
Road structure
Field | Type | Description |
---|---|---|
name | Free text | Mandatory Name of the road affected by the event; should be the same as in the linked Road resource. |
self / url | Link | Mandatory Link to the Road resource for this road. |
direction | Enum | Mandatory Direction of this segment. Value list: - N |
from | Free text |
Optional (mandatory if A description of the point on the road where the segment begins -- for example, the name of an intersecting road, or an exit number. If no |
to | Free text | Optional A description of the point on the road where the segment ends. |