Map overlay observation imagery detailed documentation
Detailed documentation on the observation layer capabilities feed.
Description of data feed
The observation layer capabilities feed provides information on when the observation layers that are currently available were issued, details the timesteps that are available, and lists the URIs at which they can be found. The observation layer capabilities feed provides information on the available layers for the following products:
- Current weather map layers UK rainfall radar
- Current weather map layers UK lightning strikes
- Current weather map layers UK satellite infrared
- Current weather map layers UK satellite visible
Accessing the feed via its web service
Description of web service
The observation layer capabilities web service can be used to retrieve the output of the observation layer capabilities feed. You should set the data format in the URL to specify whether the web service should return XML or JSON, and include your API key in the query string.
Possible use cases for this web service with example URLs
- You would like to know the current observation layer capabilities in XML format. In this case you would set the data type to xml.
Example: to obtain capabilities for the observation layers in XML format:
http://datapoint.metoffice.gov.uk/public/data/layer/wxobs/all/xml/capabilities?key=<API key>
The above example would return a file of approximately 2 kB in size - You would like to know the current observation layer capabilities in JSON format. In this case you would set the data type to json.
Example: to obtain capabilities for the observation layers in JSON format:
http://datapoint.metoffice.gov.uk/public/data/layer/wxobs/all/json/capabilities?key=<API key>
The above example would return a file of approximately 2 kB in size
Example of XML and JSON responses
The following examples show a typical result of a call to the observation layer capabilities web service.
XML
The XML that follows is a representative response to a call to the following URL, with a valid key:
http://datapoint.metoffice.gov.uk/public/data/layer/wxobs/all/xml/capabilities?key=<API key>
<?xml version="1.0"?>
<Layers type="Observation">
<BaseUrl forServiceTimeFormat="Times">
http://datapoint.metoffice.gov.uk/public/data/layer/wxobs/{LayerName}/{ImageFormat}?TIME={Time}Z</BaseUrl>
<Layer displayName="Lightning">
<Service name="OBSERVATIONS">
<LayerName>ATDNET_Sferics</LayerName>
<ImageFormat>png</ImageFormat>
<Times>
<Time>2012-09-13T16:15:00</Time>
<Time>2012-09-13T16:00:00</Time>
<Time>2012-09-13T15:45:00</Time>
<Time>2012-09-13T15:30:00</Time>
<Time>2012-09-13T15:15:00</Time>
<Time>2012-09-13T15:00:00</Time>
<Time>2012-09-13T14:45:00</Time>
<Time>2012-09-13T14:30:00</Time>
<Time>2012-09-13T14:15:00</Time>
<Time>2012-09-13T14:00:00</Time>
<Time>2012-09-13T13:45:00</Time>
<Time>2012-09-13T13:30:00</Time>
<Time>2012-09-13T13:15:00</Time>
</Times>
</Service>
</Layer>
<Layer displayName="SatelliteIR">
<Service name="OBSERVATIONS">
<LayerName>SATELLITE_Infrared_Fulldisk</LayerName>
<ImageFormat>png</ImageFormat>
<Times>
<Time>2012-09-13T16:15:00</Time>
<Time>2012-09-13T16:00:00</Time>
<Time>2012-09-13T15:45:00</Time>
<Time>2012-09-13T15:30:00</Time>
<Time>2012-09-13T15:15:00</Time>
<Time>2012-09-13T15:00:00</Time>
<Time>2012-09-13T14:45:00</Time>
<Time>2012-09-13T14:30:00</Time>
<Time>2012-09-13T14:15:00</Time>
<Time>2012-09-13T14:00:00</Time>
<Time>2012-09-13T13:45:00</Time>
<Time>2012-09-13T13:30:00</Time>
<Time>2012-09-13T13:15:00</Time>
</Times>
</Service>
</Layer>
<Layer displayName="SatelliteVis">
<Service name="OBSERVATIONS">
<LayerName>SATELLITE_Visible_N_Section</LayerName>
<ImageFormat>png</ImageFormat>
<Times>
<Time>2012-09-13T16:15:00</Time>
<Time>2012-09-13T16:00:00</Time>
<Time>2012-09-13T15:45:00</Time>
<Time>2012-09-13T15:30:00</Time>
<Time>2012-09-13T15:15:00</Time>
<Time>2012-09-13T15:00:00</Time>
<Time>2012-09-13T14:45:00</Time>
<Time>2012-09-13T14:30:00</Time>
<Time>2012-09-13T14:15:00</Time>
<Time>2012-09-13T14:00:00</Time>
<Time>2012-09-13T13:45:00</Time>
<Time>2012-09-13T13:30:00</Time>
<Time>2012-09-13T13:15:00</Time>
</Times>
</Service>
</Layer>
<Layer displayName="Rainfall">
<Service name="OBSERVATIONS">
<LayerName>RADAR_UK_Composite_Highres</LayerName>
<ImageFormat>png</ImageFormat>
<Times>
<Time>2012-09-13T16:15:00</Time>
<Time>2012-09-13T16:00:00</Time>
<Time>2012-09-13T15:45:00</Time>
<Time>2012-09-13T15:30:00</Time>
<Time>2012-09-13T15:15:00</Time>
<Time>2012-09-13T15:00:00</Time>
<Time>2012-09-13T14:45:00</Time>
<Time>2012-09-13T14:30:00</Time>
<Time>2012-09-13T14:15:00</Time>
<Time>2012-09-13T14:00:00</Time>
<Time>2012-09-13T13:45:00</Time>
<Time>2012-09-13T13:30:00</Time>
<Time>2012-09-13T13:15:00</Time>
</Times>
</Service>
</Layer>
</Layers>
JSON
The JSON that follows shows the structure of a representative response to a call to the following URL, with a valid key:
http://datapoint.metoffice.gov.uk/public/data/layer/wxobs/all/json/capabilities?key=<API key>
{
"Layers":{
"@type":"Observation",
"BaseUrl":{
"@forServiceTimeFormat":"Times",
"$":"http://datapoint.metoffice.gov.uk/public/data/layer/wxobs/{LayerName}/{ImageFormat}?TIME={Time}Z"
},
"Layer":[
{
"@displayName":"Lightning",
"Service":{
"@name":"OBSERVATIONS",
"LayerName":"ATDNET_Sferics",
"ImageFormat":"png",
"Times":{
"Time":["2012-09-13T16:15:00", "2012-09-13T16:00:00", "2012-09-13T15:45:00", "2012-09-13T15:30:00", "2012-09-13T15:15:00", "2012-09-13T15:00:00", "2012-09-13T14:45:00", "2012-09-13T14:30:00", "2012-09-13T14:15:00", "2012-09-13T14:00:00", "2012-09-13T13:45:00", "2012-09-13T13:30:00", "2012-09-13T13:15:00"]
}
}
},
{
"@displayName":"SatelliteIR",
"Service":{
"@name":"OBSERVATIONS",
"LayerName":"SATELLITE_Infrared_Fulldisk",
"ImageFormat":"png",
"Times":{
"Time":["2012-09-13T16:15:00", "2012-09-13T16:00:00", "2012-09-13T15:45:00", "2012-09-13T15:30:00", "2012-09-13T15:15:00", "2012-09-13T15:00:00", "2012-09-13T14:45:00", "2012-09-13T14:30:00", "2012-09-13T14:15:00", "2012-09-13T14:00:00", "2012-09-13T13:45:00", "2012-09-13T13:30:00", "2012-09-13T13:15:00"]
}
}
},
{
"@displayName":"SatelliteVis",
"Service":{
"@name":"OBSERVATIONS",
"LayerName":"SATELLITE_Visible_N_Section",
"ImageFormat":"png",
"Times":{
"Time":["2012-09-13T16:15:00", "2012-09-13T16:00:00", "2012-09-13T15:45:00", "2012-09-13T15:30:00", "2012-09-13T15:15:00", "2012-09-13T15:00:00", "2012-09-13T14:45:00", "2012-09-13T14:30:00", "2012-09-13T14:15:00", "2012-09-13T14:00:00", "2012-09-13T13:45:00", "2012-09-13T13:30:00", "2012-09-13T13:15:00"]
}
}
},
{
"@displayName":"Rainfall",
"Service":{
"@name":"OBSERVATIONS",
"LayerName":"RADAR_UK_Composite_Highres",
"ImageFormat":"png",
"Times":{
"Time":["2012-09-13T16:15:00", "2012-09-13T16:00:00", "2012-09-13T15:45:00", "2012-09-13T15:30:00", "2012-09-13T15:15:00", "2012-09-13T15:00:00", "2012-09-13T14:45:00", "2012-09-13T14:30:00", "2012-09-13T14:15:00", "2012-09-13T14:00:00", "2012-09-13T13:45:00", "2012-09-13T13:30:00", "2012-09-13T13:15:00"]
}
}
}
]
}
}
Anatomy of responses
The XML response produced by this web service contains a single Layers node, defined as follows:
Layers
The Layers object contains a single attribute, type, which always has the value 'Observation'. It also contains single BaseUrl element, which gives the base url of the observation layer feeds. This can be used to derive the URLs of the feeds themselves. BaseUrl contains a single attribute, forServiceTimeFormat forServiceTimeFormat, which specifies the format in which the timesteps are presented. This always has the value 'Times', as each timestep is presented as a time string in ISO8601 format. It also contains a number of Layer elements, one for each product for which the observation layer capabilities feed provides data. The structure of each Layer element is described below.
Layer
A Layer object defines a single layer, and contains a single attribute,displayName, whose value indicates the product described by the Layer element. Each Layer object contains a single Service element, described below.
Service
The Service object defines a single layer, and contains a single attribute,name, whose value indicates the name of the service that produced the data. The Service element contains the following elements.
- LayerName: This provides the name of the layer
- Style: This indicates the style in which the layer image has been generated
- ImageFormat: This provides the format of the layer image
- Times: This lists the times for which data is available. The structure of the Times element is defined below
Times
The Times object contains a number of Time elements. The value of each of these elements gives a time for which an observation is available, expressed in ISO8601 format.