Versions Compared

Key

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

...

  • typeNames (required): the gridPlot id of the plot to display. Only one gridPlot id is supported.
  • version (optional): supported version is 2.0 and is the default if not set. Older versions are not supported
  • crs (optional): the output projection of the plot. The default projection used by FEWS is always EPSG:4326 (unprojected WGS84 longitude, latitude) Other projections are supported only if they are configured in webservices.,xml. 
  • bbox (optional): the bounding box (in the projection as defined by the CRS parameter) of the extent of interest. Features that completely lie outside the BBOX area will not be returned.
  • filter (optional): a filter expression in 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 has been tested.
    for more information see the section about filtering below.
  • format (optional, 'application/gml+xml; version=3.2' is the default): GML is the standard output format any WFS implementation must support, optionally 'application/geo json'  can be requested, which is more compact and generally easier to process..

...

  • time (optional): the time for which the polygon data is requested. Only one time is supported. Time ranges are NOT supported. Time has to be in the xml dateformat:  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 been implemented in Delft-FEWS WFS .

Restrictions:

  • at this moment.
  • cql_filter (optional): similar to the filter parameter, a filter expression in CQL (Common Query Language) syntax can be specified to request only a subset of features. This syntax is easier to use than the XML filter syntax, for more information see the section about filtering below.

Restrictions:

  • There currently are no restrictions on the output size of the WFS service, paging options that may help dealing with very large datasets have not yet been implemented.

...

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 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 FEWS WMS service, a time parameter can be given on the request url in the format yyyy-MM-ddTHH:mm:ssZ 

Polygon based plots in the FEWS spatial display configuration typically are timeseries of polygons, so by using the TIME parameter you can request the polygons that are in the datastore for a specific timestep. If no TIME parameter is specified the most recent timestep will be returned. It currently is not possible to request a timeseries of polygons in a single request, a separate request for each timestep in a timeseries would be required.

BBOX

The BBOX (Bounding box) filter also works the same way as it does for the WMS service, by specifying a rectangular area in the form BBOX=<minX>,<minY>,<maxX>,<maxY> you can request only the features that partially or completely overlap that rectangular area. If a CRS parameter is provided to the GetFeature request to request the data in a specific cartographic projection, the bounding box coordinates should also be provided in that projection.

Filter

The standard FILTER parameter which is part of the official OpenGIS WFS 2.0 specification uses a XML based syntax, which has been documented in a separate document, OpenGIS Filter Encoding 2.0 Encoding Standard.

Only the "Minimum Standard Filter" conformance class is currently implemented, which means that the logical operators PropertyIsEqualTo, PropertyIsNotEqualTo, PropertyIsLessThan, PropertyIsGreaterThan,
PropertyIsLessThanOrEqualTo and PropertyIsGreaterThanOrEqualTo can be used and chained together using And / Or operators.

Now the problem with the standard XML based filter syntax is that the FEWS WFS implementation at this point only supports http GET methods, where all request parameters need to be passed on on the request url using NVP (Name-Value pair) syntax, and the XML for the filter parameter needs to be 'URL encoded"

To give an example, a project where the polygons have a property 'region_id' one could specify a filter for the WFS getFeature request in XML like like this:

<Filter>
  <PropertyIsEqualTo>
    <PropertyName>region-id</PropertyName>
    <Literal>123</Literal>
  </PropertyIsEqualTo>
</Filter>

Now this would need to be put on a single line and 'URL encoded' to get the FILTER parameter:

FILTER=%3CFilter%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3Eregion_id%3C%2FPropertyName%3E%3CLiteral%3123%3C%2FLiteral%3E%3C%2FPropertyIsEqualTo%3E%3C%2FFilter%3E

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

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. So the CQL_Filter parameter for the GetFeature request is not part of the official standard specifications, but strongly recommended for use in http GET requests,

The filter that was used as an example in the previous section in CQL syntax looks like this:

CQL_FILTER=region_id='123'

Multiple logical operators can be grouped together using AND / OR like this:

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


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 at this point.

Properties

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

...