AIXM 5.1 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
OWS7 AIXM 5.1 WFS 2.0 Demo
The web services below show GO Publisher's ability to serve AIXM5.1 GML using WFS2.0.
The test AIXM 5.1 data was derived from a range of sources supplied during the OWS-7 Interoperability Testbed and covers North America and Northern Europe. The Source data was suppiled in a mix of AMDB GML 3.1.1, DAIM GML 2.1, AIXM5.0 and AIXM5.1formats and was loaded into an Oracle 10g database using GOLoader1.6 and translated and exported using GOPublisher1.5 as AIXM5.1 GML3.2.1. The resulting AIXM5.1 data was then loaded into an Oracle 11g database using GOLoader1.6 as the source for the OWS7 GOPublisher 1.5 WFS2.0 service.
DISCLAIMERThis is TEST DATA which is for testing purposes only, it is NOT maintained and it is NOT accurate and shall NOT be used for any operational purpose.
|
Links to OWS7 AIXM 5.1 WFS 2.0 Demo landing page
AIXM 5.1 WFS Landing page
http://demo.snowflakesoftware.com/AIXM51_WFS2
WFS Landing page where POST Queries can be sent
http://demo.snowflakesoftware.com/AIXM51_WFS2/httpPost.jsp
GetFeature WFS2.0 (maxfeatures 10 sample)
- aixm:AirportHeliport
- aixm:Navaid
- aixm:Runway
- aixm:RunwayElement
- aixm:Taxiway
- aixm:TaxiwayElement
- aixm:Route
- aixm:RouteSegment
- aixm:VerticalStructure
- aixm:GeoBorder
- aixm:Airspace
- aixm:AirTrafficControlService
- aixm:OrganisationAuthority
- aixm:Unit
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/AIXM51_WFS2/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
ResultType HITS - returns just the the number of features returned by the query.
Response
<wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs" numberOfFeatures="24" timeStamp="2010-08-11T10:38:24.813"/>
Temporal WFS2.0 Query
WFS2.0 introduces the following Filter Encoding Standard (FES) 2.0 Temporal Operators.
AnyInteracts, 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.
WFS HTTP Post Request - AnyInteracts
Sample AIXM5.1 POST query combines (fes:AnyInteracts) Temporal and (DWithin) Spatial filters. The spatial filters now using the UCUM Nautical Mile unit of [NMI_I].
WFS HTTP Post Request - NOT Before OR After OR Meets OR MetBy
Sample AIXM5.1 POST query combines (DWithin) Spatial and (NOT Before OR After OR Meets OR MetBy) Temporal filters. This is an old way of obtaining "any interaction" type temporal query can be obtained using only four FES2.0 Temporal Operators (NOT Before OR After OR Meets OR MetBy) which has been superceded by fes:AnyInteracts temporal filter. It may still be of interest. The UCUM Nautical Mile unit of [NMI_I] is used by the spatial filters..
Note: The WFS Post request using the AnyInteracts filter is simpler and more compact however the same result is returned by both filter queries
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
Creating Stored Queries
In order to create a new WFS Stored Queries you must send a 'CreateStoredQuery' request to the WFS which this is them stored internally. The ID of the Stored query can not be the same as an existing stored query ID currently in the WFS. The createstoredquery request contains a title and abstract properties, which provides a description of the new stored query, a query expression containing the WFS query and one or more parameters which are used within the logic of the query expression.
Below is an example queries to create the custom 'AirportHeliportByDesignatorQuery' stored query using POST or SOAP requests. It uses a single parameter called 'designator' and a query expression which uses the PropertyIsEqualTo filter to compare the parameter to aixm:designator property.
CreateStoredQueries can not be done using a GET request to the snowflake WFS.
As POST:
<?xml version="1.0" encoding="UTF-8"?>
<wfs:CreateStoredQuery
xmlns:wfs="http://www.opengis.net/wfs/2.0"
xmlns:fes="http://www.opengis.org/fes/2.0"
xmlns:gml="http://www.opengis.net/gml/3.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:myns="http://www.someserver.com/myns"
xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd"
service="WFS"
version="2.0.0">
<wfs:StoredQueryDefinition id="urn:snowflake:def:query:OGC-WFS:AirportHeliportByDesignatorQuery">
<wfs:Title>PropertyIsEqualToQuery</wfs:Title>
<wfs:Abstract>This stored query accepts the argument, named designator</wfs:Abstract>
<wfs:Parameter name="designator" type="xsd:String"/>
<wfs:QueryExpressionText returnFeatureTypes="aixm:AirportHeliport" language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression" isPrivate="false">
<wfs:Query xmlns:wfs="http://www.opengis.net/wfs/2.0"
xmlns:fes="http://www.opengis.net/fes/2.0"
xmlns:aixm="http://www.aixm.aero/schema/5.1"
typeNames="aixm:AirportHeliport" handle="Q01">
<fes:Filter>
<fes:PropertyIsEqualTo>
<fes:ValueReference>aixm:timeSlice//aixm:designator</fes:ValueReference>
<fes:Literal>${designator}</fes:Literal>
</fes:PropertyIsEqualTo>
</fes:Filter>
</wfs:Query>
</wfs:QueryExpressionText>
</wfs:StoredQueryDefinition>
</wfs:CreateStoredQuery>
As SOAP:
<?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:CreateStoredQuery
xmlns:wfs="http://www.opengis.net/wfs/2.0"
xmlns:fes="http://www.opengis.org/fes/2.0"
xmlns:gml="http://www.opengis.net/gml/3.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:myns="http://www.someserver.com/myns"
xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd"
service="WFS"
version="2.0.0">
<wfs:StoredQueryDefinition id="urn:snowflake:def:query:OGC-WFS:AirportHeliportByDesignatorQuery">
<wfs:Title>PropertyIsEqualToQuery</wfs:Title>
<wfs:Abstract>This stored query accepts the argument, named designator</wfs:Abstract>
<wfs:Parameter name="designator" type="xsd:String"/>
<wfs:QueryExpressionText returnFeatureTypes="aixm:AirportHeliport" language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression" isPrivate="false">
<wfs:Query xmlns:wfs="http://www.opengis.net/wfs/2.0"
xmlns:fes="http://www.opengis.net/fes/2.0"
xmlns:aixm="http://www.aixm.aero/schema/5.1"
typeNames="aixm:AirportHeliport" handle="Q01">
<fes:Filter>
<fes:PropertyIsEqualTo>
<fes:ValueReference>aixm:timeSlice//aixm:designator</fes:ValueReference>
<fes:Literal>${designator}</fes:Literal>
</fes:PropertyIsEqualTo>
</fes:Filter>
</wfs:Query>
</wfs:QueryExpressionText>
</wfs:StoredQueryDefinition>
</wfs:CreateStoredQuery>
</soap:Body>
</soap:Envelope>
Response example of the response to the CreateStoredQueries when the new stored query has been successfully been created.
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<wfs:CreateStoredQueryResponse xmlns:wfs="http://www.opengis.net/wfs/2.0" status="OK"/>
</soap:Body>
</soap:Envelope>
If the stored query ID has already been used a "HTTP Status 500 - type Exception report" will be returned.
Deleting a Stored Query
In order to remove a stored query from the WFS use the DropStoredQuery request. Here's how to remove the example stored query using POST or SOAP requests.
DeleteStoredQueries can not be done using a GET request to the snowflake WFS.
As POST:
<?xml version="1.0" ?>
<DropStoredQuery id="urn:snowflake:def:query:OGC WFS:AirportHeliportByDesignatorQuery"
service="WFS"
version="2.0.0"
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">
</DropStoredQuery>
As SOAP:
<?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>
<DropStoredQuery id="urn:snowflake:def:query:OGC WFS:AirportHeliportByDesignatorQuery"
service="WFS"
version="2.0.0"
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">
</DropStoredQuery>
</soap:Body>
</soap:Envelope
Response example from the DropStoredQuery for the 'AirportHeliportByDesignatorQuery'
<wfs:DropStoredQueryResponse status="OK"/>
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" = 10
- geometry "lineString" = -71 42 -70 43
Create "AirportHeliportTemporalBufferQuery" Stored Query
Post Query to create customer stored query.
<?xml version="1.0"?>
<wfs:CreateStoredQuery xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:fes="http://www.opengis.org/fes/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:myns="http://www.someserver.com/myns" xsi:schemaLocation="http://www.opengis.net/wfs/2.0
http://schemas.opengis.net/wfs/2.0/wfs.xsd" service="WFS" version="2.0.0">
<wfs:StoredQueryDefinition id="urn:snowflake:def:query:AirportHeliportTemporalBufferQuery">
<wfs:Title>AirportHeliportTemporalBufferQuery</wfs:Title>
<wfs:Abstract>This stored query accepts the argument, named "beginPosition","endPosition", "lineString" and "distance" and returns AirportHeliports within a buffer distance of a linestring or point</wfs:Abstract>
<wfs:Parameter name="beginPosition" type="xsd:Date"/>
<wfs:Parameter name="endPosition" type="xsd:Date"/>
<wfs:Parameter name="distance" type="xsd:Double"/>
<wfs:Parameter name="linestring" type="xsd:String"/>
<wfs:QueryExpressionText returnFeatureTypes="aixm:AirportHeliport" language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression" isPrivate="false">
<wfs:Query xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:aixm="http://www.aixm.aero/schema/5.1" typeNames="aixm:AirportHeliport" handle="Q01">
<fes:Filter>
<fes:And>
<fes:AnyInteracts>
<fes:ValueReference>aixm:timeSlice//gml:validTime</fes:ValueReference>
<fes:Literal>
<gml:TimePeriod>
<gml:beginPosition>${beginPosition}</gml:beginPosition>
<gml:endPosition>${endPosition}</gml:endPosition>
</gml:TimePeriod>
</fes:Literal>
</fes:AnyInteracts>
<fes:DWithin>
<fes:ValueReference>aixm:timeSlice//aixm:AirportHeliportTimeSlice//aixm:ARP//aixm:ElevatedPoint</fes:ValueReference>
<gml:LineString srsName="urn:ogc:def:crs:OGC:1.3:CRS84">
<gml:pos>${linestring}</gml:pos>
</gml:LineString>
<fes:Distance uom="[NMI_I]">${distance}</fes:Distance>
</fes:DWithin>
</fes:And>
</fes:Filter>
</wfs:Query>
</wfs:QueryExpressionText>
</wfs:StoredQueryDefinition>
</wfs:CreateStoredQuery>
WSDL Web Service Definition Language
Link to the WSDL describing of the Snowflake AIXM 5.1 WFS
http://demo.snowflakesoftware.com/AIXM51_WFS2/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/AIXM51_WFS2/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 typeNames="aixm:AirportHeliport" handle="Q01">
<fes:Filter>
<fes:PropertyIsEqualTo>
<fes:ValueReference> timeSlice/AirportHeliportTimeSlice/designator</fes:ValueReference>
<fes:Literal>KBOS</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>-84.4280661111111 33.63672</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="urn-x:ows7:snowflake:tp:nasr_arp.10599">
<gml:beginPosition> 2000-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>