318 Commits

Author SHA1 Message Date
Nyall Dawson
d4369f714d Make log of each separate child algorithm available for retrieval after
running model
2024-04-21 06:46:35 +10:00
Nyall Dawson
172a1c2b03 Make execution status available for child algorithms 2024-04-21 06:46:35 +10:00
Nyall Dawson
8302259463 Make child results handling API more flexible 2024-04-21 06:46:35 +10:00
Nyall Dawson
5ebbb3da46 Make child results and inputs always available for models
Even when the model execution fails, store the child inputs and
results for all steps which successfully completed in the context.

This gives more debugging information to a user when a model fails,
because these values will now be reflected in the model designer
view for all steps which completed.
2024-04-21 06:46:35 +10:00
Nyall Dawson
7f4fe65bee Ensure that QgsProcessingAlgorithm::postProcess is always called
We now always call QgsProcessingAlgorithm::postProcess, even when
the algorithm fails for some reason (eg it raises an exception).
This ensures that the context cleanup logic in postProcess is
always run. Note that we still ONLY call an algorithm's specific
postProcessAlgorithm implementation for successful executions,
so the public facing API and behavior remains unchanged.

This is intented to provide a consistent handling of the cleanup
logic in postProcess, specifically to make sure that that the
context thread handling logic is triggered in all cases.
2024-04-21 06:46:35 +10:00
Even Rouault
15ea5c46bc
Header files: remove all mentions of '\since QGIS 3.0' 2024-02-18 20:57:23 +01:00
Nyall Dawson
ee53b9ae48 Port processing enums to enum class
A step towards a Qt6 compatible Processing framework
2024-02-10 17:25:22 +10:00
Nyall Dawson
4ba4eae72a [processing] Rename grass7 provider to grass provider
And transparently map requests for grass7 provider to grass provider

It's misleading putting an old version number in the provider name,
when this provider supports grass versions 8 +
2024-02-06 18:31:48 +10:00
Nyall Dawson
c3fa3af175 [processing] Use safer provider://source syntax in more places
Use the safer method of explicitly including the provider type
when storing layer sources to string in more places, which eg
fixes running the copied qgis_process string when a non gdal
layer source is used for a raster layer. Also fixes the same
situation when restoring an algorithm from the history log.

Fixes #54264
2024-02-05 17:39:46 +10:00
Nyall Dawson
503a95a1a1 Move enums to Qgis namespace for consistency 2024-02-02 04:59:04 +10:00
Alessandro Pasotti
27824078ad Introduce QgsProcessingProvider::Flag::FlagCompatibleWithVirtualRaster 2024-01-31 10:37:52 +10:00
Nyall Dawson
6116319806 Move a processing enum to enum class in Qgis 2024-01-30 19:10:43 +10:00
Nyall Dawson
a36b203f30 Promote some processing enums to enum class, cleanups 2024-01-30 19:10:43 +10:00
Nyall Dawson
26798b84f4 Promote QgsFeatureRequest enums to enum class, move to Qgis 2024-01-30 19:10:43 +10:00
Nyall Dawson
3c179214fc Use nicely formatted results in processing logs 2024-01-09 17:02:21 +10:00
Nyall Dawson
3e10cf9338 Add method to get HTML formatted versions of output values for
processing outputs
2024-01-09 17:02:21 +10:00
Nyall Dawson
b674a7c35d Add method to format processing output values as strings 2024-01-09 17:02:21 +10:00
Nyall Dawson
3e7d376953 Add method to push formatted text to Processing feedback
Provides a method for algorithms to push HTML contents to the log
(the other feedback methods all escape HTML strings to strip
formatting characters)
2024-01-09 17:02:21 +10:00
Nyall Dawson
56e8206f21 Hold GIL when calling cheap processing methods 2023-12-07 16:21:31 +10:00
Nyall Dawson
f16bbfea79 Check validity of coverages before running coverage tools, unless
geometry validation is disabled
2023-11-02 22:03:20 +10:00
Alexander Bruy
f22efde645 add binary and boolean types to QgsFieldProxyModel to allow filtering
corresponding field types. Also expose these field types to Processing
field parameter (fix #53940)
2023-09-22 09:40:28 +10: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
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
Alexander Bruy
7d6361e37f missed file 2023-08-23 08:35:14 +03: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