1432 Commits

Author SHA1 Message Date
Nyall Dawson
578aa207d0 Show warning when loading batch params for algs with security risk
If the algorithm has the security risk flag, warn the user before
they can open stored batch parameter files
2024-10-02 10:36:00 +10:00
Nyall Dawson
0d55518c24 [processing] Fix translation of elapsed strings
Fixes #58635
2024-10-01 20:30:39 +10:00
Nyall Dawson
6c1de7f70a [processing] Replace format for saving batch processing parameters
The older approach of storing parameters was insecure, and required
eval()ing the unchecked contents of the batch parameter file. This
is a security risk, as a malicious file could leak user information
or damage the system.

So,

- Switch to a newer ".batch" format which uses safe JSON objects
only for serializing parameter values.
- Allow loading the older .json files, but first show a warning
that they are a security risk and require to user to explicitly
agree to open the file
2024-10-01 19:35:51 +10:00
Nyall Dawson
95c9bb56b2 Remove unused code 2024-10-01 19:35:51 +10:00
Andrea Giudiceandrea
016a33f43f [processing] Fix warning in postprocessing 2024-09-16 09:31:55 +10:00
Alexander Bruy
7bd8c071f3 port Basic statistics for fields algorithm to C++
Also add new optional output a table containing calculated statistics
similar to the Statistics by categories algorithm (fix #46241)
2024-07-05 05:18:25 +10:00
Alexander Bruy
f0db0f247b address review 2024-07-04 07:30:51 +10:00
Alexander Bruy
40f85dd8e7 allow user to add/remove Processing algorithms to/from Favorites 2024-07-04 07:30:51 +10:00
Nyall Dawson
c685a9aa77 Replace processing default extension setting with string based setting
Change the setting key to force a reset for all users, and move to
a stable string based setting instead of a fragile int index key

Fixes #57676
2024-06-07 18:44:57 +10:00
Even Rouault
07067d37b5 python/plugins: turn on GDAL exceptions to avoid deprecation warning
Fixes #57344
2024-05-22 13:34:35 +10:00
Nyall Dawson
834167018e Add algorithmAboutToRun signal to QgsProcessingAlgorithmDialogBase
This signal can be used to tweak the algorithm's context prior to
the algorithm execution.
2024-05-04 06:30:43 +10:00
Nyall Dawson
fc1922ae43 [processing] When no specific layer group is required for an output,
place it above the current selected layer

Fixes #56129
2024-04-20 08:49:45 +10:00
Nyall Dawson
51378f9827 [processing] Set the active layer to one of the generated outputs
Fixes #57003
2024-04-20 08:49:45 +10:00
Nyall Dawson
f1d762eba7 Update python/plugins/processing/gui/BatchPanel.py
Co-authored-by: Nicolas Godet <39594821+nicogodet@users.noreply.github.com>
2024-02-21 08:11:58 +10:00
Nyall Dawson
ece5d30a0b Ensure correct context is used when determining parameters for row
Fixes #56132
2024-02-21 08:11:58 +10:00
Nyall Dawson
496fd18e55 Add typehints 2024-02-21 08:11:58 +10:00
Nyall Dawson
def984cd4f Cleanup code, only run checks when warnOnInvalid is True
Refs #56132
2024-02-21 08:11:58 +10:00
Nyall Dawson
de0afb14db Don't call QFontMetrics.width() 2024-02-12 14:22:37 +10:00
Nyall Dawson
58695f7c83 Apply suggestions from code review 2024-02-01 17:22:29 +10:00
Alister Hood
05ac633ca9 Don't report that html output has been generated if it hasn't 2024-02-01 17:22:29 +10:00
Nyall Dawson
e42abf7dc5 Update python files 2024-01-22 05:46:15 +10:00
Nyall Dawson
c16a1e2b3d Update enums 2024-01-19 19:44:48 +10:00
Julien Cabieces
9d12ae8e6d [PyQt6] Add scope for enums and get rid of PyQt5.XXX import
this has been done automatically with the following comand line

./scripts/3to4/3to4.py --only-qgis3-compatible-changes ./python/plugins/
./scripts/3to4/3to4.py --only-qgis3-compatible-changes ./tests/src/python/
2024-01-10 21:15:27 +10:00
Nyall Dawson
3c179214fc Use nicely formatted results in processing logs 2024-01-09 17:02:21 +10:00
Blottiere Paul
9df62b90f3 Raise error in case if invalid parameter in batch mode 2023-10-17 15:32:54 +02:00
Alexander Bruy
edaa3dda96 update vector menu links to processing algorithms (fix #54937) 2023-10-16 05:04:34 +10:00
Denis Rouzaud
c76b86e26b
move enum QgsMapLayerProxyModel::Filter to Qgis (#54891) 2023-10-11 13:57:01 +02:00
Juergen E. Fischer
a0c3d67911 Don't install CMakeLists.txt 2023-10-02 11:44:34 +02:00
Alexander Bruy
81dbdd8bae
Merge pull request #53874 from alexbruy/processing-port-align-raster-tool
Port Align rasters tool to Processing
2023-09-14 16:29:49 +03:00
Nicolas Godet
814041b57a Update python/plugins/processing/gui/BatchInputSelectionPanel.py 2023-08-29 09:22:28 +10:00
nicogodet
aadf6dcae9 Add PointCloud layers to "Select from Open Layers…" 2023-08-29 09:22:28 +10:00
Nyall Dawson
440cac298f Promote QgsProcessingModelChildParameterSource source to enum class and move to Qgis
This wasn't marked as stable API, so we don't need any of the usual monkey patching code
2023-08-25 15:44:05 +10:00
Alexander Bruy
051143ff6c drop old align raster tool and add processing algorithm to the Raster
menu
2023-08-23 08:35:14 +03:00
Nyall Dawson
6cdc01b888 Fix exception when running an algorithm which has no parameters
through the toolbox

We were passing a float to a PyQt method requiring int in newer
Python versions, which raises an exception instead of silently
truncating.
2023-07-28 13:35:24 +10:00
Nyall Dawson
e567b35cab Fix crash when trying to re-load a layer from processing results
into the project when that layer already exists in the project

Fixes #53576
Fixes #53729
2023-07-13 15:03:29 +10:00
Alexander Bruy
a84011ecd7 do not raise error in processing algoirthm if map tool previously used
by the canvas was destroyed (fix #53294)
2023-06-08 08:37:17 +10:00
Nyall Dawson
c32bc17973 Defer calling postProcessors until layers have been added to layer tree
It's possible that an algorithm's postProcessor may contain logic
relating to the layer tree, so make sure that all layers have
already been added to the tree before calling postProcessors
2023-05-10 13:17:55 +10:00
Nyall Dawson
a52e0bdd22 Respect layer output ordering when adding processing results layers 2023-05-03 18:29:28 +10:00
Nyall Dawson
70c91eb96b Always expand processing results groups by default 2023-05-03 18:29:28 +10:00
Nyall Dawson
f8ff71031d Minor lint fixes 2023-05-03 18:29:28 +10:00
Nyall Dawson
42e9b916c5 Respect output group name when loading layers 2023-05-03 18:29:28 +10:00
Nyall Dawson
26ce45d6d5 Remove unused argument 2023-05-03 18:29:28 +10:00
Nyall Dawson
2e83566aef More minor cleanups 2023-05-03 18:29:28 +10:00
Nyall Dawson
3651c8dd73 Refactor out some more postprocessing logic 2023-05-03 18:29:28 +10:00
Nyall Dawson
3d166989cb [processing] Cleanup some post-processing code 2023-05-03 18:29:28 +10:00
Alexander Bruy
cbc6922fab try to assign 3d renderer to output point cloud layers 2023-05-02 09:42:43 +03:00
Nyall Dawson
953e3de749 Store full processing execution log in history entries 2023-04-26 16:52:36 +10:00
Etienne Trimaille
3cab3c43a2
Python - Run pyupgrade on the processing plugin 2023-04-24 10:03:57 +02:00
Nyall Dawson
a4d6fd3ed5 Use QgsProcessingHistoryDialog for Processing history dialog
And remove old class
2023-04-24 13:09:46 +10:00
Nyall Dawson
72dd8880a6 Use registry level cache, not local cache for algorithm name/icon handling 2023-04-21 06:12:28 +10:00