Skip to content
Permalink
Browse files

[processing] extract_by_location fix duplicate rows when mutiple pred…

…icates are selected

Fixes  #32653
  • Loading branch information
jdlom committed Jan 4, 2021
1 parent be2c1ec commit 1f0b9315fbfff6eea4805fbe18143605df2d603b
Showing with 9 additions and 6 deletions.
  1. +9 −6 src/analysis/processing/qgsalgorithmextractbylocation.cpp
@@ -277,9 +277,10 @@ void QgsLocationBasedAlgorithm::processByIteratingOverIntersectSource( const Qgs
engine->prepareGeometry();
}

bool isMatch = false;

for ( Predicate predicate : qgis::as_const( predicates ) )
{
bool isMatch = false;
switch ( predicate )
{
case Intersects:
@@ -311,10 +312,13 @@ void QgsLocationBasedAlgorithm::processByIteratingOverIntersectSource( const Qgs
break;
}
if ( isMatch )
{
foundSet.insert( testFeature.id() );
handleFeatureFunction( testFeature );
}
break;
}

if ( isMatch )
{
foundSet.insert( testFeature.id() );
handleFeatureFunction( testFeature );
}

}
@@ -515,4 +519,3 @@ QVariantMap QgsExtractByLocationAlgorithm::processAlgorithm( const QVariantMap &
///@endcond



0 comments on commit 1f0b931

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