You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 37 Next »

Introduction

The FEW Web Mapping Service with time support is the FEWS implementation of the WMS-T OGC standard and is available since 2018.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.

GetCapabilties

GetCapabilities: get the available layers and times available for each layer at the current system time. GetCapabilties will return its content as XML by default. A json format is supported as well, which is more convenient for web development.

Request parameters

  • FORMAT (string, optional): Format of the response. Options are: application/xml or application/json. The default format is application/xml.

Response

XML or JSON response with all available gridPlots nested by gridPlotGroupds.

Example request

http://localhost:8080/FewsWebServices/wms?request=GetCapabilities&format=application/xml


Example xml response

<WMS_Capabilities xmlns="http://www.opengis.net/wms" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/wms http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd" version="1.3.0">
	<Service>
		<Name>WMS</Name>
		<Title>
Delft-FEWS Web Mapping Service with time support (WMS-T)
</Title>
	</Service>
	<Capability>
		<Request>
			<GetCapabilities>
				<Format>application/xml</Format>
				<Format>application/json</Format>
			</GetCapabilities>
			<GetMap>
				<Format>image/png</Format>
			</GetMap>
		</Request>
		<Exception>
			<Format>XML</Format>
		</Exception>
		<Layer>
			<Title>Delft-FEWS Web Mapping Service layers</Title>
			<CRS>EPSG:3857</CRS>
			<BoundingBox CRS="EPSG:3857" maxx="20037508.342789" maxy="20037508.342789" minx="-20037508.342789" miny="-20037508.342789"/>
			<Layer>
				<Name>Satellite precipitation</Name>
				<Title>Satellite precipitation</Title>
				<Layer queryable="1">
					<Name>Precipitation GPM [mm]</Name>
					<Title/>
					<Dimension units="ISO8601" name="time">
2018-10-05T12:30:00Z,2018-10-05T13:00:00Z,2018-10-05T13:30:00Z,2018-10-05T14:00:00Z,2018-10-05T14:30:00Z,2018-10-05T15:00:00Z,2018-10-05T15:30:00Z
</Dimension>
				</Layer>
			</Layer>
		</Layer>
	</Capability>
</WMS_Capabilities>

Example JSON response

{
  "title" : "Loire Spatial Data Display",
  "layers" : [ {
    "name" : "Precipitation GPM [mm]",
    "title" : "",
    "groupName" : "Satellite precipitation",
    "groupTitle" : "Satellite precipitation",
    "times" : [ "2018-10-05T12:30:00Z", "2018-10-05T13:00:00Z", "2018-10-05T13:30:00Z", "2018-10-05T14:00:00Z", "2018-10-05T14:30:00Z", "2018-10-05T15:00:00Z", "2018-10-05T15:30:00Z" ]
  }
}

 

GetMap

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.

Request parameters

  • 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

Vendor parameters:

  • SHOWCONTOURS (optional): Display contour lines if enabled in the gridplot. Default is false. Set to true to show contour lines.

Restrictions:

  • 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.

Response

Transparent PNG image of the requested gridPlot for the specified timeStep, size and extent.

Example request

http://localhost:8080/FewsWebServices/wms?service=WMS&request=GetMap&version=1.3&layers=Temp_forecast_nwp&crs=EPSG%3A3857&time=2018-09-01T00%3A00%3A00.000Z&width=920&height=500&bbox=-1261269.140637805,4786137.922323937,1921144.283455659,6515710.435418212

Example png response

GetLegendGraphic

GetLegendGraphic: Get the legend image as png for a layer.

http://localhost:8080/FewsWebServices/wms?SERVICE=WMS&VERSION=1.3&REQUEST=GetLegendGraphic&LAYERS=Wind_forecast_nwp

 

 

Properties

 

The following WMS specific properties can be configured in the FewsPiService.properties file.

 

  • 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 84600 seconds (one day). 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.

ICT requirements

 

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.

Since the WMS service is stateless, it can be easily scaled up by using multiple tomcat instances and a load balancer in front.

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.

 

<Connector port="8080" maxThreads="50" minSpareThreads="10" maxSpareThreads="20"
               enableLookups="false" redirectPort="4443" acceptCount="100"
               debug="0" connectionTimeout="60000" 
               disableUploadTimeout="true" />





  • No labels