Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Introduction

The FEWS Web Feature is the Delft-FEWS implementation of the OpenGIS WFS 2.0 OGC standard and is available since 2023.01. It allows requesting GML or GeoJSON feature data from plots that have been configured in the Delft-FEWS Grid Display. The WFS service can be seen as complementary to the WMS service, as it currently supports only gridplot types that contain vector data (e.g. polygons, polylines, points; currently only implemented for polygon features) instead of gridded datapolygon timeseries. The WMS service allows you to render these plots (feature or gridded data) to images, the WFS service provides access to the underlying vector data if the time series valueType is "polygon"Only gridPlot items that have been configured in the Grid Display configuration to show polygon data can be currently be accessed as a WFS 'Feature Type'. Additional geographic information like point and polyline map layers may also become available this way in the near future.

A valueType of polygon typically indicates that a polygon time series was calculated in FEWS based on a raster model of inundations where the polygon is different for each time step. Scalar time series which are linked to a locationSet containing polygons that are static (districts, catchments) currently can not be rendered using the WFS.

Developers documentation

For API Developers it is recommended to use the Open API Documentation. Please see<Work in progress>: https://fewsdocs.deltares.nl/webservices/wfs/apidoc/

The official OpenGIS documentation consists of two documents: the OpenGIS Web Feature Service 2.0 Interface Standard and the OpenGIS Filter Encoding 2.0 Encoding Standard, both of which are ISO certified standards.

WFS Request methods

The available request methods with their supported parameters are described here.

GetCapabilities

Get a list of the available polygon gridPlots. In WFS terminology these are 'FeatureTypes" and other information about the service. GetCapabilities will return its content as XML in accordance with the WFS 2.0 standard. Only version 2.0.0 of this standard is supported.

Request parameters

  • the GetCapabilities request has no parameters

...

Note: A Deltares namespace is used in this example to identify items that originate from Delft-FEWS, as identified by xmlns:deltares="http://deltares.nl". This is used as prefix for the gridplot-id values that have been taken from the spatial display configuration. The WFS standard more or less requires this. The namespace used by the WFS service can be changed in the WebServices.xml configuration.

GetFeature

Get the polygon GridPlot vector data in GML or GeoJSON format. The GridPlot to get is specified by the typenames  parameter. Optional filters can be used to request a specific subset of a feature type.

Request parameters

  • typenames (required): the gridPlot id of the plot to display. Only one gridPlot id is supported.
  • version (optional): supported version is 2.0.0 and is the default if not set. Older versions are not supported.
  • crs (optional, 'EPSG:4326' is the default): the output projection of the data. The default projection used by FEWS is always EPSG:4326 (WGS84 geographic coordinates; longitude, latitude). Other coordinate systems are supported only if they are configured in WebServices.xml.
  • format (optional, 'application/gml+xml; version=3.2' is the default): GML is the standard output format that any WFS implementation must support. Optionally 'application/geojson' can be requested instead. Geojson is more compact and generally easier to process.
  • bbox (optional): the bounding box (in the projection as defined by the CRS parameter) of the extent of interest. Any features that intersect the BBOX will be returned. Features that lie completely outside the BBOX area will not be returned.
  • filter (optional): a filter expression in URL-encoded XML format as specified in the OpenGIS Filter Encoding 2.0 Encoding Standard. Only the "Minimum Standard Filter" conformance class is currently implemented and tested. For more information, refer to WFS Request Filtering below.

Vendor-specific request parameters

  • time (optional): the time associated with the polygon data being requested. Only one time is supported. Time ranges are NOT supported. Time has to be in the XML date format:  yyyy-MM-ddTHH:mm:ssZ. The time parameter is identical to that of the Delft-FEWS WMS service for practical reasons. If no time parameter is specified, the most recent (current) forecast data will be returned. Please note that any options the OpenGIS Filter specifications offer to define a temporal extent have not yet been implemented in the Delft-FEWS WFS.
  • cql_filter (optional): similar to the filter parameter, a filter expression in CQL (Common Query Language) syntax can be specified to request a subset of features. This syntax is easier to use than the XML filter syntax. For more information, refer to WFS Request Filtering below.

...

The typical response in GML or GeoJSON for polygon data is too large to be displayed here.

DescribeFeatureType

Provides a detailed description of one or more feature types. The most important function of this request is to list the available feature attributes (Delft-FEWS timeSeries properties). The output format is an XML schema.

Request parameters

  • typeNames (required): the gridPlot id of one or more plots to display. If this is not specified, a list of feature types is provided as a list of uri's.
  • version (optional): supported version is 2.0.0 and is the default if not set. Older versions are not supported.

...

