The FEW Web Mapping Service with time support is the FEWS implementation of the WMS-T OGC standard and is available since 2017.02. It allows requesting images for plots that have been configured in the FEWS grid display. The WMS version that is supported is version 1.3. The EPSG:3857 projection (WGS84 Web Mercator) is supported.
Every gridPlot that has been configured in the grid display configuration represents a WMS layer.
WMS Request methods
The available request methods with their supported parameters are described here.
Get the available gridPlots and times available for each gridPlot at the current system time. GetCapabilties will return its content as XML by default. JSON is supported as well, which is more convenient for web development.
- format (string, optional): Format of the response. Options are: application/xml or application/json. The default format is application/xml.
XML or JSON response with all available gridPlots nested by gridPlotGroupds.
Example xml response
Example JSON response
Get the plot image as png for a layer for a requested time, image size and extent. Only untiled images are supported, which means the complete image has to be requested for the complete extent.
- layers (required): the layerId of the plot to display. Only one layerid is supported.
- time (required): the time for which the grid has to be plotted. Only one time is supported. Time ranges are NOT supported. Time has to be in the xml dateformat: yyyy-MM-ddTHH:mm:ssZ. The times returned by the GetCapabilities are in this format as well.
- width (optional): width of the image. Default is 800.
- height (optional): height of the image. Default is 600
- version (optional): supported version is 1.3 and is the default if not set. Older versions might work, but are not supported
- crs (required): the output projection of the plot. Only supported projection is: EPSG:3857
- bbox (required): the bounding box (in the projection as defined by the SRS parameter) of the extent that should be plot
- showContours (optional, since 2018.02): Display contour lines if enabled in the gridplot. Default is false. Set to true to show contour lines.
- The product of width and height is limited to the full HD resolution of 1920x1200 to avoid memory issues. In case a GetMap request is done where WIDTH*HEIGHT > 2304000 a bad request error will be returned.
Transparent PNG image of the requested gridPlot for the specified timeStep, size and extent.
Example png response
Get the legend image as png for a specified gridPlotId.
- layers (required): the gridPlotId of the gridPlot which legend should be displayed. Only one gridPlotId is supported.
- width (optional): width of the legend. Default is 150.
- height (optional): height of the image. The default is based on the number of legend items, 15 pixels per item.
Transparent PNG image of the requested legend graphics for the specified gridPlotId and size.
Example png response
The following WMS specific properties can be configured in the FewsPiService.properties file. For more information on properties, see: FEWS Web Services configuration FewsPiService.properties
WMS_BASE_URL: url that will be reported in the GetCapabilities response as URL to be used to request maps.
WMS_CLIENT_CACHE_TIMEOUT: Timeout of the cache in seconds, that is sent to the browser. default is 300 seconds (15 minutes). To disable caching, set the timeout to 0.
- WMS_ALLOWED_GRID_PLOT_GROUP_ID: Id of the grid plot group which layers will be made available in the WMS service. If not configured, all layers are available.
- WMS_IMAGE_MAX_WIDTH_HEIGHT: The maximum size of the WIDTH and HEIGHT product GetMap parameters. The default is set to 2304000 (the full HD resolution of 1920x1200). N.B.: The higher this value is set, the more memory is required to generated the WMS images.
For general FewsWebServices requirements, see: Installation
Specific requirements for the FEWS WMS service very much depend on the number of layers that are used and the size of the layer grids. To avoid memory issues the number of layers should be restricted by specifying the WMS_ALLOWED_GRID_PLOT_GROUP_ID property.
The tomcat server the WMS service is running on should have sufficient memory. When many concurrent users are using the WMS service the CPU requirements will increase as well since all images have to be rendered at the same time on the same server. It is recommended to start at least with 2GByte of memory with the -Xmx2G JVM parameter.
Since the WMS service is stateless, it can be scaled both vertically (more cpu and memory) and horizontally (more tomcat instances)..
Tomcat itself can also be tuned by specifying the number of concurrent requests. In case memory errors occur, the tomcat server.xml can be tuned to limit the number of concurrent requests. In the tomcat server.xml the maxThreads parameter specifies the maximum number of concurrent requests that are allowed. For Tomcat 7 this is set to 200 by default, which is quite a lot for a WMS service. See the following example where the tomcat server.xml has been configured with a maximum of 50 threads.