Skip to content

Commit 0796ecb

Browse files
committed
[BUGFIX][QGIS Server] No flags in QgsFeatureRequest if expression needs geometry
1 parent d20b2a8 commit 0796ecb

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/server/qgswfsserver.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,14 @@ int QgsWFSServer::getFeature( QgsRequestHandler& request, const QString& format
658658
throw QgsMapServiceException( "RequestNotWellFormed", filter->parserErrorString() );
659659
}
660660
QgsFeatureRequest req;
661-
req.setFlags( QgsFeatureRequest::ExactIntersect | ( mWithGeom ? QgsFeatureRequest::NoFlags : QgsFeatureRequest::NoGeometry ) );
661+
if ( filter->needsGeometry() )
662+
{
663+
req.setFlags( QgsFeatureRequest::NoFlags );
664+
}
665+
else
666+
{
667+
req.setFlags( QgsFeatureRequest::ExactIntersect | ( mWithGeom ? QgsFeatureRequest::NoFlags : QgsFeatureRequest::NoGeometry ) );
668+
}
662669
req.setFilterExpression( filter->expression() );
663670
#ifdef HAVE_SERVER_PYTHON_PLUGINS
664671
mAccessControl->filterFeatures( layer, req );

0 commit comments

Comments
 (0)