490 Commits

Author SHA1 Message Date
Nyall Dawson
6b82917715 [processing] Refine behavior of "Use filename as layer name" option to
always avoid using temporary file names, and then set this option as
enabled by default.

Also change the setting key so that existing users will also get the new
default value.

Fixes #32591
2019-11-09 20:07:55 +10:00
lbartoletti
9e30319be7 [BUGFIX] Fix an hardcoded 'gpkg' extension in ProcessingConfig.py 2019-11-09 13:35:04 +10:00
Nyall Dawson
cfcf580b61 [processing][needs-docs] Resurrect setting for default raster/vector
output format

This setting is still used and required in some circumstances, e.g.
it is used as the default selection in outputs file pickers when
the previously used format is not valid.
2019-09-24 16:50:22 +10:00
Isghj5
9fd93a1013 ProcessingConfig: added multithread max thread setting, TilesXYZ: max thread now inherrrits from ProcessingConfig 2019-08-12 08:41:26 +10:00
Alexander Bruy
5709f84b2f [processing] add createByDefault argument to directory output
constructor
2019-07-15 08:51:01 +10:00
Alexander Bruy
84c530b97b [processing] make color parameter available to description-based algs 2019-07-09 06:14:48 +03:00
Nyall Dawson
aa8d5cd22e [processing] Fix API break which breaks some 3rd party providers (e.g. R and Javascript providers) 2019-07-08 13:26:55 +10:00
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
rldhont
943c7d5d90 [Processing] Define boolean output
In processing, if an algorithm has a boolean as an output, it cannot be defined as boolean but as a number.

To be more precise in algorithms description, the commit add QgsProcessingOutputBoolean.
2019-05-17 08:21:57 +10:00
Nyall Dawson
32fbf0a92b [processing][FEATURE] New parameter type for map scales
This adds a new parameter type specifically for map scales,
QgsProcessingParameterScale. The values are evaluated using
self.parameterAsDouble, which returns the map scale
denominator (matching the standard in other parts of the
QGIS API).

Scale parameters are displayed to users using the standard
QgsScaleWidget, which includes the combo box of predefined
scales and a shortcut button to match the current map scale.
2019-03-13 16:52:29 +10:00
Nyall Dawson
021d1ef237 [FEATURE][processing] New parameter types for layouts and layout items
Allows processing algorithms which operate on a specific layout
and layout item selection
2019-03-12 08:16:52 +10:00
Etienne Trimaille
2076ca4fe0
replace some PyQt5 to qgis.PyQt 2019-03-09 22:45:51 -04:00
Nyall Dawson
63d648738d [processing][needs-docs] By default, hide algorithms with known issues from toolbox
And add a Processing setting to allow these to be shown. When shown, they
are highlighted in red with a tooltip explaining that the algorithm
has known issues
2019-03-06 06:33:06 +10:00
Juergen E. Fischer
9f1fcb72d4 processing: enable translation for parameter descriptions 2019-03-05 20:16:23 +01:00
Rashad Kanavath
3b87f7b17f [FEATURE] [needs-docs] integrate OTB provider to processing plugin 2019-02-23 05:20:17 +10:00
Nyall Dawson
2fc24aedde Clearer phrasing 2019-02-04 09:21:17 +10:00
Alexander Bruy
8446d3bdf0 [processing][needs-docs] native vector split algorithm now outputs
GeoPackages instead of shapefiles (refs #20557)

Also remove default output extension Processing settings as they are not
used anymore.
2019-01-29 11:05:37 +11:00
Alessandro Pasotti
71e2a6be7e In-place passthrough for invalid geometries if processing option is to skip invalid
Fixes #20147 - difference deletes invalid geometries
2018-10-18 17:43:00 +02:00
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