File: qgsprocessingutils.sip.in

package info (click to toggle)
qgis 3.40.13%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 1,185,160 kB
  • sloc: cpp: 1,615,781; python: 372,865; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,829; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 155
file content (781 lines) | stat: -rw-r--r-- 26,494 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/processing/qgsprocessingutils.h                             *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/







class QgsProcessingUtils
{
%Docstring(signature="appended")
Utility functions for use with processing classes.
%End

%TypeHeaderCode
#include "qgsprocessingutils.h"
%End
  public:
    static const QMetaObject staticMetaObject;

  public:

    static QList< QgsRasterLayer * > compatibleRasterLayers( QgsProject *project, bool sort = true );
%Docstring
Returns a list of raster layers from a ``project`` which are compatible
with the processing framework.

If the ``sort`` argument is ``True`` then the layers will be sorted by
their :py:func:`QgsMapLayer.name()` value.

.. seealso:: :py:func:`compatibleVectorLayers`

.. seealso:: :py:func:`compatibleMeshLayers`

.. seealso:: :py:func:`compatiblePluginLayers`

.. seealso:: :py:func:`compatiblePointCloudLayers`

.. seealso:: :py:func:`compatibleAnnotationLayers`

.. seealso:: :py:func:`compatibleVectorTileLayers`

.. seealso:: :py:func:`compatibleTiledSceneLayers`

.. seealso:: :py:func:`compatibleLayers`
%End

    static QList< QgsVectorLayer * > compatibleVectorLayers( QgsProject *project,
        const QList< int > &sourceTypes = QList< int >(),
        bool sort = true );
%Docstring
Returns a list of vector layers from a ``project`` which are compatible
with the processing framework.

The ``sourceTypes`` list should be filled with a list of
:py:class:`QgsProcessing`.SourceType values. If the ``sourceTypes`` list
is non-empty then the layers will be sorted so that only layers with the
specified source type included in the list will be returned. Leaving the
``sourceTypes`` list empty will cause all vector layers, regardless of
their geometry type, to be returned.

If the ``sort`` argument is ``True`` then the layers will be sorted by
their :py:func:`QgsMapLayer.name()` value.

.. seealso:: :py:func:`compatibleRasterLayers`

.. seealso:: :py:func:`compatibleMeshLayers`

.. seealso:: :py:func:`compatiblePluginLayers`

.. seealso:: :py:func:`compatiblePointCloudLayers`

.. seealso:: :py:func:`compatibleAnnotationLayers`

.. seealso:: :py:func:`compatibleVectorTileLayers`

.. seealso:: :py:func:`compatibleTiledSceneLayers`

.. seealso:: :py:func:`compatibleLayers`
%End

    static QList<QgsMeshLayer *> compatibleMeshLayers( QgsProject *project, bool sort = true );
%Docstring
Returns a list of mesh layers from a ``project`` which are compatible
with the processing framework.

If the ``sort`` argument is ``True`` then the layers will be sorted by
their :py:func:`QgsMapLayer.name()` value.

.. seealso:: :py:func:`compatibleRasterLayers`

.. seealso:: :py:func:`compatibleVectorLayers`

.. seealso:: :py:func:`compatiblePluginLayers`

.. seealso:: :py:func:`compatiblePointCloudLayers`

.. seealso:: :py:func:`compatibleAnnotationLayers`

.. seealso:: :py:func:`compatibleVectorTileLayers`

.. seealso:: :py:func:`compatibleTiledSceneLayers`

.. seealso:: :py:func:`compatibleLayers`

.. versionadded:: 3.6
%End

    static QList<QgsPluginLayer *> compatiblePluginLayers( QgsProject *project, bool sort = true );
%Docstring
Returns a list of plugin layers from a ``project`` which are compatible
with the processing framework.

If the ``sort`` argument is ``True`` then the layers will be sorted by
their :py:func:`QgsMapLayer.name()` value.

.. seealso:: :py:func:`compatibleRasterLayers`

.. seealso:: :py:func:`compatibleVectorLayers`

.. seealso:: :py:func:`compatibleMeshLayers`

.. seealso:: :py:func:`compatiblePointCloudLayers`

.. seealso:: :py:func:`compatibleAnnotationLayers`

.. seealso:: :py:func:`compatibleVectorTileLayers`

.. seealso:: :py:func:`compatibleTiledSceneLayers`

.. seealso:: :py:func:`compatibleLayers`

.. versionadded:: 3.22
%End

