QGIS Server 3 : OGC Certification work for WFS 1.1.0

By Tuesday November 6th, 2018GIS, News, Non classé

QGIS Server is an open source OGC data server which uses QGIS engine as backend. It becomes really awesome because a simple desktop qgis project file can be rendered as web services with exactly the same rendering, and without any mapfile or xml coding by hand.

QGIS Server provides a way to serve OGC web services like WMS, WCS, WFS and WMTS resources from a QGIS project, but can also extend services like GetPrint which takes advantage of QGIS’s map composer power to generate high quality PDF outputs.

Since the 3.0.2 version, QGIS Server is certified as an official OGC reference implementation for WMS 1.3.0 and reports are generated in a daily continuous integration to avoid regressions.

 

Thus, the next step was naturally to take a look at the WFS 1.1.0 thanks to the support of the QGIS Grant Program

Side note, this Grant program is made possible thanks to your direct sponsoring and micro-donations to QGIS.org.

TEAM Engine test suite for WFS 1.1.0

We use a tool provided by the OGC Compliance Program to run dedicated tests on the server : Teamengine (Test, Evaluation, And Measurement Engine).

Test suites are available through a web interface. However, for the needs of continuous integration, these tests have to be run without user interaction. In the case of WMS 1.3.0, nothing more easy than using the REST API:

[pastacode lang=”bash” manual=”%24%20curl%20%22http%3A%2F%2Flocalhost%3A8081%2Fteamengine%2Frest%2Fsuites%2Fwms%2F1.20%2Frun%3Fqueryable%3Dqueryable%26basic%3Dbasic%26capabilities-url%3Dhttp%3A%2F%2F172.17.0.2%2Fqgisserver%3FREQUEST%3DGetCapabilities%2526SERVICE%3DWMS%2526VERSION%3D1.3.0%2526MAP%3D%2Fdata%2Fteamengine_wms_130.qgs” message=”” highlight=”” provider=”manual”/]

 

However, the WFS 1.1.0 test suite does not provide a REST API and makes the situation less straightforward. We switched to using TEAM Engine directly from command line:

[pastacode lang=”bash” manual=”%24%20cd%20te_base%0A%24%20.%2Fbin%2Funix%2Ftest.sh%20-source%3Dwfs%2F1.1.0%2Fctl%2Fmain.ctl%20-form%3Dparams.xml” message=”” highlight=”” provider=”manual”/]

The params.xml file allows to configure underlying tests. In this particular case, the GetCapabilities URL of the QGIS Server to test is given.  Results are available thanks to the viewlog.sh shell script:

[pastacode lang=”bash” manual=”%24%20.%2Fbin%2Funix%2Fviewlog.sh%20-logdir%3Dte_base%2Fusers%2Froot%2F%20-session%3Ds0001%0ATest%20wfs%3Awfs-main%20type%20Mandatory%20(s0001)%20Failed%20(InheritedFailure)%0A%20%20%20Test%20wfs%3Areadiness-tests%20type%20Mandatory%20(s0001%2Fd68e38807_1)%20Failed%20(InheritedFailure)%0A%20%20%20%20%20%20Test%20ctl%3ASchematronValidatingParser%20type%20Mandatory%20(s0001%2Fd68e38807_1%2Fd68e588_1)%20Failed%0A%20%20%20%20%20%20Test%20wfs%3Abasic-main%20type%20Mandatory%20(s0001%2Fd68e38807_1%2Fd68e636_1)%20Failed%20(InheritedFailure)%0A%20%20%20%20%20%20%20%20%20Test%20wfs%3Arun-GetCapabilities-basic-cc-GET%20type%20Mandatory%20(s0001%2Fd68e38807_1%2Fd68e636_1%2Fd68e28810_1)%20Failed%20(InheritedFailure)%0A%20%20%20%20%20%20%20%20%20%20%20%20Test%20wfs%3Awfs-1.1.0-Basic-GetCapabilities-tc1%20type%20Mandatory%20(s0001%2Fd68e38807_1%2Fd68e636_1%2Fd68e28810_1%2Fd68e1095_1)%20Passed%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Test%20ctl%3Aassert-xpath%20type%20Mandatory%20(s0001%2Fd68e38807_1%2Fd68e636_1%2Fd68e28810_1%2Fd68e1095_1%2Fd68e1234_1)%20Passed%0A%20%20%20%20%20%20%20%20%20%20%20%20Test%20wfs%3Awfs-1.1.0-Basic-GetCapabilities-tc2%20type%20Mandatory%20(s0001%2Fd68e38807_1%2Fd68e636_1%2Fd68e28810_1%2Fd68e1100_1)%20Passed%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Test%20ctl%3Aassert-xpath%20type%20Mandatory%20(s0001%2Fd68e38807_1%2Fd68e636_1%2Fd68e28810_1%2Fd68e1100_1%2Fd68e1305_1)%20Passed%0A%20%20%20%20%20%20%20%20%20%20%20%20Test%20wfs%3Awfs-1.1.0-Basic-GetCapabilities-tc3%20type%20Mandatory%20(s0001%2Fd68e38807_1%2Fd68e636_1%2Fd68e28810_1%2Fd68e1105_1)%20Passed%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Test%20ctl%3Aassert-xpath%20type%20Mandatory%20(s0001%2Fd68e38807_1%2Fd68e636_1%2Fd68e28810_1%2Fd68e1105_1%2Fd68e1558_1)%20Passed%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Test%20ctl%3Aassert-xpath%20type%20Mandatory%20(s0001%2Fd68e38807_1%2Fd68e636_1%2Fd68e28810_1%2Fd68e1105_1%2Fd68e1582_1)%20Passed%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Test%20ctl%3Aassert-xpath%20type%20Mandatory%20(s0001%2Fd68e38807_1%2Fd68e636_1%2Fd68e28810_1%2Fd68e1105_1%2Fd68e1606_1)%20Passed%0A…%0A…” message=”” highlight=”” provider=”manual”/]

Finally, a Python script has been written to read these logs and generate HTML report easily readable. Thanks to our QGIS-Server-CertifSuite, providing the continuous integration infrastructure with Docker images, these reports are also generated daily.

Bugfix and Conclusion

First results were clear: a lot of work is necessary to have a QGIS Server certified for WFS 1.1.0!

We started fixing the issues one by one:

And now we have a much better support than 6 months ago

However, some work still need to be done to finally obtain the OGC certification for WFS 1.1.0. To be continued!

Please contact us if you want QGIS server to become a reference implementation for all OGC service !