Camera
Resources
Common
Getting Started
Tools
Versions
Contribute
Drafts
Overview
purpose | Provide metadata, including links to images or video, for live traffic cameras |
method | GET |
Parameters and filters
The camera resource supports the road_name
, area_id
, and bbox
filters as in the event resource, as well as the URL parameters common to all resources: format, version, accept-language, and limit. It is also possible to offer a static version of the service which does not support interactive filtering.
Example
Example of the XML and JSON representations of the camera resource.
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
<open511
xml:lang="en"
xml:base="http://mycity.gov/open511/"
xmlns:gml="http://www.opengis.net/gml"
version="v1"
>
<cameras>
<camera>
<link rel="self" href="/api/traffic_cameras/mycity.gov/23948/" />
<id>mycity.gov/23948</id>
<link rel="jurisdiction" href="http://mycity.gov/open511/jurisdiction/mycity.gov/" />
<name xml:lang="fr">Autoroute 40, coin de l'Acadie</name>
<name xml:lang="en">Highway 40, near Acadie</name>
<description xml:lang="fr">Direction est à droite, direction ouest à gauche</description>
<description xml:lang="en">Eastbound on right side of image, westbound on left</description>
<orientation>N</orientation>
<geography>
<gml:Point srsName="urn:ogc:def:crs:EPSG::4326">
<gml:pos>46.6351113599 -72.6833114084</gml:pos>
</gml:Point>
</geography>
<roads>
<road>
<link rel="self" href="/api/roads/mycity.gov/A-40" />
<name>Autoroute 40</name>
<direction>BOTH</direction>
</road>
</roads>
<media_files>
<media_file>
<link rel="self" href="http://mycity.gov/transport/camera/45445.png" />
<type>image/png</type>
<width>300</width>
<height>300</height>
<refresh_interval>15</refresh_interval>
</media_file>
</media_files>
<areas>
<area>
<id>geonames.org/6076945</id>
<name>Monte Creek</name>
</area>
</areas>
</camera>
</cameras>
</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
{
"cameras": [
{
"id": "mycity.gov/23948",
"url": "/api/traffic_cameras/mycity.gov/23948/",
"name": "Autoroute 40, coin de l'Acadie, direction nord",
"description": "Eastbound on right side of image, westbound on left",
"orientation": "N",
"media_files": [
{
"url": "http://mycity.gov/transport/camera/45445.png",
"type": "image/png",
"width": 300,
"height": 300,
"refresh_interval": 15
}
],
"jurisdiction_url": "http://mycity.gov/open511/jurisdiction/mycity.gov/",
"roads": [
{
"url": "/api/roads/mycity.gov/A-40",
"direction": "N",
"name": "Autoroute 40"
}
],
"areas": [
{
"id": "geonames.org/6076945",
"name": "Monte Creek"
}
],
"geography": {
"type": "Point",
"coordinates": [
-72.683311408445306,
46.635111359930796
]
}
}
],
"meta": {
"version": "v1"
}
}
Camera item data structure
Field | Type | Description |
---|---|---|
id | Open511 ID | Mandatory A globally unique ID for the camera, following the Open511 ID format. |
self | Link | Mandatory Self link to the current resource. |
jurisdiction | Link | Mandatory Link to the jurisdiction publishing the event. |
name | Free text | Mandatory Name given to the camera; generally its location, e.g. Highway 4 near Allen Rd. |
media_files | Collection of media_file elements |
Mandatory Collection of links to the camera output. Will usually contain only a single |
geography | Geospatial | Mandatory A latitude/longitude Point for the camera's location. |
description | Free text | Optional Descriptive information about the camera that doesn't fit in |
orientation | Enum | Optional Direction in which the camera is pointing. Value list: - N |
roads | Collection of road elements | Optional List of roads covered by the camera. |
areas | Collection of area elements | Optional The Areas (e.g. city, district) containing the camera's location. |
Media_file structure
Field | Type | Description |
---|---|---|
self/url | Link | Mandatory URL to an image or video file. |
type | String of an Internet Media Type | Mandatory Media type of the linked file, e.g. |
width | Integer | Optional Width in pixels of the linked image or video. |
height | Integer | Optional Height in pixels of the linked image or video. |
refresh_interval | Integer | Optional Interval, in seconds, between refreshes of the linked image or video. If the image is refreshed every 30 seconds, set this to 30. If the image or video is always live data, set this to 0. |
title | Free text | Optional Description of this particular media file. Only include this if this media file warrants its own description -- repeating information already provided in the |