Skip to content

Commit

Permalink
[processing] Never run feature validity check for point layers
Browse files Browse the repository at this point in the history
Saves a few cycles. The feature validity checks have no meaning
for point layers.

Refs #19919
  • Loading branch information
nyalldawson committed Sep 24, 2018
1 parent 03bef52 commit 17567ee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/processing/qgsprocessingutils.cpp
Expand Up @@ -727,7 +727,9 @@ QgsFields QgsProcessingUtils::indicesToFields( const QList<int> &indices, const
QgsProcessingFeatureSource::QgsProcessingFeatureSource( QgsFeatureSource *originalSource, const QgsProcessingContext &context, bool ownsOriginalSource )
: mSource( originalSource )
, mOwnsSource( ownsOriginalSource )
, mInvalidGeometryCheck( context.invalidGeometryCheck() )
, mInvalidGeometryCheck( QgsWkbTypes::geometryType( mSource->wkbType() ) == QgsWkbTypes::PointGeometry
? QgsFeatureRequest::GeometryNoCheck // never run geometry validity checks for point layers!
: context.invalidGeometryCheck() )
, mInvalidGeometryCallback( context.invalidGeometryCallback() )
, mTransformErrorCallback( context.transformErrorCallback() )
{}
Expand Down

0 comments on commit 17567ee

Please sign in to comment.