32 Commits

Author SHA1 Message Date
Nyall Dawson
2a442c7886 Rationalise algorithm groups a bit 2017-08-22 23:36:42 +10:00
Nyall Dawson
4d242c5673 Partial port of raster calculator to new API
TODO: modeler handling
2017-08-20 18:21:03 +10:00
Nyall Dawson
2e8d940f2d Use context.project() instead of QgsProject.instance() 2017-07-27 10:49:52 +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
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
f64f74fb63 Fix incorrect import 2017-06-06 13:41:42 +10:00
Nyall Dawson
ba03f1a13a Move minimum layer extent calculation to c++ 2017-06-06 07:41:19 +10:00
Nyall Dawson
189f804714 Adapt more code to c++ API 2017-06-06 07:41:19 +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
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
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
8ffdb362cc Port some processing dataobjects routines to c++ 2017-04-05 15:27:17 +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
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
DelazJ
c301369ebe Replace cellsize by cell size 2016-12-29 01:46:17 +01:00
volaya
96b8a90758 [processing] In raster calculator, use filename without extension to refer to layer 2016-12-06 09:03:51 +01:00
Alexander Bruy
b85b5e75e7 [processing] values() is a dict view object, not list 2016-12-01 12:53:57 +01:00
Alexander Bruy
781ebd9a69 [processing] xrange() removed, should use range() instead 2016-12-01 12:53:57 +01:00
Alexander Bruy
3e7b26233e [processing] replace deprecated % operator with format() 2016-12-01 12:53:57 +01:00
Alexander Bruy
50a785bdd6 [processing] indentation update 2016-12-01 12:53:57 +01:00
Alexander Bruy
f002321be1 [processing] iteritems() removed, should use items() instead 2016-12-01 12:53:57 +01:00
volaya
40053f81f2 renamed ParameterExpression in raster calculator to avoid name clash 2016-12-01 12:53:57 +01:00
volaya
44f963f60d [processing] removed debug line 2016-12-01 12:53:57 +01:00
volaya
a7f9018e11 [processing] added native raster calculator algorithm
Conflicts:
	python/plugins/processing/algs/qgis/QGISAlgorithmProvider.py
2016-12-01 12:52:45 +01:00