295 Commits

Author SHA1 Message Date
Marco Hugentobler
8f8cfa949c Added since QGIS 3.34 in comment 2023-09-12 11:35:23 +10:00
Marco Hugentobler
3fbfba3715 Possibility to apply default values for the processing gui from the settings 2023-09-12 11:35:23 +10:00
Nyall Dawson
2346f75366 Correctly calculate model child dependencies when a model step
uses expressions for parameter values and contains variables
generated by another step in the model

We were showing links for these in the model designer so it
appeared as though the dependencies were there, but at actual
execution time there was nothing forcing the child which generated
the variable to be run before the child using the variable.
2023-08-26 05:06:40 +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
Nyall Dawson
3707702af4 Add a processing output type for variant values
Should be used when the output is a flexible type and may represent
any QVariant value.
2023-08-25 15:44:05 +10:00
Nyall Dawson
8df81beff0 Add a new processing log level for debugging models
At model debug log level we'll show all the generic
logs for step preparation, inputs and outputs for every
child algorithm, including those which we normally skip
(eg raise warnings/outputs, string concatenation, etc).
This gives model designers more useful information to
debug their models.

Use this new log level when running models through the
model designer window.
2023-08-25 15:02:52 +10:00
Nyall Dawson
9f57fb2ef0 Rename "tiled mesh" to "tiled scene"
Better reflects that these types can contain lines and point
data, not just meshes
2023-08-05 21:31:49 +10:00
Alexandre Neto
6f1d39a7f3 update sip 2023-08-05 10:48:51 +10:00
Alexandre Neto
1c30d618aa Try to clean all traces of the Graphical modeler and replace by Model Designer 2023-08-05 10:48:51 +10:00
Loïc Bartoletti
e5ea4d2291 resolveDefaultEncoding: return UTF-8 as default in case of undefined locale or error 2023-07-05 06:06:10 +10:00
Loïc Bartoletti
09ac50fd36 move logic to QgsProcessingUtils and create a convenient method resolveDefaultEncoding() 2023-07-05 06:06:10 +10:00
Nyall Dawson
1e1535d63d Handle tiled mesh layers in more code paths 2023-06-28 17:47:17 +10:00
Alexander Bruy
a1013f87c6 [processing] add vector tile destination parameter 2023-05-18 07:09:16 +10:00
Alexander Bruy
daa8d5ca15 [processing] allow selecting vector tile layers in map layer and
multiple layers parameters
2023-05-18 07:09:16 +10:00
Nyall Dawson
f27195c165 [processing] Allow configuration of order of outputs created by a model
This adds a new "Reorder Model Outputs" action to the model designer
menu (to accompany the existing "Reorder Model Inputs" action).
Selecting this option allows model creators to set a specific order
which the outputs from their model must use when loading the results
into a project. This gives the model creator a means of ensuring
that layers are logically ordered, eg placing a vector layer over
a raster layer and a point layer over a polygon layer.

Optionally, the model creator can also set a "Group name" for the
outputs. If this is specified then all outputs from the model will
be placed into a (newly created if necessary) layer tree group
with that name.

Sponsored by the QGIS Germany User Group
2023-05-10 13:17:55 +10:00
Nyall Dawson
8682a20150 Add layer tree group name and sort key to QgsProcessingContext::LayerDetails 2023-05-03 18:29:28 +10:00
Alexander Bruy
10b02e02ed move expression type enum to qgis.h 2023-05-02 14:00:43 +02:00
Alexander Bruy
d93111ccec [processing] add enum to expression parameter to make it possible
distinguish between native QGIS expressions and point cloud filter
expressions
2023-05-02 14:00:43 +02:00
Alexander Bruy
1c1e46029a address review 2023-04-25 05:41:04 +10:00
Alexander Bruy
0f2d2bc360 allow changing number of threads through the algorithm settings panel 2023-04-25 05:41:04 +10:00
Nyall Dawson
d9d41ad9ef Doc 2023-04-21 06:12:28 +10:00
Nyall Dawson
70f2adb28c [processing][api] Add mechanism to get basic algorithm properties
efficiently for many calls

