From 0a76d4969c9700b2128f13520936b2729b5190a4 Mon Sep 17 00:00:00 2001 From: Blottiere Paul Date: Fri, 6 Jul 2018 18:10:57 +0200 Subject: [PATCH 1/2] Fixes spatial operator in WFS GetCapabilities doc --- src/server/services/wfs/qgswfsgetcapabilities.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/server/services/wfs/qgswfsgetcapabilities.cpp b/src/server/services/wfs/qgswfsgetcapabilities.cpp index 954271da370..1f524d7b205 100644 --- a/src/server/services/wfs/qgswfsgetcapabilities.cpp +++ b/src/server/services/wfs/qgswfsgetcapabilities.cpp @@ -111,8 +111,7 @@ namespace QgsWfs for ( const QString &spatialOperator : spatialOperators ) { QDomElement spatialOperatorElem = doc.createElement( QStringLiteral( "ogc:SpatialOperator" ) ); - QDomText spatialOperatorText = doc.createTextNode( spatialOperator ); - spatialOperatorElem.appendChild( spatialOperatorText ); + spatialOperatorElem.setAttribute( QStringLiteral( "name" ), spatialOperator ); spatialOperatorsElem.appendChild( spatialOperatorElem ); } spatialCapabilitiesElement.appendChild( spatialOperatorsElem ); From 3141bb596b1ea2340b3c2a2f23913ba50e36551c Mon Sep 17 00:00:00 2001 From: Blottiere Paul Date: Thu, 26 Jul 2018 08:40:24 +0100 Subject: [PATCH 2/2] Update unit test --- .../qgis_server/wfs_getcapabilities.txt | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/testdata/qgis_server/wfs_getcapabilities.txt b/tests/testdata/qgis_server/wfs_getcapabilities.txt index 6263d8c4203..b14c051dd6f 100644 --- a/tests/testdata/qgis_server/wfs_getcapabilities.txt +++ b/tests/testdata/qgis_server/wfs_getcapabilities.txt @@ -113,17 +113,17 @@ Content-Type: text/xml; charset=utf-8 gml:Envelope - Equals - Disjoint - Touches - Within - Overlaps - Crosses - Intersects - Contains - DWithin - Beyond - BBOX + + + + + + + + + + +