423 Commits

Author SHA1 Message Date
Médéric RIBREUX
4b8b6a09c8 Massive conversion 2017-11-04 15:31:21 +01:00
Médéric Ribreux
56b963e313 Improve ext scripts and support OutputFolder 2017-11-04 15:31:21 +01:00
Médéric Ribreux
f0da7b0186 Improve MultiLayers and FileDestination support 2017-11-04 15:31:21 +01:00
Médéric Ribreux
9eff16f431 Finish fixing description files (no more errors on startup) 2017-11-04 15:31:21 +01:00
Médéric Ribreux
be78153427 (WIP) Grass algorithms can be opened and inputs are treated 2017-11-04 15:31:21 +01:00
Médéric RIBREUX
a676db2c0f Handle parameters and update description files (WIP) 2017-11-04 15:31:21 +01:00
Médéric Ribreux
733218caca (WIP) enable Grass7 provider and start to work on QgsProcessing new framework 2017-11-04 15:31:21 +01:00
Alexander Bruy
c53ff66caf fix permissions 2017-10-11 17:06:11 +03:00
arnaud.morvan@camptocamp.com
534fe21f51 [processing] Add useCheckBoxes option to SelectionWidgetWrapper
This allow to show checkboxes or radioboxes intead of line edit with button.
This is configurable for each algorithm thought ParameterSelection metadata parameter.
It is also possible to choose the number of columns.
This is not applied in case of the BatchDialog.
2017-09-16 09:57:13 +10:00
Nyall Dawson
5c888c5830 Resurrect gdal warp algorithm 2017-08-14 04:56:24 +10:00
Nyall Dawson
f802c56573 Merge pull request #4996 from nyalldawson/spelling_and_stuff
Fix some spelling, add parameter names to tooltips in processing
2017-08-07 19:11:26 +10:00
Mario Baranzini
78af413dcc Remove python future compatibility layer 2017-08-07 10:27:15 +02:00
Nyall Dawson
7cebe7a343 Fix some grammar 2017-08-07 17:45:33 +10:00
Alexander Bruy
56208540f9 [processing] remove GeoAlgorithmExecutionException 2017-07-13 09:02:24 +03: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
82ef7d2a89 Create specific expression context scope for child algorithms
Contains variables for model parameters, algorithm results for
other child algorithms which are not dependent on the
algorithm.

Allows removal of final pieces of ModelerAlgorithm code
2017-07-07 11:35:31 +10:00
Nyall Dawson
55ce31b371 When calling procesing.run(), map layer results are automatically
converted to QgsMapLayer objects with the ownership transferred
to the Python caller

This should make it super-easy for PyQGIS scripts to run processing
algorithms and immediately utilise the results, even if they
are memory layers. They call processing.run(), and get a dict of
results back which includes those layers ready for adding to the
current project or doing some other processing or operations
with, and if they don't transfer to ownership off then these
layers will be correctly garbaged collected by Python.
2017-07-07 09:28:20 +10:00
Denis Rouzaud
5b8e2c2f27 remove QgsVectorLayer::hasGeometryType in favor of QgsMapLayer::isSpatial 2017-07-05 10:18:32 +02:00
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