48 Commits

Author SHA1 Message Date
Juergen E. Fischer
b81d306047 spelling fixes (closes #32408) 2019-10-26 10:50:30 +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
Nyall Dawson
af06cf0cd2 [processing] Fix exception when creating unit tests 2019-03-21 16:08:42 +10:00
Nyall Dawson
60a87e9497 [processing] Fix error when creating tests and raster output
no longer exists

Fixes #16123
2018-06-01 16:20:12 +10:00
Nyall Dawson
6412138259 Indentation 2018-04-20 18:27:00 +10: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
Nyall Dawson
835cca7cae [processing] More string HIG fixes 2018-02-22 06:44:17 +11:00
Nyall Dawson
40f09fab85 [processing] Fix creating tests when alg has optional outputs 2018-01-23 12:18:55 +11:00
Alexander Bruy
0059b2b692 [processing] remove Python 2 compatibility layer 2017-11-28 12:27:45 +02:00
Alexander Bruy
afac940d37 [processing] add band parameter support in test generator 2017-09-24 07:50:05 +10:00
Nyall Dawson
e0026609bb Fix missing geometries/attributes in Extract by Location 2017-09-10 10:45:34 +10:00
Nyall Dawson
16c4f830b3 [FEATURE] New algorithm for 'collecting' geometries
This is basically the equivalent of the dissolve algorithm, but
instead of a dissolving overlapping geometries the geometries
are instead just collected together into a multipart geometry.

It's designed to slot between the 'promote to multipart' algorithm
(which performs no collection of geometries - it just converts
singleparts to multiparts with 1 part) and the more complex
all-encompassing 'aggregate' algorithm.
2017-09-05 19:41:27 +10:00
Nyall Dawson
bb5a499c23 Fix generation of processing tests on Windows 2017-08-30 15:25:11 +10:00
Nyall Dawson
99fd727bab Fix some issues when creating processing tests 2017-08-20 18:21:03 +10:00
Nyall Dawson
6144b1c5d9 Resurrect Field Calculator algorithm, add test 2017-08-20 18:21:02 +10:00
Nyall Dawson
ebda2fd212 Rename some enum values for clarity 2017-08-19 02:46:22 +10:00
Nyall Dawson
69c991ed87 Restore ability to create processing tests from history panel 2017-08-13 16:56:58 +10:00
Nyall Dawson
bb344bcee2 Fix typo 2017-07-15 22:08:39 +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
189f804714 Adapt more code to c++ API 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
4970bb4cd5 Move more algList functionality to QgsProcessingRegistry 2017-04-07 13:21:28 +10:00
Alexander Bruy
1a46ddbf28 [processing][API] rename runalg() and runandload() to improve
readability
2017-03-22 19:17:12 +02:00
Nyall Dawson
38a0ea0844 Small tweaks to processing split algorithm, add tests 2016-11-24 08:48:37 +10:00
Nyall Dawson
69e8e4a3c2 [processing] Allow alg tests to use ParameterTable inputs 2016-11-24 07:52:17 +10:00
Alexander Bruy
45a84419ff [processing] show error message instead of Python error if output raster is temp output and test can not be created 2016-10-06 15:57:13 +03:00
Juergen E. Fischer
31df84aa6b run 2to3 on source 2016-09-21 23:30:04 +02:00
Médéric RIBREUX
bb94a179a9 Add new test data and a bunch of unit tests 2016-06-12 17:36:42 +02:00
Médéric RIBREUX
b951c94746 Handle OutputFile in test generation 2016-06-12 14:46:42 +02:00
Médéric RIBREUX
0cd4498658 Improve Test generation 2016-06-12 14:23:09 +02:00
Médéric RIBREUX
ec6b29aa8c Remove NaN values from raster before hash calculation 2016-05-29 09:00:16 +02:00
Médéric Ribreux
48d45fbd22 Fix multiple input parameter type detection for graphical unit test generator 2016-05-29 09:00:16 +02:00
Médéric Ribreux
222935b45f Expand external file support to graphical unit test generator 2016-05-29 09:00:16 +02:00
Denis Rouzaud
8071acd064 move PyQt compat folder to python/qgis 2016-04-29 14:10:26 +02:00
Juergen E. Fischer
2526d3e3c8 processing: switch to pyqt wrappers, flake8 fixes 2016-03-21 17:00:25 +01:00
Juergen E. Fischer
c6d921729e python fixes:
* issues identified by pyflakes (star and unused imports)
* pyqtwrapper: add QtSvg
* some exceptions e.message => unicode(e)
* some translations tr("..." % foo) => tr("...") % foo
* TODO:
  python/console/console_sci.py:547 QsciScintillaCompat?
  python/plugins/db_manager/dlg_query_builder.py:304 pop_up_error?
2016-03-15 17:25:23 +01:00
Matthias Kuhn
0e690fc701 [processing tests] Fix test generation parameter types 2016-03-15 11:08:46 +01:00
Matthias Kuhn
911196811c [processing] TestGenerator: Create parameters as dict 2016-02-23 09:33:41 +01:00
Matthias Kuhn
23802eb5b7 Add file comparison for HTML output to processing test generator
Refs #14311
2016-02-21 13:16:59 +01:00
Matthias Kuhn
f0629ea5a9 [processing] Allow test creation from history window 2016-02-04 13:36:43 +01:00
Juergen E. Fischer
b39055b39c indentation update (now including autopep8) 2015-08-22 14:29:41 +02:00
Matthias Kuhn
9fc1b48bf3 Replace str() with unicode() and some PEP 8 2015-08-16 20:58:43 +02:00
Juergen E. Fischer
956c155e8f fix python pep8 warnings and fix some revealed errors
pep8 --ignore=E111,E128,E201,E202,E203,E211,E221,E222,E225,E226,E227,E231,E241,E261,E265,E272,E302,E303,E501,E701 \
     --exclude="ui_*.py,debian/*,python/ext-libs/*" \
     .
2015-02-01 20:46:47 +01:00
Alexander Bruy
bd13693ae3 [processing] make bunch of strings translatable (sorry translators) 2014-10-04 11:36:39 +03:00
volaya
6486594f57 [Processing] Refactoring of parameters and outputs
It also adds some changes in the core and tools package, to provide a cleaner structure
2014-07-14 14:47:05 +02:00
Alexander Bruy
498a5d9ab8 [processing] code formatting, make sources more pep8 compliant 2013-10-02 16:24:10 +03:00
Victor Olaya
807ffaa5e6 [processing] refactoring to move common functions to tools package 2013-09-14 13:26:41 +02:00
Victor Olaya
9bb3d6eb6b renamed "sextante" to "processing" 2013-08-20 09:22:03 +02:00