Skip to content
Permalink
Browse files

Apply suggestions (variable name and missing blank space)

  • Loading branch information
gacarrillor authored and nyalldawson committed Mar 14, 2020
1 parent f6ee3e8 commit 1c5fa2d010c842d1b1988200c9407179d60e036d
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/analysis/processing/qgsalgorithmremovenullgeometry.cpp
@@ -62,7 +62,7 @@ QString QgsRemoveNullGeometryAlgorithm::shortHelpString() const
return QObject::tr( "This algorithm removes any features which do not have a geometry from a vector layer. "
"All other features will be copied unchanged.\n\n"
"Optionally, the features with null geometries can be saved to a separate output.\n\n"
"If 'Also remove empty geometries' is checked, the algorithm removes features whose geometries"
"If 'Also remove empty geometries' is checked, the algorithm removes features whose geometries "
"have no coordinates, i.e., geometries that are empty. In that case, also the null "
"output will reflect this option, containing both null and empty geometries." );
}
@@ -78,7 +78,7 @@ QVariantMap QgsRemoveNullGeometryAlgorithm::processAlgorithm( const QVariantMap
if ( !source )
throw QgsProcessingException( invalidSourceError( parameters, QStringLiteral( "INPUT" ) ) );

const bool remove_empty = parameterAsBoolean( parameters, QStringLiteral( "REMOVE_EMPTY" ), context );
const bool removeEmpty = parameterAsBoolean( parameters, QStringLiteral( "REMOVE_EMPTY" ), context );

QString nonNullSinkId;
std::unique_ptr< QgsFeatureSink > nonNullSink( parameterAsSink( parameters, QStringLiteral( "OUTPUT" ), context, nonNullSinkId, source->fields(),
@@ -101,11 +101,11 @@ QVariantMap QgsRemoveNullGeometryAlgorithm::processAlgorithm( const QVariantMap
break;
}

if ( ( ( !remove_empty && f.hasGeometry() ) || ( remove_empty && !f.geometry().isEmpty() ) ) && nonNullSink )
if ( ( ( !removeEmpty && f.hasGeometry() ) || ( removeEmpty && !f.geometry().isEmpty() ) ) && nonNullSink )
{
nonNullSink->addFeature( f, QgsFeatureSink::FastInsert );
}
else if ( ( ( !remove_empty && !f.hasGeometry() ) || ( remove_empty && f.geometry().isEmpty() ) ) && nullSink )
else if ( ( ( !removeEmpty && !f.hasGeometry() ) || ( removeEmpty && f.geometry().isEmpty() ) ) && nullSink )
{
nullSink->addFeature( f, QgsFeatureSink::FastInsert );
}

0 comments on commit 1c5fa2d

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