    static QList<QgsPointCloudLayer *> compatiblePointCloudLayers( QgsProject *project, bool sort = true );
%Docstring
Returns a list of point cloud layers from a ``project`` which are
compatible with the processing framework.

If the ``sort`` argument is ``True`` then the layers will be sorted by
their :py:func:`QgsMapLayer.name()` value.

.. seealso:: :py:func:`compatibleRasterLayers`

.. seealso:: :py:func:`compatibleVectorLayers`

.. seealso:: :py:func:`compatibleMeshLayers`

.. seealso:: :py:func:`compatiblePluginLayers`

.. seealso:: :py:func:`compatibleAnnotationLayers`

.. seealso:: :py:func:`compatibleVectorTileLayers`

.. seealso:: :py:func:`compatibleTiledSceneLayers`

.. seealso:: :py:func:`compatibleLayers`

.. versionadded:: 3.22
%End

    static QList<QgsAnnotationLayer *> compatibleAnnotationLayers( QgsProject *project, bool sort = true );
%Docstring
Returns a list of annotation layers from a ``project`` which are
compatible with the processing framework.

If the ``sort`` argument is ``True`` then the layers will be sorted by
their :py:func:`QgsMapLayer.name()` value.

.. seealso:: :py:func:`compatibleRasterLayers`

.. seealso:: :py:func:`compatibleVectorLayers`

.. seealso:: :py:func:`compatibleMeshLayers`

.. seealso:: :py:func:`compatiblePluginLayers`

.. seealso:: :py:func:`compatiblePointCloudLayers`

.. seealso:: :py:func:`compatibleVectorTileLayers`

.. seealso:: :py:func:`compatibleTiledSceneLayers`

.. seealso:: :py:func:`compatibleLayers`

.. versionadded:: 3.22
%End

    static QList<QgsVectorTileLayer *> compatibleVectorTileLayers( QgsProject *project, bool sort = true );
%Docstring
Returns a list of vector tile layers from a ``project`` which are
compatible with the processing framework.

If the ``sort`` argument is ``True`` then the layers will be sorted by
their :py:func:`QgsMapLayer.name()` value.

.. seealso:: :py:func:`compatibleRasterLayers`

.. seealso:: :py:func:`compatibleVectorLayers`

.. seealso:: :py:func:`compatibleMeshLayers`

.. seealso:: :py:func:`compatiblePluginLayers`

.. seealso:: :py:func:`compatiblePointCloudLayers`

.. seealso:: :py:func:`compatibleAnnotationLayers`

.. seealso:: :py:func:`compatibleTiledSceneLayers`

.. seealso:: :py:func:`compatibleLayers`

.. versionadded:: 3.32
%End

    static QList<QgsTiledSceneLayer *> compatibleTiledSceneLayers( QgsProject *project, bool sort = true );
%Docstring
Returns a list of tiled scene layers from a ``project`` which are
compatible with the processing framework.

If the ``sort`` argument is ``True`` then the layers will be sorted by
their :py:func:`QgsMapLayer.name()` value.

.. seealso:: :py:func:`compatibleRasterLayers`

.. seealso:: :py:func:`compatibleVectorLayers`

.. seealso:: :py:func:`compatibleMeshLayers`

.. seealso:: :py:func:`compatiblePluginLayers`

.. seealso:: :py:func:`compatiblePointCloudLayers`

.. seealso:: :py:func:`compatibleAnnotationLayers`

.. seealso:: :py:func:`compatibleVectorTileLayers`

.. seealso:: :py:func:`compatibleLayers`

.. versionadded:: 3.34
%End

    static QList< QgsMapLayer * > compatibleLayers( QgsProject *project, bool sort = true );
%Docstring
Returns a list of map layers from a ``project`` which are compatible
with the processing framework.

If the ``sort`` argument is ``True`` then the layers will be sorted by
their :py:func:`QgsMapLayer.name()` value.

.. seealso:: :py:func:`compatibleRasterLayers`

.. seealso:: :py:func:`compatibleVectorLayers`
%End

    static QString encodeProviderKeyAndUri( const QString &providerKey, const QString &uri );
%Docstring
Encodes a provider key and layer ``uri`` to a single string, for use
with :py:func:`~QgsProcessingUtils.decodeProviderKeyAndUri`

.. versionadded:: 3.14
%End

