Skip to content

Commit 2a88a5a

Browse files
committed
Optimise calcuation of disjoint features
1 parent 6d94e6f commit 2a88a5a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/core/processing/qgsnativealgorithms.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -1450,6 +1450,11 @@ void QgsLocationBasedAlgorithm::process( QgsFeatureSource *targetSource,
14501450
// already added this one, no need for further tests
14511451
continue;
14521452
}
1453+
if ( predicates.count() == 1 && predicates.at( 0 ) == Disjoint && !disjointSet.contains( testFeature.id() ) )
1454+
{
1455+
// calculating only the disjoint set, and we've already eliminated this feature so no need for further tests
1456+
continue;
1457+
}
14531458

14541459
if ( !engine )
14551460
{

0 commit comments

Comments
 (0)