Nyall Dawson
f98bcb2b81
Update processing.run() for new API
2017-06-27 13:18:22 +10:00
Nyall Dawson
4e93f8d038
Don't set override cursor in processing.run
...
Callers may not want this, so leave it up to them to set
an override caller if desired
2017-06-27 11:24:59 +10:00
Nyall Dawson
3286ebb470
Explicit parameters, feedback, context arguments for processing.run
2017-06-27 11:24:33 +10:00
Nyall Dawson
2a1cdead51
processing.run requires a dictionary for parameters
2017-06-27 11:19:29 +10:00
Nyall Dawson
449d8f8c0b
Restore script algorithm provider
2017-06-27 10:50:07 +10:00
Nyall Dawson
3bf9ea3682
Restore ability to run script algorithms
2017-06-27 08:33:13 +10:00
Nyall Dawson
df329bceab
Start restoring creation of outputs from string
2017-06-27 08:33:13 +10:00
Nyall Dawson
d16f117b6c
Port conversion to/from script code to c++
2017-06-27 08:33:13 +10:00
Nyall Dawson
178a415c9f
Port parameter conversion to script code to c++
2017-06-27 08:33:13 +10:00
Nyall Dawson
bb73596406
Load other providers before model provider
2017-06-24 13:49:10 +10:00
Nyall Dawson
9c47e1b148
Fix errors when edit model help
2017-06-24 07:35:56 +10:00
Nyall Dawson
81855a715b
Use FastInsert when adding features from processing
2017-06-23 14:34:38 +10:00
Nyall Dawson
4ea85362f4
Transform errors encountered while iterating features in
...
processing are non-fatal. We report them to users, and treat the
feature as having no geometry, but don't stop execution.
2017-06-23 12:08:54 +10:00
Nyall Dawson
98617c90bd
Report errors when executing algs within dialogs
2017-06-23 12:08:54 +10:00
Nyall Dawson
93b7c2809e
Report success or failure after running algs
...
And auto catch python exceptions and report failure of model
2017-06-23 12:08:54 +10:00
Nyall Dawson
a87ca09e34
Move some temp file/folder utils to c++
2017-06-22 06:48:25 +10:00
Nyall Dawson
be45c2fdbb
Catch errors while running algs
2017-06-13 10:26:35 +10:00
Nyall Dawson
63611b1d8f
Port script code functions to c++ classes
...
Restore logging executed algorithms
2017-06-12 15:59:56 +10:00
Nyall Dawson
2d2c229332
Port checkInputCRS to c++, and allow algorithms to flag when they
...
require all input layers to be in the same CRS
The default behaviour is to assume that algorithms are well behaved
and can handle multi-CRS inputs, but algs have the option to
flag that they do not allow this and require the input CRS check.
Those algs should document that they require all inputs to have
matching CRS - processing 3.0 behaviour is to assume that algs
can handle this.
2017-06-12 07:26:02 +10:00
Nyall Dawson
ea18e8e9db
Resurrect grid polygon algorithm
2017-06-12 07:26:02 +10:00
Alexander Bruy
d859399ce5
[processing] use QGIS user manual as help source for all algorithms by
...
default.
NOTE: URL scheme should be adopted when documentation team decided how
manual will be scructured.
2017-06-06 10:51:22 +03:00
Alexander Bruy
a137a7c0f3
[processing] open help in the default webbrowser to be consistent with
...
the rest of QGIS dialogs
2017-06-06 10:51:22 +03:00
Nyall Dawson
c1d35a043b
Port getHTMLOutputsCount to c++ API
2017-06-06 15:39:54 +10:00
Nyall Dawson
2f28736e8e
Remove some unused code
2017-06-06 14:38:52 +10:00
Nyall Dawson
d7aa3f5f7c
[processing] Change explicit encoding string parameters to more
...
flexible QVariantMap creatOptions parameters which include an
optional fileEncoding value
More flexible, allows sinks to be created using any creation
option which is passed to the underlying provider
2017-06-06 08:00:28 +10:00
Nyall Dawson
7683b25f81
Move getFileFilter from params to gui wrappers
2017-06-06 07:41:20 +10:00
Nyall Dawson
a658135693
Remove global processing use selection setting
2017-06-06 07:41:20 +10:00
Nyall Dawson
bdf051a03a
Partially port a trial python alg to new API
2017-06-06 07:41:19 +10:00
Nyall Dawson
0c3ad14c79
Adapt more python code to new API
2017-06-06 07:41:19 +10:00
Nyall Dawson
28f7a8b7e1
Move expression context generation out of parameters
2017-06-06 07:41:19 +10:00
Nyall Dawson
416770b197
Remove no longer required _resolveLayers method
2017-06-06 07:41:19 +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
ef59d0c454
Port parameter checking to c++
2017-06-06 07:41:19 +10:00
Nyall Dawson
c1d9d57dd2
First working pure c++ algorithms
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
9997ab6e1e
Partially port wrappers to QgsProcessingParameterDefinition
...
And create a new WidgetWrapperFactory for creating a suitable wrapper
corresponding to a parameter
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
134c04b8bb
Move getParametersPanel out of algorithm class
...
It's a gui related method, so shouldn't be in core class
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
2d1579d28a
Port algorithm help to QgsProcessingAlgorithm
2017-06-06 07:41:19 +10:00
Nyall Dawson
1e788556f0
Port getCustomParametersDialog to QgsProcessingAlgorithm
2017-06-06 07:41:19 +10:00
Nyall Dawson
fb811766f8
Add framework for algorithm outputs
...
This somewhat changes the meaning of outputs from processing 2.x.
In 2.x processing outputs were used both as a method of specifying
inputs to algorithms (file paths to destination layers created
by the algorithm) AND pure outputs (such as statistics calculated
by the algorithm).
This is now split. The old input-type-outputs (destination layers)
are now input parameters (since the parameter value IS an input to the
algorithm). To differentiate them from parameters indicating pure
input layers a new "isDestination()" method was added to
QgsProcessingParameterDefinition.
Output definitions are now purely indications of values CREATED
by the algorithms. Suitable candidates are the existing calculated
stats and actual file path/URI of any layers created by the algorithm.
Moving forward we should ensure all algorithms output as much
useful information as possible - e.g. number of features processed,
number of skipped features, count null geometries encountered, etc...
2017-06-06 07:41:19 +10:00
Nyall Dawson
fac8ca4d4f
Move execution check to QgsProcessingAlgorithm
2017-06-06 07:41:19 +10:00
Nyall Dawson
03e40f7497
[processing] Remove all remaining algorithm copies
...
Algorithms are no longer copied - just a single const instance
of each algorithm is used
2017-06-06 07:41:19 +10:00
Nyall Dawson
b64a71df61
Port algorithm countVisibleParameters to c++
2017-06-06 07:41:19 +10:00
Nyall Dawson
2da85f8771
Temporarily deactivate all processing providers/algorithms
...
While the processing API is in such a state of flux it's
become unmaintainable to port these algorithms change-by-change.
Instead, disable them all until the API is fixed, and then we
can port them algorithm by algorithm and reactivate each
test in turn.
2017-06-06 07:41:19 +10:00
Nyall Dawson
ae97c333d6
Revert "Port algorithm countVisibleParameters to c++"
...
This reverts commit c3c694f8ccfbe0b64df14365f950f5895968a66a.
2017-05-15 10:24:38 +10:00
Nyall Dawson
c3c694f8cc
Port algorithm countVisibleParameters to c++
2017-05-15 08:44:28 +10:00
Nyall Dawson
6aa10c6817
[processing] Cleanup some layer/writer related handling
...
Ensure that layers created by QgsProcessingUtils::createFeatureSink
can always be retrieved using QgsProcessingUtils::mapLayerFromString
2017-05-09 15:29:41 +10:00