53 Commits

Author SHA1 Message Date
Bas Couwenberg
2628c480c5 Don't include revision in sources.
Prevent changes to files that weren't changed between releases.
This eases review of the changes between releases significantly.
2019-05-17 16:47:47 +02:00
Nyall Dawson
681d44f11f Messy mockup of feature 2018-09-14 18:23:03 +10:00
Jaka Kranjc
d54bd1a203 [processing] Fix DeleteColumn output hint
the dropped fields are discarded, the modeller get the rest, as expected
2018-09-11 09:35:45 +10:00
Juergen E. Fischer
ac63b8e16e Translation fix 2018-07-02 02:47:09 +02:00
Nyall Dawson
85fba799ea [processing] Don't abort when missing field name specified in
delete columns algorithm

Fixes #19256
2018-06-28 17:10:23 +10:00
Nyall Dawson
405d8f29d4 [processing] Skip more unnecessary geometry checks 2018-04-10 12:27:46 +10:00
Nyall Dawson
43cd62b62f [processing] Tweak api for QgsProcessingFeatureBasedAlgorithm
Instead of returning a single QgsFeature from processFeature, we now
return a list of features.

This allows feature based algorithms which return multiple features
per input feature, e.g. "explode" type algorithms which split a
single input feature into multiple output features.
2018-02-21 09:16:43 +11:00
Alexander Bruy
dca37abd0e [processing] add group id to QGIS algorithms 2017-12-14 18:04:12 +02:00
Nyall Dawson
d1a71f0971 Update algorithms for new API 2017-12-02 11:17:19 +10:00
Nyall Dawson
2951afa324 Port boundary algorithm to c++
Also allow feature based algorithms to customise their appectable
input layers types and set suitable filters for all applicable
algorithms
2017-10-13 08:28:34 +10:00
Nyall Dawson
2a442c7886 Rationalise algorithm groups a bit 2017-08-22 23:36:42 +10:00
Nyall Dawson
d4af76150f Flip some more algorithms to feature based algorithms 2017-07-20 15:28:50 +10:00
Nyall Dawson
d92583c10e Take advantage of auto created outputs in ported algorithms 2017-07-12 07:39:43 +10:00
Nyall Dawson
1e13d733c2 Move declaration of algorithm parameters/outputs to a new virtual
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.
2017-07-10 16:31:14 +10:00
Nyall Dawson
fbcb97c25a Rename 'delete column' alg to 'Drop field(s)' (for consistency) 2017-06-24 14:00:42 +10:00
Nyall Dawson
b1cadb1822 Use generic algorithm icon for qgis algorithms which do not
have specific icons, instead of generic qgis icon

We consider these 'top level' algorithms, and using the
standard algorithm icon should help reflect this and
differentiate them from 3rd party algorithms.
2017-06-24 12:01:20 +10:00
Nyall Dawson
81855a715b Use FastInsert when adding features from processing 2017-06-23 14:34:38 +10:00
Nyall Dawson
99cfb8faf3 Fix processing algs crash when no source features exist
Instead we output an empty layer - this may be critical for
multi-step models where there is validly no features present
in a source layer
2017-06-23 13:49:32 +10:00
Nyall Dawson
0da3652257 Rename some parameter classes for consistency 2017-06-21 22:13:16 +10:00
Nyall Dawson
1d2e54d1ba Port delete columns alg to new API 2017-06-06 16:06:27 +10:00
Nyall Dawson
f64f74fb63 Fix incorrect import 2017-06-06 13:41:42 +10:00
Nyall Dawson
4cb7d18b1c Push parameters into processAlgorithm and related functions 2017-06-06 07:41:19 +10:00
Nyall Dawson
77ab933788 Move alg character definitions to __init__ 2017-06-06 07:41:19 +10:00
Nyall Dawson
168f16276c Remove help related methods from GeoAlgorithm 2017-06-06 07:41:19 +10:00
Nyall Dawson
877775d2c0 Remove a bunch of unneeded imports 2017-05-02 14:47:58 +10:00
Nyall Dawson
49c688bbe4 Fix use of QgsProcessingUtils.mapLayerFromString 2017-05-02 13:40:49 +10:00
Nyall Dawson
f84d703234 Add method QgsProcessingUtils::mapLayerFromString
Algorithms and other processing code should use this method
(instead of dataobjects.getLayerFromString) to
retrieve layers from a string, as it considers the processing
context and allows resolving strings to temporarily stored layers.

