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

https://demo.snowflakesoftware.com/go-publisher-wfs/httpGet/AIXM_v51_Donlon

WFS Landing page where POST Queries can be sent

https://demo.snowflakesoftware.com/go-publisher-wfs/httpPost/AIXM_v51_Donlon

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)

https://demo.snowflakesoftware.com/go-publisher-wfs/AIXM_v51_Donlon/wfs?service=wfs&acceptversions=2.0.0&request=GetCapabilities

WFS2.0 GetCapabilities (acceptversions 1.1.0)

https://demo.snowflakesoftware.com/go-publisher-wfs/AIXM_v51_Donlon/wfs?service=wfs&acceptversions=1.1.0&request=GetCapabilities

DescribeFeature

https://demo.snowflakesoftware.com/go-publisher-wfs/AIXM_v51_Donlon/wfs?service=wfs&version=2.0.0&request=DescribeFeatureType&typename=*

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 Feature Id

https://demo.snowflakesoftware.com/go-publisher-wfs/AIXM_v51_Donlon/wfs?service=wfs&version=2.0.0&request=GetFeature&TYPENAME=aixm:RunwayElement&featureid=uuid.7a8f00e8-15f0-402f-9562-3c109999d545

Query By TypeName

https://demo.snowflakesoftware.com/go-publisher-wfs/AIXM_v51_Donlon/wfs?service=wfs&version=2.0.0&request=DescribeFeatureType&typename=*

https://demo.snowflakesoftware.com/go-publisher-wfs/AIXM_v51_Donlon/wfs?service=WFS&version=2.0.0&request=GetFeature&TYPENAME=aixm:Navaid,aixm:AirportHeliport

Query By ResourceId

https://demo.snowflakesoftware.com/go-publisher-wfs/AIXM_v51_Donlon/wfs?service=WFS&version=2.0.0&request=GetFeature&TYPENAME=aixm:RunwayElement&RESOURCEID=uuid.7a8f00e8-15f0-402f-9562-3c109999d545

https://demo.snowflakesoftware.com/go-publisher-wfs/AIXM_v51_Donlon/wfs?service=WFS&version=2.0.0&request=GetFeature&TYPENAME=aixm:RunwayElement&RESOURCEID=uuid.7a8f00e8-15f0-402f-9562-3c109999d545,uuid.e24947bb-5083-433e-b125-89199c1d1233

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.
Here’s the query, try it for yourself by pasting the query below into the WFS HTTP Post Request dialogue box here: https://demo.snowflakesoftware.com/go-publisher-wfs/httpPost/AIXM_v51_Donlon.

<?xml version="1.0" encoding="UTF-8"?>
<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: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:And>
<fes:Not>
<fes:Or>
<fes:Before>
<fes:ValueReference>aixm:timeSlice//gml:validTime</fes:ValueReference>
<fes:Literal>
<gml:TimePeriod gml:id="id1">
<gml:beginPosition>2009-10-30T00:00:00.000Z</gml:beginPosition>
<gml:endPosition>2009-10-31T00:00:00.000Z</gml:endPosition>
</gml:TimePeriod>
</fes:Literal>
</fes:Before>
<fes:After>
<fes:ValueReference>aixm:timeSlice//gml:validTime</fes:ValueReference>
<fes:Literal>
<gml:TimePeriod gml:id="id2">
<gml:beginPosition>2009-10-30T00:00:00.000Z</gml:beginPosition>
<gml:endPosition>2009-10-31T00:00:00.000Z</gml:endPosition>
</gml:TimePeriod>
</fes:Literal>
</fes:After>
<fes:Meets>
<fes:ValueReference>aixm:timeSlice//gml:validTime</fes:ValueReference>
<fes:Literal>
<gml:TimePeriod gml:id="id3">
<gml:beginPosition>2009-10-30T00:00:00.000Z</gml:beginPosition>
<gml:endPosition>2009-10-31T00:00:00.000Z</gml:endPosition>
</gml:TimePeriod>
</fes:Literal>
</fes:Meets>
<fes:MetBy>
<fes:ValueReference>aixm:timeSlice//gml:validTime</fes:ValueReference>
<fes:Literal>
<gml:TimePeriod gml:id="id4">
<gml:beginPosition>2009-10-30T00:00:00.000Z</gml:beginPosition>
<gml:endPosition>2009-10-31T00:00:00.000Z</gml:endPosition>
</gml:TimePeriod>
</fes:Literal>
</fes:MetBy>
</fes:Or>
</fes:Not>
<fes:DWithin>
<fes:ValueReference> timeSlice//ElevatedPoint</fes:ValueReference>
<gml:LineString srsName="urn:ogc:def:crs:OGC:1.3:CRS84">
<gml:pos>-32.5 52 -31.5 53</gml:pos>
</gml:LineString>
<fes:Distance uom="[NMI_I]">200</fes:Distance>
</fes:DWithin>
</fes:And>
</fes:Filter>
</wfs:Query>
</wfs:GetFeature>

Stored Queries

Stored Queries allow complex temporal and spatial queries to be simplified.
ListStoredQueries returns a list of available stored queries:

https://demo.snowflakesoftware.com/go-publisher-wfs/AIXM_v51_Donlon/wfs?service=WFS&version=2.0.0&request=ListStoredQueries

DescribeStoredQueries provides information related to a stored query:

https://demo.snowflakesoftware.com/go-publisher-wfs/AIXM_v51_Donlon/wfs?service=WFS&version=2.0.0&request=DescribeStoredQueries&STOREDQUERY_ID=urn:ogc:def:query:OGC-WFS::GetFeatureById

GetFeatureById stored Query

https://demo.snowflakesoftware.com/go-publisher-wfs/AIXM_v51_Donlon/wfs?service=WFS&version=2.0.0&request=GetFeature&TYPENAME=aixm:RunwayElement&RESOURCEID=uuid.7a8f00e8-15f0-402f-9562-3c109999d545,uuid.e24947bb-5083-433e-b125-89199c1d1233

Custom Stored query simplifying Spatial and Temporal filters

Spatial and Temporal Post queries can be simplified using a Custom Stored query. The AirportHeliportTemporalBufferQuery.

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

https://demo.snowflakesoftware.com/go-publisher-wfs/AIXM_v51_Donlon/wfs?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
https://demo.snowflakesoftware.com/go-publisher-wfs/httpPost/AIXM_v51_Donlon

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()”
Here’s the query, try it for yourself by pasting the query below into the WFS HTTP Post Request dialogue box here: https://demo.snowflakesoftware.com/go-publisher-wfs/httpPost/AIXM_v51_Donlon.

<?xml version="1.0" encoding="UTF-8"?>
<wfs:GetPropertyValue 
service="WFS" 
version="2.0.0" 
valueReference="//aixm:ElevatedPoint/gml:pos/text()"
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>EADD</fes:Literal>
</fes:PropertyIsEqualTo>
</fes:Filter>
</wfs:Query>
</wfs:GetPropertyValue>

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”
Here’s the query, try it for yourself by pasting the query below into the WFS HTTP Post Request dialogue box here: https://demo.snowflakesoftware.com/go-publisher-wfs/httpPost/AIXM_v51_Donlon.

<?xml version="1.0" ?>
<wfs:GetPropertyValue 
service="WFS" 
version="2.0.0" 
valueReference="//gml:validTime"
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>EADD</fes:Literal>
</fes:PropertyIsEqualTo>
</fes:Filter>
</wfs:Query>
</wfs:GetPropertyValue>

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>
By | 2012-03-01T16:23:49+00:00 March 1st, 2012|News, Snowflake Labs, Web Services|