    static bool decodeProviderKeyAndUri( const QString &string, QString &providerKey /Out/, QString &uri /Out/ );
%Docstring
Decodes a provider key and layer ``uri`` from an encoded string, for use
with :py:func:`~QgsProcessingUtils.encodeProviderKeyAndUri`

:param string: encoded string, as returned by
               :py:func:`~QgsProcessingUtils.encodeProviderKeyAndUri`

:return: - ``True`` if ``string`` was successfully decoded
         - providerKey: ID key for corresponding data provider
         - uri: decoded layer uri

.. versionadded:: 3.14
%End

    enum class LayerHint
    {
      UnknownType,
      Vector,
      Raster,
      Mesh,
      PointCloud,
      Annotation,
      VectorTile,
      TiledScene,
    };

    static QgsMapLayer *mapLayerFromString( const QString &string, QgsProcessingContext &context, bool allowLoadingNewLayers = true, QgsProcessingUtils::LayerHint typeHint = QgsProcessingUtils::LayerHint::UnknownType, QgsProcessing::LayerOptionsFlags flags = QgsProcessing::LayerOptionsFlags() );
%Docstring
Interprets a string as a map layer within the supplied ``context``.

The method will attempt to load a layer matching the passed ``string``.
E.g. if the string matches a layer ID or name within the context's
project or temporary layer store then this layer will be returned. If
the string is a file path and ``allowLoadingNewLayers`` is ``True``,
then the layer at this file path will be loaded and added to the
context's temporary layer store. Ownership of the layer remains with the
``context`` or the context's current project.

The ``typeHint`` can be used to dictate the type of map layer expected.
%End

    static QgsProcessingFeatureSource *variantToSource( const QVariant &value, QgsProcessingContext &context, const QVariant &fallbackValue = QVariant() ) /Factory/;
%Docstring
Converts a variant ``value`` to a new feature source.

Sources will either be taken from ``context``'s active project, or
loaded from external sources and stored temporarily in the ``context``.

The optional ``fallbackValue`` can be used to specify a "default" value
which is used if ``value`` cannot be successfully converted to a source.

This function creates a new object and the caller takes responsibility
for deleting the returned object.
%End

    static QgsCoordinateReferenceSystem variantToCrs( const QVariant &value, QgsProcessingContext &context, const QVariant &fallbackValue = QVariant() );
%Docstring
Converts a variant ``value`` to a coordinate reference system.

The optional ``fallbackValue`` can be used to specify a "default" value
which is used if ``value`` cannot be successfully converted to a CRS.

.. versionadded:: 3.12
%End

    static QString normalizeLayerSource( const QString &source ) /HoldGIL/;
%Docstring
Normalizes a layer ``source`` string for safe comparison across
different operating system environments.
%End

    static QString layerToStringIdentifier( const QgsMapLayer *layer, const QString &layerName = QString() ) /HoldGIL/;
%Docstring
Returns a string representation of the source for a ``layer``. The
returned value is suitable for storage for subsequent executions of an
algorithm using the same layer source.

.. versionadded:: 3.34
%End

    static QString variantToPythonLiteral( const QVariant &value );
%Docstring
Converts a variant to a Python literal.

.. seealso:: :py:func:`stringToPythonLiteral`

.. versionadded:: 3.6
%End

    static QString stringToPythonLiteral( const QString &string ) /HoldGIL/;
%Docstring
Converts a string to a Python string literal. E.g. by replacing ' with
\'.

.. seealso:: :py:func:`variantToPythonLiteral`
%End


    static void createFeatureSinkPython( QgsFeatureSink **sink /Out,TransferBack/, QString &destination /In,Out/, QgsProcessingContext &context, const QgsFields &fields, Qgis::WkbType geometryType, const QgsCoordinateReferenceSystem &crs, const QVariantMap &createOptions = QVariantMap() ) throw( QgsProcessingException ) /PyName=createFeatureSink/;
%Docstring
Creates a feature sink ready for adding features. The ``destination``
specifies a destination URI for the resultant layer. It may be updated
in place to reflect the actual destination for the layer.

Sink parameters such as desired ``fields``, ``geometryType`` and ``crs``
must be specified.

The ``createOptions`` map can be used to specify additional sink
creation options, which are passed to the underlying provider when
creating new layers. Known options also include 'fileEncoding', which is
used to specify a file encoding to use for created files. If
'fileEncoding' is not specified, the default encoding from the
``context`` will be used.

If a layer is created for the feature sink, the layer will automatically
be added to the ``context``'s temporary layer store.

.. note::