This permits processing models to function correctly when
intermediate results are stored as memory layers. Subsequent
model algorithms can then access these temporary layers as inputs.
All temporary layers will be removed when the context object
is destroyed after the model algorithm is run.
2017-05-02 12:33:04 +10:00
Nyall Dawson
fd2c18ee16 Refactor processing writer to use QgsFeatureSink, and to store
temporary output layers in the provided processing context

Should fix loss of intermediate memory layers when running
a multi-step model
2017-04-26 17:38:40 +10:00
Nyall Dawson
427c3b1684 Remove vector.features
Use QgsProcessingUtils.getFeatures instead
2017-04-26 12:53:35 +10:00
Nyall Dawson
6397386fda Remove len method from vector.features
Use QgsProcessingUtils::featureCount instead
2017-04-26 12:53:35 +10:00
Nyall Dawson
adc7cf0ec2 Add context argument to vector.features 2017-04-26 12:53:35 +10:00
Nyall Dawson
dd4f530cfb [processing] Pass context argument to processAlgorithm 2017-04-26 12:53:35 +10:00
Nyall Dawson
377b181c4e Port more processing dataobjects methods to c++
Also
- simplify and add tests
- remove large memory leak (persistant store of all non-project layers)
- remove broken support for direct loading postgres/virtual layers
by string (Python version was very broken and would never match
a postgres/virtual layer)
2017-04-05 19:50:46 +10:00
Nyall Dawson
a0bd464232 Use formatted name for algorithm names
Avoids conversion of names later and gives clearer separation
between visible names and internal names
2017-04-03 21:17:45 +10:00
Nyall Dawson
6987d7b37c Port handling of algorithm names to QgsProcessingAlgorithm 2017-04-03 21:17:45 +10:00
Nyall Dawson
dc729c1b5a Move algorithm group handling to QgsProcessingAlgorithm 2017-04-03 21:17:45 +10:00
Nyall Dawson
faa8a653b2 Move algorithm icon handling to QgsProcessingAlgorithm 2017-04-03 21:17:45 +10:00
Nyall Dawson
28e75731e1 Move tag handling to QgsProcessingAlgorithm 2017-04-03 21:17:45 +10:00
Juergen E. Fischer
c77172ed3d fix more flake8 warnings 2017-03-05 10:21:24 +01:00
Nyall Dawson
ede452be85 [processing] Port feedback object to c++
Algorithms are now passed a QgsProcessingFeedback object
instead of the loosely defined progress parameter.
2017-01-11 11:11:10 +10:00
Nyall Dawson
3c51a93f6a [processing] Fix very broken delete columns algorithm 2016-11-23 15:21:17 +10:00
Alexander Bruy
3407ced90e fix indentation
Conflicts:
	python/plugins/processing/gui/BatchInputSelectionPanel.py
	python/plugins/processing/gui/wrappers.py
2016-10-05 12:38:50 +02:00
volaya
fe5d0166cc [processing] added multiple option to ParameterTableFIeld
removed ParameterTableMultipleField and did some cleanup
2016-10-05 12:38:09 +02:00
Matthias Kuhn
4a7a8ff263 Update python code 2016-10-01 15:39:03 +02:00
Alexander Bruy
65db336eaf [processing] move some constants to the dataobjects module 2016-09-02 09:28:45 +03:00
Nyall Dawson
c1649ebef4 [processing] pendingFields() -> fields()
Does the same thing, but pendingFields() is ugly
2016-08-05 06:31:07 +10:00
Alexander Bruy
e7fe61e6b9 [processing] load algorithms only when requred 3rd party modules are
available or compatible QGIS version is used

Some housekeeping in QGIS algorithms provider
2016-02-17 14:46:02 +02:00
Juergen E. Fischer
b39055b39c indentation update (now including autopep8) 2015-08-22 14:29:41 +02:00
Juergen E. Fischer
66a3d02240 integrate processing into update_ts.sh (also includes all translations
in the repository and none outside of it).
2015-07-26 04:28:37 +02:00
pcav
2004f22ac5 Uniform and informative output names for Processing (QGIS, final) 2015-05-22 16:39:20 +02:00