Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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 1f0b931
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/analysis/processing/qgsalgorithmextractbylocation.cpp
Expand Up @@ -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:
Expand Down Expand Up @@ -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 );
}

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



0 comments on commit 1f0b931

Please sign in to comment.