44 Commits

Author SHA1 Message Date
ughur-a
0b9bc85378
docs(qgsprocessingcontext): fix typo (#60541)
* docs(qgsprocessingcontext): fix typo

* Update .sip.in files

---------

Co-authored-by: Even Rouault <even.rouault@spatialys.com>
2025-02-11 15:11:38 +01:00
Mathieu Pellerin
f2289c83f1 [processing] Fix feature iteration against a model (fixes #60131) 2025-01-28 12:06:36 +10:00
Nyall Dawson
3a578d6712 Header update 2024-08-13 20:28:55 +10:00
Nyall Dawson
6f652d251b Drop no-value copy constructor dox 2024-07-25 04:02:55 +10:00
Nyall Dawson
28943f9c1b Remove a bunch of useless default constructor doxygen 2024-07-23 02:08:28 +10:00
Nyall Dawson
8cd3c547ee Add API framework for setting initial state of a model algorithm
And allow execution of just a subset of child algorithms from
a model, using the initial state as a starting point

This will allow "resuming" a model, running part of a model using
the state from a previous execution.
2024-05-04 06:30:43 +10:00
Nyall Dawson
de0f5cf87c Make API more future proof 2024-04-21 06:46:35 +10:00
Nyall Dawson
75455dffad Move class to own file 2024-04-21 06:46:35 +10:00
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
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
26798b84f4 Promote QgsFeatureRequest enums to enum class, move to Qgis 2024-01-30 19:10:43 +10:00
Nyall Dawson
56e8206f21 Hold GIL when calling cheap processing methods 2023-12-07 16:21:31 +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
8682a20150 Add layer tree group name and sort key to QgsProcessingContext::LayerDetails 2023-05-03 18:29:28 +10: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
fa22256717 Allow temporary folder location to be overridden through
QgsProcessingContext
2023-03-21 03:50:08 +10:00
Nyall Dawson
f9c3da1e06 Move unit enums to Qgis, promote to enum class 2023-02-19 13:29:06 +10:00
Nyall Dawson
84cf46a629 Add method to copy QgsProcessingContext settings as a json map 2021-12-17 08:29:31 +10:00
Nyall Dawson
4e71e45ae2 Add method to convert QgsProcessingContext settings to equivalent
qgis_process arguments
2021-12-17 08:29:31 +10:00
Nyall Dawson
dcf0cfe5a3 Fix API issues causing malformed python stub files
Fixes #46240
2021-11-29 11:54:06 +10:00
Vincent Cloarec
63ec727003
fix API header references (#42795)
* fix API header reference

* fix SIP
2021-04-15 13:21:45 +02:00
Denis Rouzaud
ba8a445850 run sipify 2021-03-22 21:13:52 +01:00
Nyall Dawson
c6370c7f52
Speed up QGIS compilation by removing all Qt Module-wide includes
Refs https://www.kdab.com/beware-of-qt-module-wide-includes/
2021-03-05 11:23:15 +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
50b9beaad6 [sipify] Catch more class references and insert :py:class: annotations 2021-01-31 05:41:22 +10:00
Vincent Cloarec
1fbba79a0f
Mesh export processes, first part : infrastructure and export vertices (#39664)
[processing] Infrastructure for QgsMeshLayer to add processing algorithms, dataset group paramater and dataset time parameter to allow the user to easily choose a dataset.
2020-11-03 06:05:28 +01:00
Nyall Dawson
b9f1f2ca32 [processing] Fix destination layer name ignored in Load Layer into Project
algorithm

Fixes #38046
2020-07-31 16:03:16 +10:00
Nyall Dawson
03854a41b0 Add explicit settings for ellipsoid, distance and area units to QgsProcessingContext
to avoid having to always retrieve these via the context's project (which may
not be available in some circumstances)

Refs #37988
2020-07-30 08:26:40 +10:00
Nyall Dawson
81a9db9f57 [sipify] Fix creation of cross references 2020-06-15 13:43:58 +10:00
Nyall Dawson
488c8c739a Fix loss of callback when invalid geometry handling method is set through
source definition
2020-03-25 09:42:17 +10:00
Nyall Dawson
6b82917715 [processing] Refine behavior of "Use filename as layer name" option to
always avoid using temporary file names, and then set this option as
enabled by default.

Also change the setting key so that existing users will also get the new
default value.

Fixes #32591
2019-11-09 20:07:55 +10:00
Nyall Dawson
b9e223d802 Add methods to QgsProcessingContext to return the preferred vector and raster formats
These methods return a file extension to use when creating vector/raster outputs (e.g. "tif"). Generally,
it is preferable to use the extension associated with a particular parameter, which can be retrieved through
QgsProcessingDestinationParameter::defaultFileExtension(). However, in some cases, a specific parameter
may not be available to call this method on (e.g. for an algorithm which has only an output folder parameter
and which creates multiple output layers in that folder). In this case, the format returned by this
function should be used when creating these outputs.

It is the algorithm's responsibility to check whether the returned format is acceptable for the algorithm,
and to provide an appropriate fallback when the returned format is not usable.
2019-09-24 16:50:22 +10:00
Denis Rouzaud
631c7016db
scope enum for QgsProcessing::LayerHint (#9639) 2019-03-27 17:23:36 -05:00
Nyall Dawson
107b48a430 Add NULLPTR macro for use in doxygen comments
For the c++ api dox this expands to "\c nullptr" (the
\c directive indicates a code literal value), and for sipify/Python
it expands to ``None`` (`` is sphinx annotation for literal values)

Makes for nicer dox for both c++ and Python!
2019-02-27 09:41:11 +10:00
Nyall Dawson
b6d66becab Sipify 2019-02-27 09:41:11 +10:00
Denis Rouzaud
4b7da692d6 run sipify all 2018-09-10 11:41:57 -04:00
Nyall Dawson
4930061b21 [processing] Fix incorrect OGR warnings when loading raster layer results
Fixes #19597
2018-08-16 06:37:18 +10:00
Denis Rouzaud
65bb60e96c run sipify 2018-05-28 10:39:34 -08:00
Denis Rouzaud
7df2593caf move auto generated sip file in dedicated folder 2018-05-14 10:23:37 -04:00