Skip to content
Permalink
Browse files

Really do not care about invalid geometries

in feature filter algorithm. We just leave the geometry alone in whatever
state it may be. If the consumers of our features have a problem with that,
let them take care of it. Just because THEY do not like invalid geometries
does not mean WE have to adjust our behavior here.
  • Loading branch information
m-kuhn committed Apr 9, 2018
1 parent d7b75d1 commit 6dd89b5675b6e120fef2aae13a070160219e0130
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/analysis/processing/qgsalgorithmfilter.cpp
@@ -88,7 +88,6 @@ void QgsFilterAlgorithm::initAlgorithm( const QVariantMap &configuration )

QVariantMap QgsFilterAlgorithm::processAlgorithm( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback )
{
context.setInvalidGeometryCheck( QgsFeatureRequest::GeometryNoCheck );
std::unique_ptr< QgsProcessingFeatureSource > source( parameterAsSource( parameters, QStringLiteral( "INPUT" ), context ) );
if ( !source )
throw QgsProcessingException( QObject::tr( "Could not open input layer or feature source for parameter INPUT." ) );
@@ -105,7 +104,7 @@ QVariantMap QgsFilterAlgorithm::processAlgorithm( const QVariantMap &parameters,
long count = source->featureCount();

QgsFeature f;
QgsFeatureIterator it = source->getFeatures();
QgsFeatureIterator it = source->getFeatures( QgsFeatureRequest(), QgsProcessingFeatureSource::FlagSkipGeometryValidityChecks );

double step = count > 0 ? 100.0 / count : 1;
int current = 0;

0 comments on commit 6dd89b5

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