WFS improvements

2 views
Skip to first unread message

Markus Schneider

unread,
Oct 3, 2010, 10:50:02 AM10/3/10
to inspire-f...@googlegroups.com
Hi all,

I finally took the time to improve the WFS output. If you update the
deegree 3 webapp and run it, you should notice the following changes:

- The endless loop for the default DescribeFeatureType request example
is gone.
- Instead of regenerating the GML schema from the internal model, the
original files are now used for DescribeFeatureType responses (only the
wrapper document is generated dynamically). Of course, this approach
only works for GML 3.2.1 output.
- GetFeature responses now use gml:FeatureCollection as container (as
mandated by ESDIN).
- It's possible to validate the GetFeature-responses (e.g. the response
to Address_All.xml) now. Tested with XMLSpy and Eclipse 3.6 (don't
forget to turn the magic GML switch that I mentioned in an earlier
mail). However, there are still a few problems left -- most importantly
if you specify traverseXlinkDepth > 0, the output will not validate (as
discussed earlier). I will add a configuration option for disallowing
inlined sub-features that will fix this.

In order to made this work, I added an option for configuring the output
format to the WFS config. The added section looks like this:

...
<Format handler="GENERIC_GML">
<MimeType>text/xml; subtype=gml/3.2.1</MimeType>
<Param
key="GET_FEATURE_RESPONSE_LOCAL_NAME">FeatureCollection</Param>
<Param key="GET_FEATURE_RESPONSE_PREFIX">gml</Param>
<Param
key="GET_FEATURE_RESPONSE_NAMESPACE">http://www.opengis.net/gml/3.2</Param>
<Param
key="GET_FEATURE_RESPONSE_XSI_SCHEMA_LOCATION">http://www.opengis.net/gml/3.2
http://schemas.opengis.net/gml/3.2.1/deprecatedTypes.xsd</Param>
</Format>
...

Some explanation:

- handler-attribute: Determines the OutputFormatProvider that is
responsible for handling the specified mimeType. At the moment, there's
only the GMLOutputFormatProvider (with the well-known-name GENERIC_GML).
This also allows to integrate custom Java classes that do customized
output. See [1] and [2].
- MimeType-element: The output format that this config applies to
- Param-elements: Passed to the OutputFormatProvider The
GMLOutputFormatProvider understands these parameters at the moment:

- GET_FEATURE_RESPONSE_LOCAL_NAME: local element name of the response
container
- GET_FEATURE_RESPONSE_PREFIX: prefix of the response container
- GET_FEATURE_RESPONSE_NAMESPACE: namespace of the response container
- GET_FEATURE_RESPONSE_LOCATION: Included in the xsi:schemaLocation of
the response to define the element (for schema validation)

Best regards,
Markus

[1]http://havola.lat-lon.de/hudson/job/deegree-services/javadoc/org/deegree/services/wfs/format/OutputFormat.html
[2]
http://havola.lat-lon.de/hudson/job/deegree-services/javadoc/org/deegree/services/wfs/format/OutputFormatProvider.html


Just van den Broecke

unread,
Oct 3, 2010, 12:00:21 PM10/3/10
to inspire-f...@googlegroups.com
Hi Markus,

These changes are great and a further step towards ESDIN/INSPIRE
compliance ! I just verified and things work as you described.

best, Just

Markus Schneider

unread,
Oct 3, 2010, 5:29:48 PM10/3/10
to inspire-f...@googlegroups.com
Two more improvements:

- GetFeature-responses with traverseXlinkDepth != 0. Also these
responses can be validated now, as the subfeatures are no longer
inlined, if the schema does not allow this (as INSPIRE).

- Streaming. I finally activated streaming in the configuration. This
means that the performance for GetFeature responses will be *much*
better for large responses now. Also improves scalability a lot (if many
parallel requests are performed). The only downside is that with
activated streaming, the (optional) gml:boundedBy element in the
FeatureCollections is gone, as calculating the bounding box would
require to access every returned feature *before* the response is
written. If you want the gml:boundedBy back, set DISABLE_STREAMING to
true (in the format parameter list).

Best regards,
Markus

Reply all
Reply to author
Forward
0 new messages