Skip to content
Permalink
Browse files

[processing] Never run feature validity check for point layers

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 17567ee5aadbdbb70771030df987f46fdee86d4e
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/core/processing/qgsprocessingutils.cpp
@@ -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() )
{}

0 comments on commit 17567ee

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