-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Processing] Fix Dissolve alg for featureless input layer or containing empty/null geometries, when the output is a memory layer (Fix #53392) #57478
Conversation
@@ -36,10 +36,16 @@ QVariantMap QgsCollectorAlgorithm::processCollection( const QVariantMap ¶met | |||
if ( !sink ) | |||
throw QgsProcessingException( invalidSinkError( parameters, QStringLiteral( "OUTPUT" ) ) ); | |||
|
|||
QVariantMap outputs; | |||
outputs.insert( QStringLiteral( "OUTPUT" ), dest ); | |||
|
|||
const QStringList fields = parameterAsStrings( parameters, QStringLiteral( "FIELD" ), context ); | |||
|
|||
const long count = source->featureCount(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to this PR, but... shouldn't this be long long
instead of long
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it should be long long everywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it looks like there are many processing algorithms with the same issue, I will subsequently propose a PR to fix them all together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Description
This PR fixes the "Dissolve" (
native:dissolve
) processing algorithm which fails to execute when the output layer is a memory layer (particularly when the algorithm is used as part of a model) and the input layer doesn't contain any features or contains features with empty/null geometry as detailed in #53392.This proposed fix makes sure the Dissolve algorithm:
Fixes #53392.