This is a draft. It may be included in Open511 in the future, but is not currently a maintained part of the specification. If you're interested in using it or participating in its development, please get in touch.

Overview

purposeProvide metadata, including links to images or video, for live traffic cameras
methodGET

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

FieldTypeDescription
idOpen511 ID

Mandatory

A globally unique ID for the camera, following the Open511 ID format.

selfLink

Mandatory

Self link to the current resource.

jurisdictionLink

Mandatory

Link to the jurisdiction publishing the event.

nameFree text

Mandatory

Name given to the camera; generally its location, e.g. Highway 4 near Allen Rd.

media_filesCollection of media_file elements

Mandatory

Collection of links to the camera output. Will usually contain only a single media_file element, but multiple elements are allowed in order to provide alternate formats (e.g. one image link, one video link) for data from the same camera. Media files that are not live camera output, e.g. static images used to help figure out orientation, are permitted, but must come last in the list and must contain a title element.

geographyGeospatial

Mandatory

A latitude/longitude Point for the camera's location.

descriptionFree text

Optional

Descriptive information about the camera that doesn't fit in name. Often used for orientation information, e.g. Highway 4 eastbound on right side of image, westbound on left.

orientationEnum

Optional

Direction in which the camera is pointing.

Value list:

- N
- NW
- W
- SW
- S
- SE
- E
- NE
roadsCollection of road elements

Optional

List of roads covered by the camera.

areasCollection of area elements

Optional

The Areas (e.g. city, district) containing the camera's location.

Media_file structure

FieldTypeDescription
self/urlLink

Mandatory

URL to an image or video file.

typeString of an Internet Media Type

Mandatory

Media type of the linked file, e.g. image/png or video/mp4.

widthInteger

Optional

Width in pixels of the linked image or video.

heightInteger

Optional

Height in pixels of the linked image or video.

refresh_intervalInteger

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.

titleFree 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 type and name fields, e.g. PNG image of the camera at Elm St. and 1st Ave., is a bad idea. A title is a good idea if this media file contains something other than live camera output, e.g. Static wayfinding image to identify which way the camera is currently pointing, or there's some other important thing about this file that doesn't apply to the camera's other media files.