GO Publisher WFS 2.0 FES2.0
Snowflake Software's GO Publisher has been extended to support the latest version of the OGC Web Feature Service (WFS) 2.0 and Filter Encoding Specification (FES) 2.0 which are the sibling standards to GML3.2.1 and introduce new ways to interact with spatial and temporal data. This is key functionality for fully implementing a number of important GML exchange schemas.
Notable schemas which use GML3.2.1, WFS 2.0 & FES 2.0
- AIXM5.1 - Aeronautical Information Exchange Model
- WXXM1.1 - Weather Exchange Model
- INSPIRE - Infrastructure for Spatial Information in Europe to support environmental policies
- CAFE - Clean Air For Europe initiative
AIXM 5.1 WFS 2.0 "Republic of Donlon" Demo
The web services below show GO Publisher's ability to serve AIXM5.1 GML using WFS2.0.
It uses the sample AIXM 5.1 dataset available from the downloads section of the www.aixm.aero Website. The data is in the form of a BasicMessage files that contains BASELINE data for the "Republic of Donlon".
We loaded the DonLon AIXM 5.1 GML data into Oracle 11g using GO Loader1.6 and published it back out using the
GO Publisher WFS serving AIXM5.1.
AIXM 5.1 WFS Landing page
http://demo.snowflakesoftware.com:8080/AIXM51_DONLON_WFS20
WFS Landing page where POST Queries can be sent
http://demo.snowflakesoftware.com:8080/AIXM51_DONLON_WFS20/httpPost.jsp
GetCapabilities WFS 2.0
The GetCapabilities request is the most important query as it provides information related to the options provided by the target WFS. The GetCapabilities WFS 2.0 request has replaced the parameter 'version' with 'acceptversions'.
GetCapabilities WFS 2.0.0 (acceptversions)
WFS2.0 GetCapabilities (acceptversions 1.1.0)
GetCapabilities WFS 1.1.0 (version)
http://demo.snowflakesoftware.com:8080/AIXM51_DONLON_WFS20/GOPublisherWFS?service=wfs&version=1.1.0&request=GetCapabilities
DescribeFeature
WFS2.0 FES Namespace
The WFS2.0 Filter Encoding Standard 2.0 (FES) uses a different namespace from the WFS1.1 Filter Encoding. The queries to the WFS2.0 should only use the new FES2.0 namespace.
WFS1.1 : xmlns:ogc="http://www.opengis.net/ogc"
WFS2.0 : xmlns:fes="http://www.opengis.net/fes/2.0"
Changes between WFS1.1 and WFS2.0
There are a number of changes in the parameters used in the WFS2.0 Filter Encoding Standard.
One notable changes is to ogc:PropertyName which has been replaced by fes:ValueReference
<fes:PropertyIsEqualTo>
<fes:ValueReference> timeSlice/AirportHeliportTimeSlice/designator</fes:ValueReference>
<fes:Literal>KDFW</fes:Literal>
</fes:PropertyIsEqualTo>
Another change is to the names of some of the comparison operators
ogc:PropertyIsGreaterThanEqualTo
........becomes.............
fes:PropertyIsGreaterThanOrEqualTo
ogc:PropertyIsLessThanEqualTo
........becomes............
fes:PropertyIsLessThanOrEqualTo
ogc:PropertyIsNullCheck
........becomes............
fes:PropertyIsNil
fes:PropertyIsNull
Common WFS GET requests
Query By FeatureId
Query By TypeName
Query By ResourceId
Bounding Box query
Temporal WFS2.0 Query
WFS2.0 introduces the following Filter Encoding Standard (FES) 2.0 Temporal Operators.
After, Before, Begins, BegunBy,TContains, During,TEquals, TOverlaps, Meets, OverlappedBy, MetBy, Ends, EndedBy
An "any interaction" temporal query has been a common query and this can be achieved using 'fes:And' or 'fes:Or' logical operators to combine multiple FES2.0 Temporal Operators. Using the 'fes:Not' logical operators the "any interaction" temporal query can be obtained using only four FES2.0 Temporal Operators (NOT Before OR After OR Meets OR MetBy)
WFS HTTP Post Request
This sample AIXM5.1 POST query combines Spatial and Temporal filters.
Stored Queries
Stored Queries allow complex temporal and spatial queries to be simplified.
ListStoredQueries returns a list of available stored queries:
DescribeStoredQueries provides information related to a stored query:
GetFeatureByID is a mandatory stored query which returns a feature using the parameter ID which is the gml:id of the feature:
GetFeatureById stored Query
Custom Stored Queries - AirportHeliportByDesignatorQuery
Describe custom stored query for AirportHeliportByDesignatorQuery
Use the AirportHeliportByDesignatorQuery stored Query
Custom Stored query simplifying Spatial and Temporal filters
Spatial and Temporal Post queries can be simplified using a Custom Stored query. The AirportHeliportTemporalBufferQuery.
"AirportHeliportTemporalBufferQuery" Stored Query
Stored Query Id
- urn:snowflake:def:query:AirportHeliportTemporalBufferQuery
Temporal TimePosition
- "beginPosition" =2009-10-28T13:12:00.000Z
- "endPosition" =2009-10-30T09:00:00.000Z
Spatial Buffer
- buffer "distance" = 20
- geometry "lineString" = -33 52 -32.5 52.5
WSDL Web Service Definition Language
Link to the WSDL describing of the Snowflake AIXM 5.1 WFS
http://demo.snowflakesoftware.com:8080/AIXM51_DONLON_WFS20/GOPublisherWFS?wsdl
SOAP request via HTTP for WFS 2.0
Snowflake WFS 2.0 HTTP Post requests in a SOAP envelope with the response returned within a SOAP envelope.
WFS Landing page where POST Queries can be sent
http://demo.snowflakesoftware.com:8080/AIXM51_DONLON_WFS20/httpPost.jsp
SOAP WFS2.0 GetFeature HTTP Post query
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header/>
<soap:Body>
<wfs:GetFeature
service="WFS"
version="2.0.0"
outputFormat="application/gml+xml; version=3.2"
xmlns:wfs="http://www.opengis.net/wfs/2.0"
xmlns:aixm="http://www.aixm.aero/schema/5.1"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:gml="http://www.opengis.net/gml/3.2"
xmlns:fes="http://www.opengis.net/fes/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/wfs.xsd
http://www.opengis.net/gml/3.2
http://schemas.opengis.net/gml/3.2.1/gml.xsd">
<wfs:Query typeName="aixm:AirportHeliport" handle="Q01">
<fes:Filter>
<fes:PropertyIsEqualTo>
<fes:ValueReference> timeSlice/AirportHeliportTimeSlice/designator</fes:ValueReference>
<fes:Literal>EADH</fes:Literal>
</fes:PropertyIsEqualTo>
</fes:Filter>
</wfs:Query>
</wfs:GetFeature>
</soap:Body>
</soap:Envelope>
SOAP WFS2.0 GetCapabilities? HTTP Post query
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xsi:schemaLocation="http://www.opengis.net/wfs/2.0
http://schemas.opengis.net/wfs/2.0/wfs.xsd
http://schemas.xmlsoap.org/soap/envelope/ http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header/>
<soap:Body>
<GetCapabilities
xmlns="http://www.opengis.net/wfs/2.0"
xmlns:ows="http://www.opengis.net/ows/1.1"
xmlns:xlink="http://www.w3.org/1999/xlink"
service="WFS">
<ows:AcceptVersions>
<ows:Version>2.0.0</ows:Version>
</ows:AcceptVersions>
</GetCapabilities>
</soap:Body>
</soap:Envelope>
GetPropertyValue
The GetPropertyValue query returns just the property value speicified for the fetatures returned by the filter query.
Post Query to return just the lat long coordinate text of the geometry.. "//aixm:ElevatedPoint/gml:pos/text()"
Response
<wfs:ValueCollection xmlns:wfs="http://www.opengis.net/wfs/2.0" numberReturned="1">
<wfs:member> -31.9494444444444 52.3883333333333 </wfs:member>
</wfs:ValueCollection>
Post Query to return just the valid time properties of a feature. "//gml:validTime"
Response
<wfs:ValueCollection xmlns:wfs="http://www.opengis.net/wfs/2.0" numberReturned="1">
<wfs:member>
<gml:validTime xmlns:gml="http://www.opengis.net/gml/3.2">
<gml:TimePeriod gml:id="vtEADH1">
<gml:beginPosition> 2009-01-01T00:00:00.000Z </gml:beginPosition>
<gml:endPosition> 9999-12-31T23:59:59.000Z </gml:endPosition>
</gml:TimePeriod>
</gml:validTime>
</wfs:member>
</wfs:ValueCollection>