   this version of the :py:func:`~QgsProcessingUtils.createFeatureSink` function has an API designed around use from the
   SIP bindings. c++ code should call the other :py:func:`~QgsProcessingUtils.createFeatureSink` version.


%End


    static QgsRectangle combineLayerExtents( const QList<QgsMapLayer *> &layers, const QgsCoordinateReferenceSystem &crs, QgsProcessingContext &context );
%Docstring
Combines the extent of several map ``layers``. If specified, the target
``crs`` will be used to transform the layer's extent to the desired
output reference system using the specified ``context``.

.. versionadded:: 3.8
%End

 static QgsRectangle combineLayerExtents( const QList<QgsMapLayer *> &layers, const QgsCoordinateReferenceSystem &crs = QgsCoordinateReferenceSystem() ) /Deprecated/;
%Docstring
Combines the extent of several map ``layers``. If specified, the target
``crs`` will be used to transform the layer's extent to the desired
output reference system.

.. deprecated:: 3.40

   Use version with :py:class:`QgsProcessingContext` argument instead.
%End

    static QVariant generateIteratingDestination( const QVariant &input, const QVariant &id, QgsProcessingContext &context );
%Docstring
Converts an ``input`` parameter value for use in source iterating mode,
where one individual sink is created per input feature. The ``id``
parameter represents the unique ID for this output, which is embedded
into the resulting parameter value.
%End

    static QString tempFolder( const QgsProcessingContext *context = 0 );
%Docstring
Returns a session specific processing temporary folder for use in
processing algorithms.

.. seealso:: :py:func:`generateTempFilename`
%End

    static QString generateTempFilename( const QString &basename, const QgsProcessingContext *context = 0 );
%Docstring
Returns a temporary filename for a given file, putting it into a
temporary folder (creating that folder in the process), but not changing
the ``basename``.

.. seealso:: :py:func:`tempFolder`
%End

    static QString formatHelpMapAsHtml( const QVariantMap &map, const QgsProcessingAlgorithm *algorithm );
%Docstring
Returns a HTML formatted version of the help text encoded in a variant
``map`` for a specified ``algorithm``.
%End

    static QString convertToCompatibleFormat( const QgsVectorLayer *layer,
        bool selectedFeaturesOnly,
        const QString &baseName,
        const QStringList &compatibleFormats,
        const QString &preferredFormat,
        QgsProcessingContext &context,
        QgsProcessingFeedback *feedback,
        long long featureLimit = -1,
        const QString &filterExpression = QString() );
%Docstring
Converts a source vector ``layer`` to a file path of a vector layer of
compatible format.

If the specified ``layer`` is not of the format listed in the
``compatibleFormats`` argument, then the layer will first be exported to
a compatible format in a temporary location using ``baseName``. The
function will then return the path to that temporary file.

``compatibleFormats`` should consist entirely of lowercase file
extensions, e.g. 'shp'.

The ``preferredFormat`` argument is used to specify to desired file
extension to use when a temporary layer export is required. This
defaults to shapefiles.

The ``featureLimit`` argument can be used to specify a limit on the
number of features read from the layer.

Since QGIS 3.32, the optional ``filterExpression`` argument can be used
to specify a expression to use to filter the features read from the
layer.

When an algorithm is capable of handling multi-layer input files (such
as Geopackage), it is preferable to use
:py:func:`~QgsProcessingUtils.convertToCompatibleFormatAndLayerName`
which may avoid conversion in more situations.

.. seealso:: :py:func:`convertToCompatibleFormatAndLayerName`
%End

    static QString convertToCompatibleFormatAndLayerName( const QgsVectorLayer *layer,
        bool selectedFeaturesOnly,
        const QString &baseName,
        const QStringList &compatibleFormats,
        const QString &preferredFormat,
        QgsProcessingContext &context,
        QgsProcessingFeedback *feedback,
        QString &layerName /Out/,
        long long featureLimit = -1,
        const QString &filterExpression = QString() );
%Docstring
Converts a source vector ``layer`` to a file path and layer name of a
vector layer of compatible format.

If the specified ``layer`` is not of the format listed in the
``compatibleFormats`` argument, then the layer will first be exported to
a compatible format in a temporary location using ``baseName``. The
function will then return the path to that temporary file.

``compatibleFormats`` should consist entirely of lowercase file
extensions, e.g. 'shp'.

The ``featureLimit`` argument can be used to specify a limit on the
number of features read from the layer.

The ``preferredFormat`` argument is used to specify to desired file
extension to use when a temporary layer export is required. This
defaults to shapefiles.

This method should be preferred over
:py:func:`~QgsProcessingUtils.convertToCompatibleFormat` when an
algorithm is able to correctly handle files with multiple layers. Unlike
:py:func:`~QgsProcessingUtils.convertToCompatibleFormat`, it will not
force a conversion in this case and will return the target layer name in
the ``layerName`` argument.

:param layer: source layer to convert (if required)
:param selectedFeaturesOnly: ``True`` if only selected features from the
                             layer should be used
:param baseName: base file name for converted layer, if required
:param compatibleFormats: a list of lowercase file extensions compatible
                          with the algorithm
:param preferredFormat: preferred format extension to use if conversion
                        if required
:param context: processing context
:param feedback: feedback object
:param featureLimit: can be used to place a limit on the maximum number
                     of features read from the layer
:param filterExpression: optional expression for filtering features read
                         from the layer (since QGIS 3.32)

:return: - path to source layer, or nearly converted compatible layer
         - layerName: the target layer name for multi-layer sources
           (e.g. Geopackage)

.. seealso:: :py:func:`convertToCompatibleFormat`

.. versionadded:: 3.10
%End

    static QgsFields combineFields( const QgsFields &fieldsA, const QgsFields &fieldsB, const QString &fieldsBPrefix = QString() ) /HoldGIL/;
%Docstring
Combines two field lists, avoiding duplicate field names (in a
case-insensitive manner).

Duplicate field names will be altered to "name_2", "name_3", etc,
finding the first non-duplicate name.

.. note::

   Some output file formats (e.g. shapefiles) have restrictions on the maximum
   length of field names, so be aware that the results of calling this method may
   be truncated when saving to these formats.
%End

    static QList<int> fieldNamesToIndices( const QStringList &fieldNames, const QgsFields &fields ) /HoldGIL/;
%Docstring
Returns a list of field indices parsed from the given list of field
names. Unknown field names are ignored. If the list of field names is
empty, it is assumed that all fields are required.

.. versionadded:: 3.2
%End

    static QgsFields indicesToFields( const QList<int> &indices, const QgsFields &fields ) /HoldGIL/;
%Docstring
Returns a subset of fields based on the indices of desired fields.

.. versionadded:: 3.2
%End

    static QString defaultVectorExtension();
%Docstring
Returns the default vector extension to use, in the absence of all other
constraints (e.g. provider based support for extensions).

This method returns the user-set default extension from the processing
settings, or a fallback value of "gpkg".

.. seealso:: :py:func:`defaultRasterExtension`

.. seealso:: :py:func:`defaultPointCloudExtension`

.. seealso:: :py:func:`defaultVectorTileExtension`

.. versionadded:: 3.10
%End

    static QString defaultRasterExtension();
%Docstring
Returns the default raster extension to use, in the absence of all other
constraints (e.g. provider based support for extensions).

This method returns the user-set default extension from the processing
settings, or a fallback value of "tif".

.. seealso:: :py:func:`defaultVectorExtension`

.. seealso:: :py:func:`defaultPointCloudExtension`

.. seealso:: :py:func:`defaultVectorTileExtension`

.. versionadded:: 3.10
%End

    static QString defaultPointCloudExtension();
%Docstring
Returns the default point cloud extension to use, in the absence of all
other constraints (e.g. provider based support for extensions).

This method returns a fallback value of "las".

.. seealso:: :py:func:`defaultVectorExtension`

.. seealso:: :py:func:`defaultRasterExtension`

.. seealso:: :py:func:`defaultVectorTileExtension`

.. versionadded:: 3.24
%End

    static QString defaultVectorTileExtension();
%Docstring
Returns the default vector tile extension to use, in the absence of all
other constraints (e.g. provider based support for extensions).

This method returns a fallback value of "mbtiles".

.. seealso:: :py:func:`defaultVectorExtension`

.. seealso:: :py:func:`defaultRasterExtension`

.. seealso:: :py:func:`defaultPointCloudExtension`

.. versionadded:: 3.32
%End

