Map overlay forecast imagery detailed documentation

Description of data feed

The forecast layer capabilities feed provides information on when the forecast layers that are currently available were issued, details the timesteps that are available, and lists the URIs at which they can be found. The forecast layer capabilities feed provides information on the available layers for the following products:

  • Forecast map layers screen temperature
  • Forecast map layers total cloud cover
  • Forecast map layers mean sea level pressure
  • Forecast map layers precipitation

Accessing the feed via its web service

Description of web service

The forecast layer capabilities web service can be used to retrieve the output of the forecast 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

  1. You would like to know the current forecast layer capabilities in XML format. In this case you would set the data type to xml.

    Example: to obtain capabilities for the forecast layers in XML format:

    http://datapoint.metoffice.gov.uk/public/data/layer/wxfcs/all/xml/capabilities?key=<API key>

    The above example would return a file of approximately 3 kB in size
  2. You would like to know the current forecast layer capabilities in JSON format. In this case you would set the data type to json.

    Example: to obtain capabilities for the forecast layers in JSON format:

    http://datapoint.metoffice.gov.uk/public/data/layer/wxfcs/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 forecast 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/wxfcs/all/xml/capabilities?key=<API key>

<?xml version="1.0"?>
<Layers type="Forecast">
<BaseUrl forServiceTimeFormat="Timesteps">
http://datapoint.metoffice.gov.uk/public/data/layer/wxfcs/{LayerName}/{ImageFormat}?RUN={DefaultTime}Z&amp;FORECAST={Timestep}</BaseUrl>
<Layer displayName="Rainfall">
<Service name="UKPPBEST">
<LayerName>Precipitation_Rate</LayerName>
<ImageFormat>png</ImageFormat>
<Timesteps defaultTime="2012-09-13T09:00:00">
<Timestep>0</Timestep>
<Timestep>3</Timestep>
<Timestep>6</Timestep>
<Timestep>9</Timestep>
<Timestep>12</Timestep>
<Timestep>15</Timestep>
<Timestep>18</Timestep>
<Timestep>21</Timestep>
<Timestep>24</Timestep>
<Timestep>27</Timestep>
<Timestep>30</Timestep>
<Timestep>33</Timestep>
<Timestep>36</Timestep>
</Timesteps>
</Service>
</Layer>
<Layer displayName="Cloud">
<Service name="UKPPBEST">
<LayerName>Total_Cloud_Cover</LayerName>
<ImageFormat>png</ImageFormat>
<Timesteps defaultTime="2012-09-13T09:00:00">
<Timestep>0</Timestep>
<Timestep>3</Timestep>
<Timestep>6</Timestep>
<Timestep>9</Timestep>
<Timestep>12</Timestep>
<Timestep>15</Timestep>
<Timestep>18</Timestep>
<Timestep>21</Timestep>
<Timestep>24</Timestep>
<Timestep>27</Timestep>
<Timestep>30</Timestep>
<Timestep>33</Timestep>
<Timestep>36</Timestep>
</Timesteps>
</Service>
</Layer>
<Layer displayName="CloudAndRain">
<Service name="UKPPBEST">
<LayerName>Total_Cloud_Cover_Precip_Rate_Overlaid</LayerName>
<ImageFormat>png</ImageFormat>
<Timesteps defaultTime="2012-09-13T09:00:00">
<Timestep>0</Timestep>
<Timestep>3</Timestep>
<Timestep>6</Timestep>
<Timestep>9</Timestep>
<Timestep>12</Timestep>
<Timestep>15</Timestep>
<Timestep>18</Timestep>
<Timestep>21</Timestep>
<Timestep>24</Timestep>
<Timestep>27</Timestep>
<Timestep>30</Timestep>
<Timestep>33</Timestep>
<Timestep>36</Timestep>
</Timesteps>
</Service>
</Layer>
<Layer displayName="Temperature">
<Service name="UKPPBEST">
<LayerName>Temperature</LayerName>
<ImageFormat>png</ImageFormat>
<Timesteps defaultTime="2012-09-13T09:00:00">
<Timestep>0</Timestep>
<Timestep>3</Timestep>
<Timestep>6</Timestep>
<Timestep>9</Timestep>
<Timestep>12</Timestep>
<Timestep>15</Timestep>
<Timestep>18</Timestep>
<Timestep>21</Timestep>
<Timestep>24</Timestep>
<Timestep>27</Timestep>
<Timestep>30</Timestep>
<Timestep>33</Timestep>
<Timestep>36</Timestep>
</Timesteps>
</Service>
</Layer>
<Layer displayName="Pressure">
<Service name="FRONTS">
<LayerName>Atlantic</LayerName>
<ImageFormat>png</ImageFormat>
<Timesteps defaultTime="2012-09-13T00:00:00">
<Timestep>0</Timestep>
<Timestep>12</Timestep>
<Timestep>24</Timestep>
<Timestep>36</Timestep>
<Timestep>48</Timestep>
<Timestep>60</Timestep>
<Timestep>72</Timestep>
<Timestep>84</Timestep>
</Timesteps>
</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/wxfcs/all/json/capabilities?key=<API key>

