Skip to content

Commit 6dd89b5

Browse files
committed
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.
1 parent d7b75d1 commit 6dd89b5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/analysis/processing/qgsalgorithmfilter.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ void QgsFilterAlgorithm::initAlgorithm( const QVariantMap &configuration )
8888

8989
QVariantMap QgsFilterAlgorithm::processAlgorithm( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback )
9090
{
91-
context.setInvalidGeometryCheck( QgsFeatureRequest::GeometryNoCheck );
9291
std::unique_ptr< QgsProcessingFeatureSource > source( parameterAsSource( parameters, QStringLiteral( "INPUT" ), context ) );
9392
if ( !source )
9493
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,
105104
long count = source->featureCount();
106105

107106
QgsFeature f;
108-
QgsFeatureIterator it = source->getFeatures();
107+
QgsFeatureIterator it = source->getFeatures( QgsFeatureRequest(), QgsProcessingFeatureSource::FlagSkipGeometryValidityChecks );
109108

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

0 commit comments

Comments
 (0)