    static QVariantMap removePointerValuesFromMap( const QVariantMap &map );
%Docstring
Removes any raw pointer values from an input ``map``, replacing them
with appropriate string values where possible.

.. versionadded:: 3.26
%End

    static QVariantMap preprocessQgisProcessParameters( const QVariantMap &parameters, bool &ok, QString &error );
%Docstring
Pre-processes a set of ``parameter`` values for the qgis_process
command.

In particular, this function upgrades encoded data defined values to
:py:class:`QgsProperty` objects.

.. versionadded:: 3.30
%End

    static QString resolveDefaultEncoding( const QString &defaultEncoding = "System" );
%Docstring
Returns the default encoding.

The default encoding could be the one from "/Processing/encoding" or
when it's not an allowed encoding name like "System", the default
encoding system (mostly UTF-8 on Unix-like, windows-1252 on Windows).

.. versionadded:: 3.32
%End

};

class QgsProcessingFeatureSource : QgsFeatureSource
{
%Docstring(signature="appended")
:py:class:`QgsFeatureSource` subclass which proxies methods to an
underlying :py:class:`QgsFeatureSource`, modifying results according to
the settings in a :py:class:`QgsProcessingContext`.
%End

%TypeHeaderCode
#include "qgsprocessingutils.h"
%End
  public:

    QgsProcessingFeatureSource( QgsFeatureSource *originalSource, const QgsProcessingContext &context, bool ownsOriginalSource = false,
                                long long featureLimit = -1, const QString &filterExpression = QString() );
%Docstring
Constructor for QgsProcessingFeatureSource, accepting an original
feature source ``originalSource`` and processing ``context``. Ownership
of ``originalSource`` is dictated by ``ownsOriginalSource``. If
``ownsOriginalSource`` is ``False``, ownership is not transferred, and
callers must ensure that ``originalSource`` exists for the lifetime of
this object. If ``ownsOriginalSource`` is ``True``, then this object
will take ownership of ``originalSource``.

If ``featureLimit`` is set to a value > 0, then a limit is placed on the
maximum number of features which will be read from the source.

Since QGIS 3.32, the optional ``filterExpression`` can be used to
specify an expression based filter for the source.
%End

    ~QgsProcessingFeatureSource();

    QgsFeatureIterator getFeatures( const QgsFeatureRequest &request, Qgis::ProcessingFeatureSourceFlags flags ) const;
%Docstring
Returns an iterator for the features in the source, respecting the
supplied feature ``flags``. An optional ``request`` can be used to
optimise the returned iterator, eg by restricting the returned
attributes or geometry.
%End

    virtual Qgis::FeatureAvailability hasFeatures() const;


    virtual QgsFeatureIterator getFeatures( const QgsFeatureRequest &request = QgsFeatureRequest() ) const;

    virtual QgsCoordinateReferenceSystem sourceCrs() const;

    virtual QgsFields fields() const;

    virtual Qgis::WkbType wkbType() const;

    virtual long long featureCount() const;

    virtual QString sourceName() const;

    virtual QSet<QVariant> uniqueValues( int fieldIndex, int limit = -1 ) const;

    virtual QVariant minimumValue( int fieldIndex ) const;

    virtual QVariant maximumValue( int fieldIndex ) const;

    virtual QgsRectangle sourceExtent() const;

    virtual QgsFeatureIds allFeatureIds() const;

    virtual Qgis::SpatialIndexPresence hasSpatialIndex() const;


    QgsExpressionContextScope *createExpressionContextScope() const /Factory/;
%Docstring
Returns an expression context scope suitable for this source.
%End

    void setInvalidGeometryCheck( Qgis::InvalidGeometryCheck method );
%Docstring
Overrides the default geometry check method for the source.

.. seealso:: :py:func:`invalidGeometryCheck`

.. versionadded:: 3.14
%End

    Qgis::InvalidGeometryCheck invalidGeometryCheck() const;
%Docstring
Returns the geometry check method for the source.

.. seealso:: :py:func:`setInvalidGeometryCheck`

.. versionadded:: 3.36
%End

};




/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/processing/qgsprocessingutils.h                             *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/