472 Commits

Author SHA1 Message Date
Nyall Dawson
8f3ac4506b [processing] Remove some unused configuration settings 2018-08-21 15:09:37 +10:00
Nyall Dawson
85d740026a [processing] Remove extraneous parameter value check
The subsequent call to checkParameterValues covers the same checks,
but in a more flexible way.

Refs discussion at https://github.com/qgis/QGIS-Documentation/pull/2797
2018-08-21 05:24:30 +10:00
Nyall Dawson
63fd4bab2a [processing][FEATURE] Store models inside QGIS project files
Allows processing models to be stored inside QGIS project files,
so that opening the project makes that model available.

Some models are so intrinsically linked to the logic inside
a particular project that they have no meaning (or are totally
broken) outside of that project (e.g. models which rely
on the presence of particular map layers, relations, etc)

This change allows these models to be stored inside that project,
avoid cluttering up the "global" model provider with models
which make no sense, and making it easier to distribute a single
project with these models included.

Models are stored inside projects by clicking the new "embed
in project" button in the modeler dialog toolbar. Models can be
removed from a project from the model's right click menu in the
toolbox.
2018-08-13 15:47:01 +10:00
Nyall Dawson
6c014b46ba [processing] Use c++ recent algorithm log, remove python log
Indirectly fixes #19218
2018-07-05 02:37:03 +10:00
Nyall Dawson
977e14b058 [processing] Fix potential crash when calling processing.run with
custom context, but no feedback object
2018-06-28 14:12:37 +10:00
Nyall Dawson
f34b3170b2 [processing] Fix parsing optional output 'create by default' from string' 2018-05-07 19:17:04 +10:00
matteo
9b22d99707 typos 2018-05-04 11:00:09 +10:00
matteo
b2c0dd96ae [processing] resurrecting some parameters in Modeler 2018-05-04 11:00:09 +10:00
matteo
177f2c8aea [processing] resurrecting some parameters in Modeler 2018-05-04 11:00:09 +10:00
matteo
2e67885c3a [processing] resurrecting some parameters in Modeler 2018-05-04 11:00:09 +10:00
Nyall Dawson
c32611b2c4 [processing] Remove unused code 2018-05-02 04:55:01 +10:00
Matthias Kuhn
5910ba9631 No print() usage in processing core 2018-04-25 11:26:46 +02:00
Nyall Dawson
6a2625664e [processing] Add dedicated "distance" parameter
This is a subclass of QgsProcessingParameterNumber, but specifically
for numeric parameters which represent distances. It is linked
to a parent parameter, from which the distance unit will
be determined, and is shown using a dedicated distance widget
within the processing parameters panel. This widget shows
the distance unit.

This avoids the confusion when running algorithms which
use distances where the unit depends on a layer or CRS parameter -
e.g. the distance parameter in the buffer algorithm gives
the distance in layer units... so now we can show those units
directly within the dialog. Hopefully this leads to less
user confusion and accidental "1000 degree buffers"!

Additionally - if the unit is in degrees, a small warning
icon is shown next to the parameter. The tooltip for this
icon advises users to reproject data into a suitable
projected local coordinate system.

Initially implemented for the native buffer and single
sided buffer algorithm only - but more will be added.

