Skip to content

Commit

Permalink
Random Points on Lines algorithm: Fix check minimum distance logic (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
havatv authored and nyalldawson committed Apr 11, 2020
1 parent 7a9c3c6 commit 2022848
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ QVariantMap QgsRandomPointsOnLinesAlgorithm::processAlgorithm( const QVariantMap

if ( !rpGeom.isNull() && !rpGeom.isEmpty() )
{
if ( minDistanceForThisFeature != 0 && pointsAddedForThisFeature > 0 )
if ( minDistanceForThisFeature != 0 && totNPoints > 0 )
{
// Have to check minimum distance to existing points
QList<QgsFeatureId> neighbors = index.nearestNeighbor( rpGeom, 1, minDistanceForThisFeature );
Expand Down

0 comments on commit 2022848

Please sign in to comment.