WFS Examples & Guidelines

Stored queries

If you want to know more about how to decide which storedquery_id to use, see Time series data page.

After you have gotten your API-key and have decided which storedquery_id to use, you may request the actual observation or forecast data from the service. 

For example, you may request forecast data for Helsinki with default values for other parameters:

Stored query parameters can be used to limit the queries, for example, to certain areas, locations, time period and features.

Simplified parameter list for stored queries:

  • bbox (for example: &bbox=22,64,24,68)
  • timestep (in minutes, for example: &timestep=40)
  • parameters (check possible parameters from server response by using stored query request without limitations, for example: &parameters=temperature,windspeedms)
  • crs (check supported projections from getCapabilities-responnse, for example: &crs=EPSG::3067)
  • starttime (for example: &starttime=2013-02-28T20:00:00Z)
  • endtime (for example: &endtime=2013-02-30T20:00:00Z)
  • maxlocations (number of stations to search for in the vicinity of the requested locations)
  • place (multiple places can be defined by using parameter multiple times, for example: &place=kumpula,Helsinki&place=kirkkonummi)

List of all the supported stored queries can be found from FMI WFS Services page.

Registration

Registration for API-key is required to use open data service interfaces.

Services contain API-key specific request limitations:

  • Download Service has limit of 20000 requests per day for a single API-key
  • View Service has limit of 10000 requests per day for a single API-key
  • Download and View Services have combined limit of 600 requests per 5 minutes for single API-key

Guidelines for stored queries

Timesteps should be adjusted according to requested time period and according to actual need for specific data. For example, short 10 minutes timestep may not be adequate for longer time periods and such queries may result in huge data sets. Therefore, longer timestep, for example 1 hour or 1 day, may be adequate for such cases. Data may be received much faster and more efficiently when only necessary data is queried.

Choose begintime and timestep properly or expected data values may not be received from the service. Proper observation and forecast data values are given only if data is available for queried time positions. The queried timesteps should be relative to an exact hour and also divisible by the actual observation interval. For example, if begintime has been set for 2013-05-12T10:22:00.000Z with timestep of 20 minutes and feature observation interval has been 10 minutes, no proper data values are received from the service because requested timesteps 11:22, 11:42, etc. do not match actual observation times that would be 11:20, 11:30, etc. Notice also, every second step of 15 minutes timestep would result to unwanted time positions if observation interval has been 10 minutes because 15 is not divisible by 10.

Timevaluepair examples for stored queries

Spatial query uses bbox parameter. Notice, projection information may also be included in bbox value if response should be in different projection than bbox values. For example, &bbox=22,64,24,68,epsg:4326 could also be used below. Query for combined list of time-value-pairs for temperature and windspeed data in EPSG::3067 projection:

Also, location name can be used for query. For example, query for all the time-value-pair data from the closest station to Jaala by using 30 minutes timestep:

Query for point forecast for Jaala as list of time-value-pairs:

Multipointcoverage examples for stored queries

Spatial query uses bbox parameter. Notice, projection information may also be included in bbox value if response should be in different projection than bbox values. For example, &bbox=22,64,24,68,epsg:4326 could also be used below. Query for combined list of positions and values for temperature and windspeed data in EPSG::3067 projection:

Also, location name can be used for query. For example, query for all the data from the closest station to Jaala by using 30 minutes timestep:

Query for point forecast for Jaala as list of positions and values: