Skip to content
Permalink
Browse files

wfs server: don't report unsupported DWithin/Beyond in capabilities a…

…nd properly report failure to decode filters containing them
  • Loading branch information
github-actions committed Jan 30, 2020
1 parent 81e2dd2 commit a65d351a51784aa68eea34162bcaab4745e652b0
@@ -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 a65d351

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