55 Commits

Author SHA1 Message Date
Harrissou Sant-anna
4c32a01bde
Fix list of algorithms shortcut in vector and raster menus
Fix #18175
2018-02-26 20:14:12 +01:00
Juergen E. Fischer
2c53630747 add missing copyright headers 2018-02-18 20:53:40 +01:00
Nyall Dawson
87c1986c4b Improved memory managment of algorithm dialogs
Ensure that dialogs are always correctly deleted when appropriate.

Also, if an algorithm is running in a background task and hits
an error, we automatically re-show the algorithm dialog and the
associated log for debugging.

Fixes #16858
2018-01-16 19:45:40 +10:00
Mathieu Pellerin
b5dc9fd3cd [processing] restore and improve lines to pol / pol to lines algs (#4850)
New geometry model for lines to pol / pol to lines agls.
2017-07-14 14:44:38 +07:00
Nyall Dawson
5c844a5cfb Really delete processing dialogs
The dialogs are parented to the main window, which means sip
transfers the ownership to the main window - and they are
never deleted as a result. This results in various error
messages caused by the widgets hanging around forever
and listening out for various signals they are connected to.
2017-07-12 18:52:53 +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
bdf051a03a Partially port a trial python alg to new API 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
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
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
ac84326464 [processing] Fix executing models 2017-05-01 17:29:40 +10:00
Nyall Dawson
fd2c18ee16 Refactor processing writer to use QgsFeatureSink, and to store
temporary output layers in the provided processing context

Should fix loss of intermediate memory layers when running
a multi-step model
2017-04-26 17:38:40 +10:00
Nyall Dawson
dd4f530cfb [processing] Pass context argument to processAlgorithm 2017-04-26 12:53:35 +10:00
Nyall Dawson
4970bb4cd5 Move more algList functionality to QgsProcessingRegistry 2017-04-07 13:21:28 +10:00
Nyall Dawson
2a1a71574a Move algorithm id (previously commandLineName) to QgsProcessingAlgorithm 2017-04-07 13:21:28 +10:00
Nyall Dawson
b3142a0baf Move provider algorithm handling to QgsProcessingProvider 2017-04-07 13:21:28 +10:00
Nyall Dawson
6987d7b37c Port handling of algorithm names to QgsProcessingAlgorithm 2017-04-03 21:17:45 +10:00
Nyall Dawson
faa8a653b2 Move algorithm icon handling to QgsProcessingAlgorithm 2017-04-03 21:17:45 +10:00
Alexander Bruy
c1e6ba0f40 [processing] rename AlgorithmExecutor's runalg() and runalgIterating()
to avoid overlapping with general functions and improve readability
2017-03-22 19:11:36 +02:00
Juergen E. Fischer
f00a87cb8a update translation strings 2017-03-05 10:21:24 +01:00
Bernhard Ströbl
115ede60ce [processing] replace alg Eliminate with new alg EliminateSelection
* [processing] replace alg Eliminate with new alg EliminateSelection

* Deprecate Eliminate algorithm

* Expose new EliminateSelection algorithm in GUI

* Rename ouput layer

* Reflect algorithm changes in help

* Remove superfluous init method

* Simplify code, thanks Nyall

* Improve transfer of selection to processLayer

* Remove deprecated Eliminate algorithm

* Remove test for Eliminate

* Fix indentation
2017-02-23 09:33:28 +01:00
Denis Rouzaud
0a63d1f2c2 [spellcheck] properly look into various cases and add more fixes" 2017-01-16 16:39:20 +01:00
Nyall Dawson
ede452be85 [processing] Port feedback object to c++
Algorithms are now passed a QgsProcessingFeedback object
instead of the loosely defined progress parameter.
2017-01-11 11:11:10 +10:00
Nyall Dawson
dca697b427 [processing] New c++ QgsProcessingRegistry class
Intended as a registry for the various processing components,
including providers, algorithms and various parameters and outputs.

Currently handles only registration of providers, as a step toward
removing processing's algList (this requires first porting
the algorithm class to c++)

A QgsProcessingRegistry instance is attached to QgsApplication,
and is retrieved by QgsApplication::processingRegistry()
2017-01-11 10:55:15 +10:00
Juergen E. Fischer
378212cf42 indentation update 2017-01-10 09:05:42 +01:00
Alexander Bruy
c5835e9adc [processing] fix test and menus after renaming GdalOgr provider 2016-12-31 09:09:07 +02:00
Alexander Bruy
f40e914b76 [FEATURE] replace GDALTools plugin with Processing
Tagged as feature to not forget mention in docs and changelog
2016-12-26 19:09:32 +02:00
Nyall Dawson
51206590c9 [processing] Use newer basic stats algorithm in vector menu 2016-12-07 13:30:54 +10:00
Alexander Bruy
85962653a2 [processing] restore Points in Polygons algorithm menu entry (follow up d4323addf0) 2016-10-11 12:01:14 +03:00
Nyall Dawson
d4323addf0 [processing] Fix missing points in polygons menu item (fix #15670)
Also add a unit test
2016-10-11 09:30:46 +10:00
Juergen E. Fischer
31df84aa6b run 2to3 on source 2016-09-21 23:30:04 +02:00
Juergen E. Fischer
474b9d86b2 processing: use main vector menu translation (fixes #14535)
(cherry picked from commit 11289a0d973e6e4a3f7f81972dd08f2e6d82941e)
2016-09-03 20:19:43 +02:00
arnaud.morvan@camptocamp.com
e716bae82f Process deleteLater events before recreating processing menus 2016-08-22 10:18:51 +02:00
Nyall Dawson
e9423dc4dd [processing] Rework centroid algorithm to handle non-polygon layers
The existing polygoncentroids algorithm has been deprecated
(and hidden from the toolbox), and a new, generic centroids
algorithm added which works with lines and multipoints
2016-08-12 07:50:47 +10:00
arnaud.morvan@camptocamp.com
9edab1e0a8 [Processing] Translate alg names in menu and options dialog 2016-06-23 17:38:46 +02:00
volaya
33fc3be15f [processing] separated alglist to its own module 2016-05-23 19:36:16 +02:00
Nyall Dawson
18b69d26ef Indentation 2016-05-11 23:02:34 +10:00
volaya
e6f1439c0a [processing] add object name to custom menus 2016-05-06 09:00:33 +02:00
Denis Rouzaud
8071acd064 move PyQt compat folder to python/qgis 2016-04-29 14:10:26 +02:00
Nyall Dawson
965cef2b2e Indentation fix 2016-04-09 10:55:27 +10:00
volaya
297f4669fd [processing] added preconfigured algorithms 2016-04-07 12:03:39 +02:00
Nyall Dawson
9d5df4efb7 Fix indentation 2016-04-07 18:47:01 +10:00
volaya
673a86040d [processing] extended 'menus' section in options, to allow adding buttons 2016-04-05 09:55:42 +02:00
Alexander Bruy
8afd1103c1 don't duplicate Menus entry in settings 2016-03-20 08:41:27 +02:00
Juergen E. Fischer
a17ed10b65 fix vector menu creation on qt5 2016-03-19 02:12:12 +01:00