1432 Commits

Author SHA1 Message Date
nirvn
026b8416ae [processing] Regroup executed algorithms under meaningful groups in the history dialog 2021-04-03 20:46:02 -07:00
nirvn
edaf49c1f5 [processing] Add a help string to tell users what they can do in the history dialog 2021-03-29 15:06:49 +07:00
nirvn
7b66ba8291 [processing] Use algorithm icon and friendly display names in the history dialog 2021-03-29 15:06:48 +07:00
nirvn
fb2240ecac [processing] Properly style the history dialog's python command string 2021-03-29 14:03:29 +07:00
Nyall Dawson
8240788799 [processing] When an algorithm is run in place through the 'ef' locator
filter, ensure the progress bar is removed when the algorithm
finishes

Otherwise it hangs around in the message bar until it's manually
dismissed, unlike the behavior when you run an in-place operation
through the toolbox.
2021-03-16 10:44:40 +10:00
Nyall Dawson
35a781d441 [processing] Fix misleading "cancel" label shown for "close" button
This button isn't a cancel button - it just closes the dialog, and
doesn't abort any changes which have already been made as a result
of running the algorithm through the dialog.
2021-03-16 10:20:53 +10:00
Matthias Kuhn
a825b5af35
Merge pull request #41738 from m-kuhn/alg_exec_no_selection_unbound_local
Fix calling in place with empty iterator
2021-02-22 21:59:36 +01:00
Matthias Kuhn
60ad7d43b3 Fix calling in place with empty iterator
```
              File "/home/mkuhn/.local/share/QGIS/QGIS3/profiles/default/python/plugins/autocurve/plugin.py", line 127, in curvify
              AlgorithmExecutor.execute_in_place(alg, {})
              File "/usr/share/qgis/python/plugins/processing/gui/AlgorithmExecutor.py", line 305, in execute_in_place
              ok, results = execute_in_place_run(alg, parameters, context=context, feedback=feedback)
              File "/usr/share/qgis/python/plugins/processing/gui/AlgorithmExecutor.py", line 214, in execute_in_place_run
              results, ok = {'__count': current + 1}, True
              UnboundLocalError: local variable 'current' referenced before assignment
```
2021-02-22 15:06:19 +01:00
Evan Derickson
0e63799012 Reduce appends 2021-02-20 12:26:00 +10:00
Jean-François Bourdon
64d921fe53
Reformat elapsed time in processing to express time in hours, minutes and seconds (#41573)
When appropriate, express the elapsed time in hours, minutes and seconds in addition to cumulative seconds.
2021-02-20 06:35:16 +10:00
Nyall Dawson
c8d61499ff [processing] Instead of a hidden parameter for verbose model logging,
add an explicit log level getter/setter to QgsProcessingContext which
algorithms can use to determine an appropriate level of feedback
to push to users.

Initially the verbose log only triggers the full verbose output
of model executions (which is also used when running models through
the model designer), but the intention is that more algorithms
will fine tune their output based on the logging level.

qgis_process also gains a new --verbose switch to enable verbose
log output.
2021-02-20 05:04:00 +10:00
Nyall Dawson
f5d3164e2c [processing] Input parameter name for in place algorithms is not
always fixed, so ensure we correctly obtain and use the correct
input parameter name
2021-02-03 12:38:35 +10:00
Nyall Dawson
c6895d969a [processing] Correctly set IN_PLACE configuration option when running in place algorithms through locator filter 2021-02-03 12:38:35 +10:00
Nyall Dawson
46dbd8b2d6 [processing] Fix exception in algorithm locator filter if an
algorithm has no group set

The group isn't mandatory
2021-02-02 14:51:33 +10:00
Nyall Dawson
c703d81c9c [processing] Fix exception after running algorithm in modeler
Fixes #40907
2021-01-12 13:38:01 +10:00
roya0045
d11d28ca3e re-commit variable changes 2021-01-05 18:24:06 +10:00
roya0045
5920ded609 invert logic 2021-01-05 18:24:06 +10:00
roya0045
d45b6144e4 add skip kwarg 2021-01-05 18:24:06 +10:00
Alex
b3794cef32 Don't save defaults 2021-01-05 18:24:06 +10:00
Nyall Dawson
b740bf201a [processing] Fix exception when calling "Select from Files" in batch mode
on a file parameter

Fixes #40705
2021-01-05 08:32:10 +10:00
Alexander Bruy
220cb56421 fix row number calculation when reporting errors in the Processing batch
mode (fix #39326)
2020-11-26 11:27:48 +02:00
uclaros
72fea560ee Add edit-in-place algorithms to locator fuzzy search 2020-11-15 15:02:15 +10:00
Denis Rouzaud
eddf6feb45 modernize CMakeLists.txt files 2020-11-12 07:14:46 +10:00
nirvn
f36701c4f8 [processing] Fix add (single) row tool button broken 2020-11-02 07:47:39 +10:00
Andrea Giudiceandrea
fa1b704a5c [processing] fix method name in GUI wrapper 2020-11-02 07:44:51 +10:00
Juergen E. Fischer
5a2757729a translation string fix 2020-10-25 22:00:42 +01:00
Nyall Dawson
db7b977059 [processing] Correctly discard fid field values when running
algorithms with the RegeneratePrimaryKey flag in in-place mode

Fixes #37761, fixes #33816
2020-10-16 05:04:08 +10:00
Nyall Dawson
2207c30a24 When calling processing.run() and an QgsProcessingExpection occurs,
don't raise a generic "something went wrong" exception but instead
ensure that the original exception with the proper error message
is raised for catching in Python instead
2020-10-09 05:17:49 +10:00
Nyall Dawson
5243a8594c [processing] Fix error reporting from batch dialog
Fixes #39197
2020-10-07 05:59:11 +10:00
Mathieu Pellerin
931136879c
[processing] Make batch process faster (#38989) 2020-09-24 12:34:59 +07:00
Nyall Dawson
772181bc16 [processing] Don't assume iface is available
E.g. in qgis_process iface is None

Fixes #38862
2020-09-21 12:05:34 +10:00
Matthias Kuhn
d41e8e1d40 Rename count to __count 2020-09-15 06:48:37 +10:00
Matthias Kuhn
d2c60cca30 Add count to "tradition run in place execution" 2020-09-15 06:48:37 +10:00
Matthias Kuhn
656c533fa2 Show number of features affected by in place editing
Fixes #38680
2020-09-15 06:48:37 +10:00
vcloarec
d2f4c40f8a TIN Mesh creation 2020-09-10 14:03:11 -04:00
Alexander Bruy
de7de1e28e raise an assert if algorithm which should be added to the toolbar is not found 2020-08-17 08:44:41 +03:00
Alexander Bruy
1a76a0963e add Select By Location to the Selection toolbar (fix #20350) 2020-08-16 12:15:22 +03:00
Alexander Bruy
bacf779236 pick Vector menu title from the main QGIS window instead of using own
translation (fix #35028, #28474)
2020-08-16 12:15:22 +03:00
Matthias Kuhn
2b3b88c515
Merge pull request #37595 from gacarrillor/pr_processing_results_group
Load processing results to layer group (optional)
2020-08-08 09:09:00 +02:00
Nyall Dawson
e19f27d289 [processing] Fix hidden column names show in batch processing dialog,
throwing the table contents out of sync with the headers

Also make code a bit more robust

Fixes #38054
2020-07-31 16:03:28 +10:00
Nyall Dawson
2104ae613a [processing] Add mechanism for algorithms to alter their core behavior
(e.g. parameters) when they are run in the "edit in-place" mode

This allows algorithms to dynamically adapt their behavior to make them compatible
with in-place mode. Previously, some useful algorithms could not be
run in-place because they alter a layer's structure (e.g. adding new
fields).

Now, these algorithms have a means to detect that they are being
run in-place and change their input parameters accordingly. E.g.
an algorithm which usually adds new fields to store calculated
values (such as "add xy fields to layer") could instead expose
field parameter choices to ask the user to pick from existing
fields in which to store the calculated values, thereby avoiding
the need to change the table structure and making them eligable
for running in-place mode.

Note that this needs to be handled algorithm-by-algorithm, it's
not automatic! It's just the raw api to allow this...
2020-07-28 14:18:20 +10:00
Nyall Dawson
6e2d1023f2 [processing] Fix loading batch settings with date/time values
Fixes #37838
2020-07-27 14:19:49 +10:00
nirvn
aa05f7641a [processing] Fix python error when attempting to re-open generate XYZ tiles algorithm from the history dialog 2020-07-24 13:33:11 +07:00
Andrea Giudiceandrea
33fe1eac27 Fix invalid randompointsonlines algorithm ID in menus.py
Fix invalid algorithm ID for menu: qgis:randompointsonlines
The valid algorithm ID is native:randompointsonlines
2020-07-21 09:07:51 +10:00
Germán Carrillo
debe2209fe Add placeholder to ProcessingConfig (Setting class); use the placeholder for 'results group name' setting 2020-07-20 14:54:50 -05:00
Germán Carrillo
bf6f4c51e4 Load processing results to layer group (optional) 2020-07-20 12:25:06 -05:00
Nyall Dawson
1219f55378 [processing] Fix and improve how in place algorithm parameter widget
handles the input layer by creating a new QgsProcessingHiddenWidgetWrapper
wrapper subclass

Fixes #37424
2020-07-10 04:44:30 +10:00
Nyall Dawson
457a526916 [processing] Fix batch panel uses layer ids when auto populating
output names based on a layer parameter

Fixes #37554
2020-07-05 07:08:37 +10:00
Håvard Tveite
2a786aede2
[feature][processing] Random points in polygons C++ algorithm
Offers the same functionality as the Random points inside polygons
algorithm, and in addition it includes (possible to opt-out) the attributes
from the containing polygon and the ability to specify a seed for the random
number generator.

Could replace the Python algorithm Random points inside polygons, but
this C++ implementation only supports "Points count" ("number of points
for each feature") directly, while "Points density" is supported by allowing the
point count to be data defined (using the polygon area to calculate the
number of points).
2020-07-02 08:25:42 +10:00
Alexander Bruy
9e27f1487c fix menu entry for Split Vector Layer algorithm 2020-06-04 05:36:19 +10:00