Known issues (deegree WFS)
The deegree WFS is (of course) not perfect. Some of the issues are implementation related and can be resolved, others stem from more fundamental problems.
1. Multiple queries with different srsName-attributes in a GetFeature-request
Please consider the following example GetFeature-request. It targets the Philosopher-example schema and consists of 2 queries:
- Query the feature of type "app:Place" with name "Paris".
- Query the feature of type "app:Country" with name "France".
<wfs:GetFeature version="1.1.0" xmlns:app="http://www.deegree.org/app" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
<wfs:Query typeName="app:Place">
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>app:name</ogc:PropertyName>
<ogc:Literal>Paris</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</wfs:Query>
<wfs:Query typeName="app:Country">
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>app:name</ogc:PropertyName>
<ogc:Literal>France</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
The result looks like this (a bit stripped for brevity):
<wfs:FeatureCollection...>
<gml:featureMember>
<!-- Paris -->
<app:Place gml:id="PLACE_453">
<app:name>Paris</app:name>
<app:country>
<app:Country gml:id="COUNTRY_454">
<app:name>France</app:name>
...
<app:geom>
<gml:MultiSurface srsName="EPSG:4326">
...
</gml:MultiSurface>
</app:geom>
</app:Country>
</app:country>
</app:Place>
</gml:featureMember>
<!-- France -->
<gml:featureMember xlink:href="#COUNTRY_454"/>
</wfs:FeatureCollection>
Note that the Paris-feature contains France as a subfeature. Hence, in the gml:featureMember-element for France in the FeatureCollection, it is referenced using an xlink:href-attribute (alternatively, one could put the explicit feature representation into the gml:featureMember-element and reference it from the Paris-feature with an xlink:href-attribute). NOTE: You are not allowed to list a feature twice in a valid document, because every gml:id attribute in the document must be unique. The only alternative would be to omit the gml:id-attribute for the duplicate feature.
Fine. Using xlink:href saved the day here...
But how do you represent the result to the following request:
Query the feature of type "app:Place" with name "Paris", geometries have to be in EPSG:4326
Query the feature of type "app:Country" with name "France", geometries have to be in EPSG:23031
<wfs:GetFeature version="1.1.0" xmlns:app="http://www.deegree.org/app" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
<wfs:Query srsName="EPSG:4326" typeName="app:Place">
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>app:name</ogc:PropertyName>
<ogc:Literal>Paris</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</wfs:Query>
<wfs:Query srsName="EPSG:23031" typeName="app:Country">
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>app:name</ogc:PropertyName>
<ogc:Literal>France</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
If you use an xlink:href attribute in the gml:featureMember element to reference the France-feature, the referenced feature contains the geometry in EPSG:4326. But the France-feature was explicitly requested to use EPSG:23031...
Comments? Propositions?