Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[BUGFIX][QGIS Server] No flags in QgsFeatureRequest if expression nee…
…ds geometry
  • Loading branch information
rldhont committed Nov 3, 2016
1 parent e64d647 commit e1d272d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/server/qgswfsserver.cpp
Expand Up @@ -657,7 +657,14 @@ int QgsWFSServer::getFeature( QgsRequestHandler& request, const QString& format
throw QgsMapServiceException( "RequestNotWellFormed", filter->parserErrorString() );
}
QgsFeatureRequest req;
req.setFlags( QgsFeatureRequest::ExactIntersect | ( mWithGeom ? QgsFeatureRequest::NoFlags : QgsFeatureRequest::NoGeometry ) );
if ( filter->needsGeometry() )
{
req.setFlags( QgsFeatureRequest::NoFlags );
}
else
{
req.setFlags( QgsFeatureRequest::ExactIntersect | ( mWithGeom ? QgsFeatureRequest::NoFlags : QgsFeatureRequest::NoGeometry ) );
}
req.setFilterExpression( filter->expression() );
#ifdef HAVE_SERVER_PYTHON_PLUGINS
mAccessControl->filterFeatures( layer, req );
Expand Down

0 comments on commit e1d272d

Please sign in to comment.