Skip to content
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] allow optional feature sink parameters #4701

Merged
merged 3 commits into from Jun 9, 2017

Conversation

nyalldawson
Copy link
Collaborator

If a feature sink parameter is optional and not set, we don't create the sink.

This adds a lot of flexibility to algorithms, as it makes output sinks truly optional. For instance, the various "Extract by..." algorithms could add a new optional sink for features which 'fail' the extraction criteria. This effectively allows these algorithms to become feature 'routers', directing features onto other parts of a model depending on whether they pass or fail the test.

But in this situation we don't always care about these failing features, and we don't want to force them to always be fetched from the provider. By making the outputs truly optional, the algorithm can tweak its logic to either fetch all features and send them to the correct output, or only fetch matching features from the provider in the first place (a big speed boost).

This has been done so far just for the check validity alg.

… sink

This adds a lot of flexibility to algorithms, as it makes output
sinks truely optional. For instance, the various "Extract by..."
algorithms could add a new optional sink for features which
'fail' the extraction criteria. This effectively allows these
algorithms to become feature 'routers', directing features onto
other parts of a model depending on whether they pass or fail
the test.

But in this situation we don't always care about these failing
features, and we don't want to force them to always be fetched
from the provider. By making the outputs truely optional,
the algorithm can tweak its logic to either fetch all features
and send them to the correct output, or only fetch
matching features from the provider in the first place (a big
speed boost).
Also make outputs optional from the alg - now you can select
which outputs you need for your model!
@nyalldawson nyalldawson merged commit d4acdac into qgis:master Jun 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant