mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Speed up QgsFeatureRequests::acceptFeature when only non-exact intersection tests are required
This commit is contained in:
parent
570e85dd53
commit
9ae5ff5c52
@ -273,7 +273,13 @@ bool QgsFeatureRequest::acceptFeature( const QgsFeature &feature )
|
||||
{
|
||||
if ( !mFilterRect.isNull() )
|
||||
{
|
||||
if ( !feature.hasGeometry() || !feature.geometry().intersects( mFilterRect ) )
|
||||
if ( !feature.hasGeometry() ||
|
||||
(
|
||||
( mFlags & ExactIntersect && !feature.geometry().intersects( mFilterRect ) )
|
||||
||
|
||||
( !( mFlags & ExactIntersect ) && !feature.geometry().boundingBoxIntersects( mFilterRect ) )
|
||||
)
|
||||
)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user