Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE][processing] New input type for expressions
This adds a new input type for expression inputs. Expression inputs can be linked to a parent layer so that the builder shows the correct fields and layer variables. It's designed for two use cases: 1. to be used when an algorithm specifically requires an expression, eg Select by Expression and Extract by Expression. 2. to be potentially used as a replacement input instead of string or number literals in algorithms. Eg - if the simplify algorithm tolerance parameter was replaced with an expression paremeter, then this expression would be evaluated for every feature before simplifying that feature. It would allow parameters to be calculated per feature, as opposed to the current approach of calculating a parameter once before running the algorithm. It would also mean algorithms like "variable distance buffer" would no longer be needed, as a single "buffer" algorithm could then be used for either a fixed distance, field based, or expression based distance.
- Loading branch information
Showing with 151 additions and 13 deletions.
- +3 −3 python/plugins/processing/algs/qgis/ExtractByExpression.py
- +3 −3 python/plugins/processing/algs/qgis/GeometryByExpression.py
- +3 −3 python/plugins/processing/algs/qgis/SelectByExpression.py
- +49 −0 python/plugins/processing/core/parameters.py
- +64 −4 python/plugins/processing/gui/wrappers.py
- +29 −0 python/plugins/processing/modeler/ModelerParameterDefinitionDialog.py