WFS Time Series Data

Open Data WFS service of the Finnish Meteorological Institute uses stored queries that provide surface weather observations and point forecasts.

Data is available in two formats: multipointcoverage and timevaluepair.

Multipointcoverage is more compact format. But, timevaluepair is fully INSPIRE compatible. Surface weather observations can be queried spatially (bbox) or by using the nearest station location name. Point forecasts can be queried by using the nearest station location name.

Stored query parameters

Parameter list for a stored query is part of the stored query description that can be requested with

or you may also check the descriptions from FMI WFS Services page.

Narrow down the query by using stored query identifier parameter:

  • &storedquery_id=fmi::observations::weather::multipointcoverage

For example, get description of the stored query mentioned above by using storedquery_id in the request:

After you have decided which storedquery_id to use, you can request the observation or forecast data from the service. For example, you may want to request forecast data for Helsinki. You examine available stored queries and end up to use fmi::forecast::harmonie::surface::point::multipointcoverage stored query which supports the place parameter. You give the value and get data for Helsinki with default values for other parameters:

Examples & Guidelines page gives more examples on how to use stored queries. If you are interested in using JavaScript for stored queries, see description of MetOLib below.

JavaScript

MetOLib is a JavaScript library that provides implementation of API classes that may be used to request weather data from the Web Feature Service (WFS) server of the Finnish Meteorological Institute INSPIRE Atmospheric Features and Geographical Meteorological Features guidelines compatible WFS Download Service server at http://opendata.fmi.fi.

MetOLib provides a good JavaScript reference implementation for WFS requests. MetOLib can be used to request data from server and to get parsed XML data as JavaScript objects. Also, MetOLib provides cache for requested data.

Get MetOLib from GitHub. MetOLib readme file gives information on how to get started.

An example implementation can be found on http://ilmatieteenlaitos.fi/sadealueet-suomessa

MetOLib example

See API documentation and comments from source code to get more information about functions and parameter objects.

var SERVER_URL = "http://opendata.fmi.fi/wfs"; var STORED_QUERY_OBSERVATION = "fmi::observations::weather::multipointcoverage"; var connection = new fi.fmi.metoclient.metolib.WfsConnection(); if (connection.connect(SERVER_URL, STORED_QUERY_OBSERVATION)) { // Connection was properly initialized. So, get the data. connection.getData({ requestParameter : "td", begin : new Date(1368172800000), end : new Date(1368352800000), timestep : 60 * 60 * 1000, sites : "Helsinki", callback : function(data, errors) { // Handle the data and errors object in a way you choose. handleCallback(data, errors); // Disconnect because the flow has finished. connection.disconnect(); } }); }