Skip to content

Commit

Permalink
Really do not care about invalid geometries
Browse files Browse the repository at this point in the history
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 6dd89b5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/analysis/processing/qgsalgorithmfilter.cpp
Expand Up @@ -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." ) );
Expand All @@ -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;
Expand Down

0 comments on commit 6dd89b5

Please sign in to comment.