Code Block
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:deltares="http://deltares.nl" targetNamespace="http://deltares.nl">
    <xsd:import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
    <xsd:complexType name="r-1_shapeFWAType">
        <xsd:complexContent>
            <xsd:extension base="gml:AbstractFeatureType">
                <xsd:sequence>
                    <xsd:element minOccurs="0" name="geometry" nillable="true" type="gml:MultiGeometryPropertyType"/>
                    <xsd:element minOccurs="0" name="model_type" nillable="true" type="xsd:string"/>
                    <xsd:element minOccurs="0" name="model_reg" nillable="true" type="xsd:string"/>
                    <xsd:element minOccurs="0" name="model_id" nillable="true" type="xsd:string"/>
                    <xsd:element minOccurs="0" name="model_name" nillable="true" type="xsd:string"/>
                    <xsd:element minOccurs="0" name="remarks" nillable="true" type="xsd:string"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="r-1_shapeFWA" substitutionGroup="gml:AbstractFeature" type="deltares:r-1_shapeFWAType"/>
</xsd:schema>


ListStoredQueries

Get a list of 'stored queries' a WFS supports. The only stored query supported is the so-called "GetFeatureById" stored query. This request has been implemented because it is a requirement for the "simple" implementation of a WFS 2.0 service.

The ids, used mainly for the generation of GML output, are assigned sequentially; they are not linked to a specific property or attribute in Delft-FEWS.

Request parameters

  • version (optional): supported version is 2.0.0 and is the default if not set. Older versions are not supported

...

Code Block
<?xml version="1.0" encoding="UTF-8"?>
<ListStoredQueriesResponse  xmlns="http://www.opengis.net/wfs/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0.0/wfs.xsd">
    <StoredQuery id="urn:ogc:def:query:OGC-WFS::GetFeatureById">
        <Title>Get feature by identifier</Title>
    </StoredQuery>
</ListStoredQueriesResponse >

DescribeStoredQueries

Get a more detailed description of the 'stored queries' that the WFS supports. The only stored query supported is "GetFeatureById". This request has been implemented because it is a requirement for the "simple" implementation of a WFS 2.0 service.

The ids, used mainly for the generation of GML output, are assigned sequentially; they are not linked to a specific property or attribute in Delft-FEWS.

Request parameters

  • version (optional): supported version is 2.0.0 and is the default if not set. Older versions are not supported.

...

Code Block
<?xml version="1.0" encoding="UTF-8"?>
<DescribeStoredQueriesResponse  xmlns="http://www.opengis.net/wfs/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0.0/wfs.xsd">
    <StoredQueryDescription id="urn:ogc:def:query:OGC-WFS::GetFeatureById">
        <Title>Get feature by identifier</Title>
        <Parameter name="id" type="xs:string"/>
        <QueryExpressionText isPrivate="false" language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression" returnFeatureTypes=""/>
    </StoredQueryDescription>
</DescribeStoredQueriesResponse>

WFS Request Filtering

An important feature of the GetFeature request is filtering, which allows a subset of a feature set to be requested based on the feature properties/attributes, spatial extent, and/or time. The filtering parameters that can be applied are:

  • time
  • bbox
  • filter
  • cql_filter

TIME

The filtering using the TIME parameter works the same was as it does for the Delft-FEWS WMS service. A time parameter can be given on the request url in the format yyyy-MM-ddTHH:mm:ssZ 

...

Example request using the TIME parameter

Code Block
<to be added>

BBOX

The BBOX (Bounding BOX) filter allows you to specify a rectangular area in the format BBOX=<minX>,<minY>,<maxX>,<maxY>. This will return only the features that partially or completely intersect that rectangular area. If a CRS parameter is provided to the GetFeature request to return the data in a specific cartographic projection, the bounding box coordinates should also be provided in that projection.

Example request using the BBOX parameter

Code Block
<to be added>

FILTER

The standard FILTER parameter, which is part of the official OpenGIS WFS 2.0 specification, uses an XML-based syntax, which is documented in OpenGIS Filter Encoding 2.0 Encoding Standard.

...

This syntax is more or less unusable for manually putting together or interpreting WFS requests using filters. Fortunately, the CQL_FILTER parameter syntax (below) is more practical.

Code Block
<to be added>

CQL_FILTER

The CQL_Filter parameter uses the Common Query Language format, which was developed by the OGC consortium as part of the Catalogue Service for the Web specification (CSW) and is, for example, implemented by Geoserver, which is commonly considered the reference implementation of the WFS protocol. The CQL_FILTER parameter for the GetFeature request is therefore not part of the official standard specifications, but strongly recommended for use in http GET requests. A nice overview of the CQL syntax is provided in the Geoserver documentation, however a warning is in place that not all possible filters mentioned there are currently supported and only the simple logical operators like in the above example have been tested.

...

CQL_FILTER=region_id='123'+OR+region_id='124'

Code Block
<to be added>

Properties

The following WFS specific properties can be configured in the webservices.xml configuration:

...