{
"Layers":{
"@type":"Forecast",
"BaseUrl":{
"@forServiceTimeFormat":"Timesteps",
"$":"http://datapoint.metoffice.gov.uk/public/data/layer/wxfcs/{LayerName}/{ImageFormat}?RUN={DefaultTime}Z&FORECAST={Timestep}"
},
"Layer":[
{
"@displayName":"Rainfall",
"Service":{
"@name":"UKPPBEST",
"LayerName":"Precipitation_Rate",
"ImageFormat":"png",
"Timesteps":{
"@defaultTime":"2012-09-13T09:00:00",
"Timestep":[0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36]
}
}
},
{
"@displayName":"Cloud",
"Service":{
"@name":"UKPPBEST",
"LayerName":"Total_Cloud_Cover",
"ImageFormat":"png",
"Timesteps":{
"@defaultTime":"2012-09-13T09:00:00",
"Timestep":[0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36]
}
}
},
{
"@displayName":"CloudAndRain",
"Service":{
"@name":"UKPPBEST",
"LayerName":"Total_Cloud_Cover_Precip_Rate_Overlaid",
"ImageFormat":"png",
"Timesteps":{
"@defaultTime":"2012-09-13T09:00:00",
"Timestep":[0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36]
}
}
},
{
"@displayName":"Temperature",
"Service":{
"@name":"UKPPBEST",
"LayerName":"Temperature",
"ImageFormat":"png",
"Timesteps":{
"@defaultTime":"2012-09-13T09:00:00",
"Timestep":[0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36]
}
}
},
{
"@displayName":"Pressure",
"Service":{
"@name":"FRONTS",
"LayerName":"Atlantic",
"ImageFormat":"png",
"Timesteps":{
"@defaultTime":"2012-09-13T00:00:00",
"Timestep":[0, 12, 24, 36, 48, 60, 72, 84]
}
}
}
]
}
}

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 'Forecast'. It also contains single BaseUrl element, which gives the base url of the forecast layer feeds. This can be used to derive the URLs of the feeds themselves. BaseUrl contains a single attribute, forServiceTimeFormat, which specifies the format in which the timesteps are presented. This always has the value 'Timesteps', as each timestep is presented as an integer representing the number of hours after a specified default time. It also contains a number of Layer elements, one for each product for which the forecast 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
  • Timesteps: This lists the timesteps for which data is available. The structure of the Timesteps element is defined below
Timesteps

The Timesteps object contains a single attribute,defaultTime, whose value indicates the time at which the forecast that generated the layers was run in ISO8601 format. The Timesteps object contains a number of Timestep elements. The value of each of these elements gives a time for which a forecast is available, expressed as a whole number of hours after the default time.