Skip to content
Permalink
Browse files

Merge pull request #34145 from qgis-bot/backport-33598-to-release-3_10

[Backport release-3_10] wfs server: don't report unsupported DWithin/Beyond in capabilities and properly report failure to decode filters containing them
  • Loading branch information
rldhont committed Feb 13, 2020
2 parents 900732b + a65d351 commit e4efa4f4274047e344b4b0dcbb123a9b53257425
@@ -126,8 +126,7 @@ namespace QgsWfs
QStringList spatialOperators;
spatialOperators << QStringLiteral( "Equals" ) << QStringLiteral( "Disjoint" ) << QStringLiteral( "Touches" )
<< QStringLiteral( "Within" ) << QStringLiteral( "Overlaps" ) << QStringLiteral( "Crosses" )
<< QStringLiteral( "Intersects" ) << QStringLiteral( "Contains" ) << QStringLiteral( "DWithin" )
<< QStringLiteral( "Beyond" ) << QStringLiteral( "BBOX" );
<< QStringLiteral( "Intersects" ) << QStringLiteral( "Contains" ) << QStringLiteral( "BBOX" );
QDomElement spatialOperatorsElem = doc.createElement( QStringLiteral( "ogc:SpatialOperators" ) );
for ( const QString &spatialOperator : spatialOperators )
{
@@ -281,7 +281,7 @@ namespace QgsWfs
std::shared_ptr<QgsExpression> filter( QgsOgcUtils::expressionFromOgcFilter( filterElem, layer ) );
if ( filter )
{
if ( filter->hasParserError() )
if ( filter->hasParserError() || !filter->parserErrorString().isEmpty() )
{
throw QgsRequestNotWellFormedException( filter->parserErrorString() );
}
@@ -122,8 +122,6 @@ Content-Type: text/xml; charset=utf-8
<ogc:SpatialOperator name="Crosses"/>
<ogc:SpatialOperator name="Intersects"/>
<ogc:SpatialOperator name="Contains"/>
<ogc:SpatialOperator name="DWithin"/>
<ogc:SpatialOperator name="Beyond"/>
<ogc:SpatialOperator name="BBOX"/>
</ogc:SpatialOperators>
</ogc:Spatial_Capabilities>

0 comments on commit e4efa4f

Please sign in to comment.
You can’t perform that action at this time.