Allows retrieval of some basic algorithm properties (display name,
icon) in an optimised way for many calls. (Avoiding multiple
expensive algorithmById lookups)
2023-04-21 06:12:28 +10:00
Alexander Bruy
c5947e4e51 add SIP_DEPRECATED 2023-04-10 11:57:39 +03:00
Alexander Bruy
89ddbc3863 fix typos, add Q_DECL_DEPRECATED 2023-04-07 14:00:05 +03:00
Alexander Bruy
1f77406f2d [processing] new parameter type for point cloud attributes 2023-04-03 19:47:45 +03:00
Nyall Dawson
50c76929e1
Followup 30700f1, ensure links to Qgis members are set in docstrings 2023-03-31 10:46:24 +10:00
Alexey Karandashev
30700f1ef1 Fix GeometryType in documentation:
QgsWkbTypes::GeometryType to Qgis::GeometryType
and QgsWkbTypes::<geometry>Geometry to Qgis::GeometryType::<geometry>
2023-03-31 10:28:36 +10:00
Alexander Bruy
3104c10ad3 do not index input point cloud layers in pdal algorithms 2023-03-30 09:38:39 +02:00
Alexander Bruy
0325cf0c30 [processing] add layer options flag enum
This enum can be used in the QgsProcessingUtils::mapLayerFromString()
and parameterAsPointCloudLayer() calls to control layer loading, e.g.
skipping index generation or not applying default style, etc.
2023-03-29 06:06:09 +10:00
Alexander Bruy
26e8b56abf add information algorithm 2023-03-22 16:04:01 +01:00
Nyall Dawson
fa22256717 Allow temporary folder location to be overridden through
QgsProcessingContext
2023-03-21 03:50:08 +10:00
Nyall Dawson
30598b9ad9 Pass QgsProcessingContext on to all processing functions which
generate temporary file names
2023-03-21 03:50:08 +10:00
Nyall Dawson
3c1e4fe723 [processing] Allow filter expressions to be set for vector sources
This change adds a new "feature filter" option alongside the
existing feature limit and invalid geometry handling options
available for all vector inputs to processing layers.

It allows users to enter an expression to subset the layer dynamically
when running the tool, avoiding the need for separate steps to
set layer filters or create layer subsets.

Sponsored by City of Canning
2023-03-08 16:58:34 +10:00
Nyall Dawson
046883fa9c Promote QgsWkbTypes enums to enum class, move to Qgis 2023-02-22 12:39:21 +10:00
Nyall Dawson
f9c3da1e06 Move unit enums to Qgis, promote to enum class 2023-02-19 13:29:06 +10:00
Nyall Dawson
7b29e796ff [processing] Add json syntax option for encoding data defined parameter
values

Refs #50482
2023-01-16 19:07:48 +10:00
Nyall Dawson
6f072cfba9 Never try to handle base parameter type values as map layers
in QgsProcessingParameterDefinition::valueAs* methods

Avoids misleading log messages and a crash on macos

Fixes #48598
2022-09-26 16:39:56 +10:00
vcloarec
f898dcd0eb SIP, typo, cleaning and more tests 2022-06-09 01:55:48 -04:00
Nyall Dawson
6ed55658af [processing] Fix crash after running model from history dialog
Ensure we don't store any map layer pointer values for long-term
use, and instead transform them to appropriate string values instead

Fixes #40258
2022-05-23 18:29:39 +10:00
Julien Cabieces
012b6a46db constify methods 2022-04-29 08:21:47 +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
Nyall Dawson
1e445e3c6f Use flags, not boolean 2022-03-15 11:44:08 +10:00
Nyall Dawson
d9cd3e2d97 Allow tasks to be hidden from the GUI 2022-03-15 11:44:08 +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
Nyall Dawson
9b427c665f Remove constraint disabling threading for all models 2022-03-14 08:28:24 +10:00
Nyall Dawson
5df4882380 Fix exception when editing outputs in models 2022-02-28 19:57:15 +10:00
Nyall Dawson
1d97b4548a Add internal version handling for model algorithms
Allows us to change behaviour of model algorithms (e.g. output names)
for newly created models only, without risk of breaking existing
scripts
2022-02-28 19:57:15 +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
29a59e70bf Add method to test whether model file name matches model name 2022-02-05 11:05:51 +10:00