Fixes #16290
2018-04-20 18:27:00 +10:00
matteo
9107da368e [processing] fix missing import 2018-04-20 18:26:33 +10:00
Nyall Dawson
d5573a5a7b [processing] Use silent feedback by default in processing.run
Relying on the iface messagebar feedback as a fallback is not
safe for standalone scripts. If callers want to use a message
bar feedback they should specify this feedback object specifically
when calling processing.run
2018-04-11 09:47:34 +10:00
Nyall Dawson
ee185cce4d [processing] Fix python runAlgorithm when algorithm has missing optional outputs 2018-04-10 09:57:58 +10:00
Alexander Bruy
a9441218c1 [processing] fix parameters IDs (follow up #6535) 2018-03-08 11:10:20 +02:00
Matthias Kuhn
a337d2050b Make use of new processing parameter infrastructure 2018-03-07 09:00:33 +11:00
Matthias Kuhn
1fd74234b4 Add processing parameter type definitions 2018-03-07 09:00:33 +11:00
Matthias Kuhn
b67813bdc9 API doc update 2018-03-01 10:42:51 -05:00
Matthias Kuhn
0c730596fa Hide unsupported parameters in modeller 2018-03-01 10:42:51 -05:00
Matthias Kuhn
a0cda52269 Remove outdated comment block 2018-03-01 09:49:50 -05:00
Matthias Kuhn
eba96fb9cc Add a processing parameter registry
to manage parameter metadata in a single place.
2018-03-01 08:12:41 -05:00
arnaud.morvan@camptocamp.com
3718d4e65b [processing] Properly load basic providers
Processing module should only register it's own basic providers.
Note that when reloading a plugin, subclasses of ProcessingProvider remains and new ones are added,
so in such cases QgsProcessingProvider.__subclasses__() return same provider class many times.
2018-02-21 21:42:43 +00:00
nirvn
e5d7733bfc [processing] harmonize order of result panel (latest first) and add timestamp 2018-02-12 13:51:31 +07:00
Alexander Bruy
178509347a [processing] add enums support for fields and feature source parameters
(follow up 068d74d5)
2018-02-11 14:05:09 +02:00
Nyall Dawson
4bcc9df5b4 [processing] Add explicit output type for multiple layers
This was a missing capability in the processing API - while algorithms
could declare multiple layer input parameters, there was no corresponding
multi-layer output. This meant that algorithms (such as Package Layers,
Vector Split) which create a set of layers which cannot be determined
in advance had no way to pass these generated layers on for further model
processing steps.

It's also useful for algorithms which operate on a specified folder,
processing all layers found there, and allowing these generated
outputs to be utilised in other model steps (e.g. packaging
all of them, merging them, etc)
2018-02-11 10:57:44 +10:00
Alexander Bruy
068d74d51a [processing] allow enums values to be used in description files 2018-02-08 17:22:20 +02:00
Alexander Bruy
4f2a4644db [processing] remove obsolete code and disable exporting models as script
until we update it so support new scripts format
2018-02-05 08:50:44 +02:00
Alexander Bruy
422d804db1 [processing] update script provider to use QgsProcessingAlgorithm
subclasses instead of custom script code
2018-02-05 08:49:59 +02:00
Nyall Dawson
216821c0b1 [processing] Warn on duplicate output and provider registration
And fix associated memory leaks
2018-02-01 13:02:59 +11:00
Alexander Bruy
e67aaf9a26 [processing] rename QGISAlgorithmProvider to QgisAlgorithmProvider to be
consistent with our guidelines
2018-01-15 11:59:01 +02:00
Alexander Bruy
7ecb0536fd [processing] correctly retrieve icon for script collection (fix #17780) 2018-01-15 11:59:01 +02:00
Alexander Bruy
3f55bba535 [processing] don't close algorithm dialog after execution 2018-01-11 11:55:08 +02:00
Médéric RIBREUX
5b86407338 Fix parameters and support empty default values for Enums 2017-12-16 11:12:12 +01:00
Nyall Dawson
252f0802b1 Follow up 647bd25 2017-12-16 13:54:26 +10:00
Nyall Dawson
647bd256b1 [processing] Use a more unique separator for log file
Fixes #17704
2017-12-16 11:59:11 +10:00
volaya
1648c79dc2 [processing] fixed parsing of integer parameters 2017-12-13 14:39:11 +01:00
Alexander Bruy
79d83f2066 [processing] use core methods for raster and vector extensions handling 2017-12-11 09:38:14 +02:00
Nyall Dawson
db855029de Fix not-set defaults for numeric parameters were converted to 0 2017-12-01 20:42:38 +11:00
Alexander Bruy
3d4a59bb8b [processing] cleanup files from unused code and remove some files 2017-11-28 12:27:45 +02:00
Alexander Bruy
0059b2b692 [processing] remove Python 2 compatibility layer 2017-11-28 12:27:45 +02:00
Nyall Dawson
4b9986eb8c [processing] Add a generic map layer output type
For occasions when an algorithm creates a map layer, but the type
is not known in advance (i.e. could be raster OR vector)
2017-11-27 06:38:21 +11:00
Alexander Bruy
bd0b499810 add misssed import after rebase 2017-11-09 20:15:30 +02:00
Alexander Bruy
4b63975eaf [processing] tests for SAGA provider and related fixes 2017-11-09 18:56:44 +02:00
Nyall Dawson
d9ac3772fd Update SAGA ParameterTable parameters 2017-11-09 18:56:01 +02:00
Nyall Dawson
571a5ca5f8 Start bringing back saga algs - split RGB bands 2017-11-09 18:53:02 +02:00
Médéric RIBREUX
aa17df1a55 * Add new GRASS 7.2 algorithms.
* Fix ParameterRange GUI.
* Fix Multiple values Enum support.
2017-11-04 18:34:25 +01:00
Médéric RIBREUX
74826dc1ea Support directory output via QgsProcessingParameterFolderDestination 2017-11-04 15:31:21 +01:00
Médéric RIBREUX
4b8b6a09c8 Massive conversion 2017-11-04 15:31:21 +01:00