Skip to content

Commit

Permalink
Explode lines algorithm should not require valid geometries
Browse files Browse the repository at this point in the history
This check isn't required for this algorith, and can get in
the way when using explode as a step prior for data cleaning
  • Loading branch information
nyalldawson committed Jul 10, 2024
1 parent c471bff commit 2445889
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/analysis/processing/qgsalgorithmexplode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ QgsFeatureList QgsExplodeAlgorithm::processFeature( const QgsFeature &f, QgsProc
}
}

Qgis::ProcessingFeatureSourceFlags QgsExplodeAlgorithm::sourceFlags() const
{
return Qgis::ProcessingFeatureSourceFlag::SkipGeometryValidityChecks;
}

QgsFeatureSink::SinkFlags QgsExplodeAlgorithm::sinkFlags() const
{
return QgsFeatureSink::RegeneratePrimaryKey;
Expand Down
1 change: 1 addition & 0 deletions src/analysis/processing/qgsalgorithmexplode.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class QgsExplodeAlgorithm : public QgsProcessingFeatureBasedAlgorithm
QString outputName() const override;
Qgis::WkbType outputWkbType( Qgis::WkbType inputWkbType ) const override;
QgsFeatureList processFeature( const QgsFeature &feature, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
Qgis::ProcessingFeatureSourceFlags sourceFlags() const override;
QgsFeatureSink::SinkFlags sinkFlags() const override;

std::vector< QgsGeometry > extractAsParts( const QgsGeometry &geometry ) const;
Expand Down

0 comments on commit 2445889

Please sign in to comment.