6345 Commits

Author SHA1 Message Date
Juergen E. Fischer
4fb5e0a11d processing: fix scripts directory reset on windows 2022-04-11 09:50:16 +10:00
Germán Carrillo
94d5eec6d7 Insert processing results at the top of the optional results group (followup #37595) 2022-04-04 09:49:10 +10:00
Nyall Dawson
497e46bc32 Don't try to store child inputs for model executions in history register 2022-03-31 06:32:33 +10:00
Nyall Dawson
b752d56186 Remove some unused methods 2022-03-30 15:41:23 +10:00
Nyall Dawson
dd89f3779a [processing] Always use the same method to launder names
Ultimately avoids forced removal of _ characters in model
parameter names
2022-03-30 15:41:23 +10:00
Germán Carrillo
20dfa3c038 UI: Make sure users cannot enter values that are lower than the minimum value allowed in 'points displacement' algorithm 2022-03-29 06:22:14 +10:00
Nyall Dawson
07ee0bb7e4 Fix some tests on newer GEOS 2022-03-17 18:12:27 +10:00
Nyall Dawson
290154744b [feature][processing] Add "Keep disjoint features separate" option
for dissolve algorithm

If enabled, this option will cause disjoint features and parts to
be exported as separate features (instead of as parts of a
single multipart feature).
2022-03-17 18:12:27 +10:00
Nyall Dawson
092279e90d [feature] Run batch processing steps in tasks
Instead of forcing all steps in the batch processing dialog to execute
in the main thread, we now run each step as a separate task whenever
possible. This keeps the UI nice and responsive, and permits
responsive cancelation and progress reporting.

Individual steps are still run sequentially, not in parallel (yet!)
2022-03-15 11:44:08 +10:00
Nyall Dawson
5dd473d682 Move batch feedback subclass to c++ 2022-03-15 11:44:08 +10:00
webmaster
b420a23acd [processing] Fix erroneous call to secsTo when it should be msecsTo
(fixes #47727)
2022-03-11 10:27:11 +01:00
Germán Carrillo
ec23963359 Add tests for join attributes table with name conflicts (fix for #47650) 2022-03-09 11:07:01 +10:00
Nyall Dawson
385c67aaa7 Revert "processing: fix scripts folder reset on windows"
This reverts commit efea53f51227189275df4067b4fc05bb781e8158.
2022-03-07 08:33:06 +10:00
Juergen E. Fischer
efea53f512 processing: fix scripts folder reset on windows 2022-03-05 19:42:48 +01:00
Nyall Dawson
5df4882380 Fix exception when editing outputs in models 2022-02-28 19:57:15 +10:00
Nyall Dawson
d62d0b82e3 Port model help editor dialog to c++ 2022-02-28 17:33:49 +10:00
Nyall Dawson
fffc3a768b Don't show 'model was correctly saved' notification when saving models
We don't do this elsewhere (e.g. saving QGIS projects), and it makes
it sound like it's suprising that the save worked correctly..!
2022-02-28 17:33:36 +10:00
Nyall Dawson
817895d6d3 [processing] When an input parameter is renamed in the model designer,
also update the internal name of that parameter and all child algorithms
in the model accordingly

Before we just "faked" this by changing the parameter's description
only, but that meant that the old name was permenantly stuck and
had to be used in qgis_process or when calling the model via
python.
2022-02-28 17:33:19 +10:00
Nyall Dawson
ef85926a5d Correctly raise exceptions from XYZ tiles algorithm threads, and fix Python 3.10 compatibility 2022-02-14 16:20:55 +10:00
Alexander Bruy
e21ece09ba
Merge pull request #47205 from agiudiceandrea/fix-47200-gdal-rasterize-extent-optional
[processing] GDAL "Rasterize (vector to raster)" alg: make the 'EXTENT' parameter optional and transform it to the source layer CRS
2022-02-08 08:41:01 +02:00
Andrea Giudiceandrea
5f262509a5 GDAL Rasterize: additional test for extent CRS handling 2022-02-07 09:12:21 +01:00
Nyall Dawson
8f34557037 [processing] When closing a model with unsaved changes, if the user
accepts the prompt to save the changes BUT then cancels the file dialog
asking for the destination file name, don't treat this as though the
user has opted to discard the model
2022-02-07 12:01:07 +10:00
Nyall Dawson
d899da1ed2 [processing] Fix issues with edits to model outputs getting discarded
Specifically, this fixes two issues

1. If a user edits a dark green output block in a model and changes the
name of the output, that new name was always discarded and the only
way to change it was by editing the algorithm it was attached to

2. If an output was renamed through the algorithm properties dialog,
then any properties previously associated with that output (like
comments, coloring, placement, default value, mandatory flag)
would get reset back to their default settings
2022-02-07 10:04:00 +10:00
Andrea Giudiceandrea
ad8237713a GDAL Rasterize: add test for extent CRS handling 2022-02-06 16:51:10 +01:00
Andrea Giudiceandrea
78d764e42a GDAL Rasterize: check earlier for parameter validity 2022-02-06 10:01:00 +01:00
Andrea Giudiceandrea
8e4a6d6e8b [processing] GDAL Rasterize: add extent CRS conversion 2022-02-05 12:49:31 +01:00
Andrea Giudiceandrea
98d5eb686e
[processing] GDAL Rasterize: make extent parameter optional
The corresponding -te parameter in gdal_rasterize is optional (if not specified, it defaults to the extent of the input vector layer)
2022-02-05 11:39:59 +01:00
Nyall Dawson
91ca892c34 Fix translation string 2022-02-05 11:05:51 +10:00
Nyall Dawson
7b9b486096 [processing] When "saving as" a model, if the model name originally
was a complete match for the old file name, then update the model
name for the saved as model to also match the NEW file name

E.g.

Scenario 1
- user has a model stored as "Save features.model3", named "Save
  features"
- user 'saves as' this model as "Delete features.model3"
- the model name is automatically updated to match the new file
name, i.e. "Delete features"

Scenario 2
- user has a model stored as "Save features.model3", named "Process
incoming features from API"
- user 'saves as' this model as "Save features v2.model3"
- the model name is NOT changed, and is left at the original
"Process incoming features from API" name
2022-02-05 11:05:51 +10:00
Nyall Dawson
a169055277 [processing] Improve UX when saving models
- When saving a model to a file, don't require that the model already
has a name entered. Instead, if no model name has been entered then
set the model name automatically to match the selected save filename.
E.g. if the user saves the model as "Process incoming features.model3",
then the model name will be set to "Process incoming features".
- When first saving a model, IF the user HAS already entered a model
name then make the default file name suggested by the dialog match
this model name
2022-02-05 11:05:51 +10:00
Nyall Dawson
e748877a59 [processing] Fix initial directory shown in model open file dialogs
should be the users home file, or the last used model directory
2022-02-04 16:34:53 +10:00
Nyall Dawson
8486afbdd1 [processing] Fix model designer sometimes opens behind other windows 2022-02-04 16:34:53 +10:00
Nyall Dawson
a622004e21 [processing] Fix python exception raised after running in-place
algorithm which requires no parameters
2022-02-02 05:41:45 +10:00
Nyall Dawson
dd368a4289 When processing is initialized in external scripts, ensure the GRASS,
SAGA and OTB providers are included by default

Fixes #45935
2022-02-01 18:14:48 +10:00
Alexander Bruy
9ba642fa49 don't re-add layer to the temporary store 2022-02-01 08:26:43 +10:00
Alexander Bruy
d03ea9cdbc add tests for reloading output of the GDAL rasterize algorithms 2022-02-01 08:26:43 +10:00
Alexander Bruy
efa4e885be [processing] reload output layer after GDAL rasterize (fix #45729) 2022-02-01 08:26:43 +10:00
Mathieu Pellerin
663a70901f Apply suggestions from code review
Co-authored-by: Matthias Kuhn <matthias@opengis.ch>
2022-02-01 05:37:24 +10:00
nirvn
f949adc760 Add spaces to make flake8 happy 2022-02-01 05:37:24 +10:00
nirvn
835fe144cc [processing] Add missing field types to the advanced (i.e. python) field calculator algorithm 2022-02-01 05:37:24 +10:00
Mathieu Pellerin
e1b8abd5cb
Merge pull request #47049 from nirvn/refactor_missing_array_fix
Add missing string,integer,double array field types in the refactor and aggregate algorithms
2022-01-30 18:17:03 +07:00
nirvn
f223ef2112 Address review and tests failure 2022-01-30 16:36:06 +07:00
nirvn
6d4c9e162b Add array_agg test 2022-01-30 14:39:54 +07:00
nirvn
2918c1a2c7 Skip gml_id to work around gdal >= 3.4 changing default GML format 2022-01-30 13:48:04 +07:00
nirvn
e722475a48 [processing] Add missing {string,integer,double} array types in the field mapping widget 2022-01-30 13:48:04 +07:00
nirvn
069ceeb104 [processing] Add a bunch of missing field types to the add field to attributes table algorithm 2022-01-29 11:30:54 +07:00
Nyall Dawson
8ef270b2cc [processing] Remove unused 'preconfigured' provider 2022-01-17 16:12:40 +10:00
Alexander Bruy
1c096ceb52 allow negative values for buffer distance in GDAL buffer algorithm (fix #46667) 2022-01-06 17:53:54 +10:00
nirvn
406520f754 [processing] Add an optional output extent to the gdal raster calculator algorithm 2022-01-02 13:15:43 +07:00
nirvn
17b9bb8a60 [processing] Add the missing optional extent param to the gdal clip raster by mask aglorithm 2021-12-30 11:22:37 +07:00