Enhancements:
- add a new optional output for null geometries, and make
the non-null geometry output optional. This allows the algorithm
to act as a router for features with null/not null geometries
inside of a model
Improvements:
- by default output a table with unique values, instead of a HTML
file. This allows the values to be more easily used in follow up
analysis (e.g. in a model). HTML output is still available, but
not output by default
Enhancements:
- support source/target layers in different CRS
- output layers with geometry (i.e. keep input point geometry - avoids
need to rejoin result back to original table to get geometry)
- keep original data types for id fields
- don't fire off many single feature requests - instead request
multiple features at once to improve speed
Improvements
- allow different CRS between layers
- instead of optionally allowing selection of a single field to keep from
both inputs, allow selection of multiple fields
Instead of a separate Points In Polygon algorithm just for this
extra option, add it to the original Points In Polygon algorithm
as a non-default option.
initAlgorithm() method
This allows 2 benefits:
- algorithms can be subclassed and have subclasses add additional
parameters/outputs to the algorithm. With the previous approach
of declaring parameters/outputs in the constructor, it's not
possible to call virtual methods to add additional parameters/
outputs (since you can't call virtual methods from a constructor).
- initAlgorithm takes a variant map argument, allowing the algorithm
to dynamically adjust its declared parameters and outputs according
to this configuration map. This potentially allows model algorithms which
can be configured to have variable numbers of parameters and
outputs at run time. E.g. a "router" algorithm which directs
features to one of any number of output sinks depending on some
user configured criteria.
and pure virtual createInstance
Allows us to add logic which always need applying within
create(), leaving createInstance() free to just return a
raw new instance of the class
The previous naming was too easily confused with processing outputs.
Rename them to QgsProcessingParameterFileDestination, etc... to
make it clearer what they are used for.
Since it's safe to evaluate parameters in background threads
now, it's usually going to be ok to evaluate everything in
the processAlgorithm step.
This keeps the algorithm code as simple as possible, and will
make porting faster.
Note that the prepare/postProcess virtual methods still exist
and can be used when an algorithm MUST do setup/cleanup work
in the main thread.