QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
qgsprocessingalgorithm.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsprocessingalgorithm.h
3  ------------------------
4  begin : December 2016
5  copyright : (C) 2016 by Nyall Dawson
6  email : nyall dot dawson at gmail dot com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSPROCESSINGALGORITHM_H
19 #define QGSPROCESSINGALGORITHM_H
20 
21 #include "qgis_core.h"
22 #include "qgis.h"
24 #include "qgsprocessingoutputs.h"
25 #include "qgsprocessingcontext.h"
26 #include "qgsfeaturesource.h"
27 #include "qgsprocessingutils.h"
28 #include <QString>
29 #include <QVariant>
30 #include <QIcon>
31 
34 class QgsFeatureSink;
35 class QgsProcessingModelAlgorithm;
37 class QgsMeshLayer;
38 
39 #ifdef SIP_RUN
40 % ModuleHeaderCode
41 #include <qgsprocessingmodelalgorithm.h>
42 % End
43 #endif
44 
51 class CORE_EXPORT QgsProcessingAlgorithm
52 {
53 
54 #ifdef SIP_RUN
56  if ( dynamic_cast< QgsProcessingModelAlgorithm * >( sipCpp ) != NULL )
57  sipType = sipType_QgsProcessingModelAlgorithm;
58  else if ( dynamic_cast< QgsProcessingFeatureBasedAlgorithm * >( sipCpp ) != NULL )
59  sipType = sipType_QgsProcessingFeatureBasedAlgorithm;
60  else
61  sipType = sipType_QgsProcessingAlgorithm;
62  SIP_END
63 #endif
64 
65  public:
66 
68  enum Flag
69  {
70  FlagHideFromToolbox = 1 << 1,
71  FlagHideFromModeler = 1 << 2,
72  FlagSupportsBatch = 1 << 3,
73  FlagCanCancel = 1 << 4,
74  FlagRequiresMatchingCrs = 1 << 5,
75  FlagNoThreading = 1 << 6,
76  FlagDisplayNameIsLiteral = 1 << 7,
77  FlagSupportsInPlaceEdits = 1 << 8,
78  FlagKnownIssues = 1 << 9,
79  FlagCustomException = 1 << 10,
80  FlagPruneModelBranchesBasedOnAlgorithmResults = 1 << 11,
81  FlagSkipGenericModelLogging = 1 << 12,
82  FlagNotAvailableInStandaloneTool = 1 << 13,
83  FlagRequiresProject = 1 << 14,
84  FlagDeprecated = FlagHideFromToolbox | FlagHideFromModeler,
85  };
86  Q_DECLARE_FLAGS( Flags, Flag )
87 
88 
96 
97  virtual ~QgsProcessingAlgorithm();
98 
102  QgsProcessingAlgorithm &operator=( const QgsProcessingAlgorithm &other ) = delete;
103 
104  /*
105  * IMPORTANT: While it seems like /Factory/ would be the correct annotation here, that's not
106  * the case.
107  * As per Phil Thomson's advice on https://www.riverbankcomputing.com/pipermail/pyqt/2017-July/039450.html:
108  *
109  * "
110  * /Factory/ is used when the instance returned is guaranteed to be new to Python.
111  * In this case it isn't because it has already been seen when being returned by createInstance()
112  * (However for a different sub-class implemented in C++ then it would be the first time it was seen
113  * by Python so the /Factory/ on create() would be correct.)
114  *
115  * You might try using /TransferBack/ on create() instead - that might be the best compromise.
116  * "
117  */
118 
136  QgsProcessingAlgorithm *create( const QVariantMap &configuration = QVariantMap() ) const SIP_THROW( QgsProcessingException ) SIP_TRANSFERBACK;
137 
147  virtual QString name() const = 0;
148 
155  QString id() const;
156 
167  virtual QString displayName() const = 0;
168 
174  virtual QString shortDescription() const;
175 
180  virtual QStringList tags() const { return QStringList(); }
181 
188  virtual QString shortHelpString() const;
189 
197  Q_DECL_DEPRECATED virtual QString helpString() const SIP_DEPRECATED;
198 
204  virtual QString helpUrl() const;
205 
210  virtual QIcon icon() const;
211 
216  virtual QString svgIconPath() const;
217 
224  virtual QString group() const { return QString(); }
225 
233  virtual QString groupId() const { return QString(); }
234 
239  virtual Flags flags() const;
240 
247  virtual bool canExecute( QString *errorMessage SIP_OUT = nullptr ) const;
248 
256  virtual bool checkParameterValues( const QVariantMap &parameters,
257  QgsProcessingContext &context, QString *message SIP_OUT = nullptr ) const;
258 
266  virtual QVariantMap preprocessParameters( const QVariantMap &parameters );
267 
271  QgsProcessingProvider *provider() const;
272 
280 
286  const QgsProcessingParameterDefinition *parameterDefinition( const QString &name ) const;
287 
292  int countVisibleParameters() const;
293 
299  QgsProcessingParameterDefinitions destinationParameterDefinitions() const;
300 
307 
313  const QgsProcessingOutputDefinition *outputDefinition( const QString &name ) const;
314 
318  bool hasHtmlOutputs() const;
319 
325  {
328  };
329 
336  {
339 
342 
345 
348  };
349 
365  virtual QgsProcessingAlgorithm::VectorProperties sinkProperties( const QString &sink,
366  const QVariantMap &parameters,
367  QgsProcessingContext &context,
368  const QMap< QString, QgsProcessingAlgorithm::VectorProperties > &sourceProperties ) const;
369 
390  QVariantMap run( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback, bool *ok SIP_OUT = nullptr, const QVariantMap &configuration = QVariantMap(),
391  bool catchExceptions = true ) const SIP_THROW( QgsProcessingException );
392 
403  bool prepare( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback );
404 
416  QVariantMap runPrepared( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) SIP_THROW( QgsProcessingException );
417 
426  QVariantMap postProcess( QgsProcessingContext &context, QgsProcessingFeedback *feedback );
427 
434  virtual QWidget *createCustomParametersWidget( QWidget *parent = nullptr ) const SIP_FACTORY;
435 
442  virtual QgsExpressionContext createExpressionContext( const QVariantMap &parameters,
443  QgsProcessingContext &context, QgsProcessingFeatureSource *source = nullptr ) const;
444 
451  virtual bool validateInputCrs( const QVariantMap &parameters,
452  QgsProcessingContext &context ) const;
453 
461  virtual QString asPythonCommand( const QVariantMap &parameters, QgsProcessingContext &context ) const;
462 
466  void setProvider( QgsProcessingProvider *provider );
467 
468  protected:
469 
475  virtual QgsProcessingAlgorithm *createInstance() const = 0 SIP_FACTORY SIP_VIRTUALERRORHANDLER( processing_exception_handler );
476 
495  virtual void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) = 0;
496 
514  bool addParameter( QgsProcessingParameterDefinition *parameterDefinition SIP_TRANSFER, bool createOutput = true );
515 
520  void removeParameter( const QString &name );
521 
535  bool addOutput( QgsProcessingOutputDefinition *outputDefinition SIP_TRANSFER );
536 
567  virtual bool prepareAlgorithm( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) SIP_THROW( QgsProcessingException ) SIP_VIRTUALERRORHANDLER( processing_exception_handler );
568 
598  virtual QVariantMap processAlgorithm( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) SIP_THROW( QgsProcessingException ) = 0 SIP_VIRTUALERRORHANDLER( processing_exception_handler );
599 
627  virtual QVariantMap postProcessAlgorithm( QgsProcessingContext &context, QgsProcessingFeedback *feedback ) SIP_THROW( QgsProcessingException ) SIP_VIRTUALERRORHANDLER( processing_exception_handler );
628 
632  QString parameterAsString( const QVariantMap &parameters, const QString &name, const QgsProcessingContext &context ) const;
633 
637  QString parameterAsExpression( const QVariantMap &parameters, const QString &name, const QgsProcessingContext &context ) const;
638 
642  double parameterAsDouble( const QVariantMap &parameters, const QString &name, const QgsProcessingContext &context ) const;
643 
647  int parameterAsInt( const QVariantMap &parameters, const QString &name, const QgsProcessingContext &context ) const;
648 
653  QList<int> parameterAsInts( const QVariantMap &parameters, const QString &name, const QgsProcessingContext &context ) const;
654 
658  int parameterAsEnum( const QVariantMap &parameters, const QString &name, const QgsProcessingContext &context ) const;
659 
663  QList<int> parameterAsEnums( const QVariantMap &parameters, const QString &name, const QgsProcessingContext &context ) const;
664 
668  bool parameterAsBool( const QVariantMap &parameters, const QString &name, const QgsProcessingContext &context ) const;
669 
674  bool parameterAsBoolean( const QVariantMap &parameters, const QString &name, const QgsProcessingContext &context ) const;
675 
696  QgsFeatureSink *parameterAsSink( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context, QString &destinationIdentifier SIP_OUT,
697  const QgsFields &fields, QgsWkbTypes::Type geometryType = QgsWkbTypes::NoGeometry, const QgsCoordinateReferenceSystem &crs = QgsCoordinateReferenceSystem(), QgsFeatureSink::SinkFlags sinkFlags = QgsFeatureSink::SinkFlags(), const QVariantMap &createOptions = QVariantMap(), const QStringList &datasourceOptions = QStringList(), const QStringList &layerOptions = QStringList() ) const SIP_THROW( QgsProcessingException ) SIP_FACTORY;
698 
707  QgsProcessingFeatureSource *parameterAsSource( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context ) const SIP_FACTORY;
708 
724  QString parameterAsCompatibleSourceLayerPath( const QVariantMap &parameters, const QString &name,
725  QgsProcessingContext &context, const QStringList &compatibleFormats, const QString &preferredFormat = QString( "shp" ), QgsProcessingFeedback *feedback = nullptr );
726 
756  QString parameterAsCompatibleSourceLayerPathAndLayerName( const QVariantMap &parameters, const QString &name,
757  QgsProcessingContext &context, const QStringList &compatibleFormats, const QString &preferredFormat = QString( "shp" ), QgsProcessingFeedback *feedback = nullptr, QString *layerName SIP_OUT = nullptr );
758 
766  QgsMapLayer *parameterAsLayer( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context ) const;
767 
775  QgsRasterLayer *parameterAsRasterLayer( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context ) const;
776 
786  QgsMeshLayer *parameterAsMeshLayer( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context ) const;
787 
788 
792  QString parameterAsOutputLayer( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context ) const;
793 
797  QString parameterAsFileOutput( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context ) const;
798 
806  QgsVectorLayer *parameterAsVectorLayer( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context ) const;
807 
811  QgsCoordinateReferenceSystem parameterAsCrs( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context ) const;
812 
821  QgsRectangle parameterAsExtent( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context,
823 
834  QgsGeometry parameterAsExtentGeometry( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context,
836 
842  QgsCoordinateReferenceSystem parameterAsExtentCrs( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context );
843 
852  QgsPointXY parameterAsPoint( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context,
854 
860  QgsCoordinateReferenceSystem parameterAsPointCrs( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context );
861 
870  QgsGeometry parameterAsGeometry( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context,
872 
878  QgsCoordinateReferenceSystem parameterAsGeometryCrs( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context );
879 
880 
881 
885  QString parameterAsFile( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context ) const;
886 
891  QVariantList parameterAsMatrix( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context ) const;
892 
896  QList< QgsMapLayer *> parameterAsLayerList( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context ) const;
897 
903  QStringList parameterAsFileList( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context ) const;
904 
908  QList<double> parameterAsRange( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context ) const;
909 
913  QStringList parameterAsFields( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context ) const;
914 
923  QgsPrintLayout *parameterAsLayout( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context );
924 
933  QgsLayoutItem *parameterAsLayoutItem( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context, QgsPrintLayout *layout );
934 
940  QColor parameterAsColor( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context );
941 
947  QString parameterAsConnectionName( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context );
948 
954  QString parameterAsSchema( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context );
955 
961  QString parameterAsDatabaseTableName( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context );
962 
968  QDateTime parameterAsDateTime( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context );
969 
970 
983  static QString invalidSourceError( const QVariantMap &parameters, const QString &name );
984 
997  static QString invalidRasterError( const QVariantMap &parameters, const QString &name );
998 
1011  static QString invalidSinkError( const QVariantMap &parameters, const QString &name );
1012 
1020  virtual bool supportInPlaceEdit( const QgsMapLayer *layer ) const;
1021 
1022  private:
1023 
1024  QgsProcessingProvider *mProvider = nullptr;
1027  bool mHasPrepared = false;
1028  bool mHasExecuted = false;
1029  bool mHasPostProcessed = false;
1030  std::unique_ptr< QgsProcessingContext > mLocalContext;
1031 
1032  bool createAutoOutputForParameter( QgsProcessingParameterDefinition *parameter );
1033 
1034 
1036  friend class TestQgsProcessing;
1037  friend class QgsProcessingModelAlgorithm;
1039 
1040 #ifdef SIP_RUN
1042 #endif
1043 
1044 };
1045 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsProcessingAlgorithm::Flags )
1046 
1047 
1048 
1049 
1073 {
1074  public:
1075 
1080 
1081  QgsProcessingAlgorithm::Flags flags() const override;
1082 
1106  virtual QgsFeatureList processFeature( const QgsFeature &feature, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) SIP_THROW( QgsProcessingException ) = 0 SIP_VIRTUALERRORHANDLER( processing_exception_handler );
1107 
1108  protected:
1109 
1110  void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
1111 
1119  virtual QString inputParameterName() const;
1120 
1128  virtual QString inputParameterDescription() const;
1129 
1135  virtual QString outputName() const = 0;
1136 
1142  virtual QList<int> inputLayerTypes() const;
1143 
1148  virtual QgsProcessing::SourceType outputLayerType() const;
1149 
1153  virtual QgsProcessingFeatureSource::Flag sourceFlags() const;
1154 
1160  virtual QgsFeatureSink::SinkFlags sinkFlags() const;
1161 
1169  virtual QgsWkbTypes::Type outputWkbType( QgsWkbTypes::Type inputWkbType ) const;
1170 
1181  virtual QgsFields outputFields( const QgsFields &inputFields ) const;
1182 
1191  virtual QgsCoordinateReferenceSystem outputCrs( const QgsCoordinateReferenceSystem &inputCrs ) const;
1192 
1198  virtual void initParameters( const QVariantMap &configuration = QVariantMap() );
1199 
1204  QgsCoordinateReferenceSystem sourceCrs() const;
1205 
1206 
1207  QVariantMap processAlgorithm( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override SIP_THROW( QgsProcessingException );
1208 
1213  virtual QgsFeatureRequest request() const;
1214 
1223  bool supportInPlaceEdit( const QgsMapLayer *layer ) const override;
1224 
1230  void prepareSource( const QVariantMap &parameters, QgsProcessingContext &context );
1231 
1232  QgsProcessingAlgorithm::VectorProperties sinkProperties( const QString &sink,
1233  const QVariantMap &parameters,
1234  QgsProcessingContext &context,
1235  const QMap< QString, QgsProcessingAlgorithm::VectorProperties > &sourceProperties ) const override;
1236 
1237  private:
1238 
1239  std::unique_ptr< QgsProcessingFeatureSource > mSource;
1240 
1241 };
1242 
1243 // clazy:excludeall=qstring-allocations
1244 
1245 #endif // QGSPROCESSINGALGORITHM_H
1246 
1247 
QgsExpressionContext
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Definition: qgsexpressioncontext.h:370
outputCrs
const QgsCoordinateReferenceSystem & outputCrs
Definition: qgswfsgetfeature.cpp:61
QgsProcessingAlgorithm::VectorProperties::fields
QgsFields fields
Fields.
Definition: qgsprocessingalgorithm.h:338
QgsProcessingAlgorithm::VectorProperties::crs
QgsCoordinateReferenceSystem crs
Coordinate Reference System.
Definition: qgsprocessingalgorithm.h:344
QgsProcessingFeedback
Base class for providing feedback from a processing algorithm.
Definition: qgsprocessingfeedback.h:38
SIP_OUT
#define SIP_OUT
Definition: qgis_sip.h:58
crs
const QgsCoordinateReferenceSystem & crs
Definition: qgswfsgetfeature.cpp:51
QgsFields
Container of fields for a vector layer.
Definition: qgsfields.h:45
QgsProcessingProvider
Abstract base class for processing providers.
Definition: qgsprocessingprovider.h:35
QgsProcessingAlgorithm::NotAvailable
@ NotAvailable
Properties are not available.
Definition: qgsprocessingalgorithm.h:326
qgis.h
QgsProcessingAlgorithm::groupId
virtual QString groupId() const
Returns the unique ID of the group this algorithm belongs to.
Definition: qgsprocessingalgorithm.h:233
QgsProcessingParameterDefinition
Base class for the definition of processing parameters.
Definition: qgsprocessingparameters.h:331
QgsWkbTypes::Type
Type
The WKB type describes the number of dimensions a geometry has.
Definition: qgswkbtypes.h:70
QgsProcessingAlgorithm::PropertyAvailability
PropertyAvailability
Property availability, used for QgsProcessingAlgorithm::VectorProperties in order to determine if pro...
Definition: qgsprocessingalgorithm.h:325
QgsRectangle
A rectangle specified with double values.
Definition: qgsrectangle.h:42
QgsProcessingAlgorithm::Available
@ Available
Properties are available.
Definition: qgsprocessingalgorithm.h:327
QgsProcessingParameterDefinitions
QList< const QgsProcessingParameterDefinition * > QgsProcessingParameterDefinitions
List of processing parameters.
Definition: qgsprocessingparameters.h:761
QgsProcessingFeatureBasedAlgorithm
An abstract QgsProcessingAlgorithm base class for processing algorithms which operate "feature-by-fea...
Definition: qgsprocessingalgorithm.h:1073
SIP_TRANSFERBACK
#define SIP_TRANSFERBACK
Definition: qgis_sip.h:48
SIP_FACTORY
#define SIP_FACTORY
Definition: qgis_sip.h:76
geos::unique_ptr
std::unique_ptr< GEOSGeometry, GeosDeleter > unique_ptr
Scoped GEOS pointer.
Definition: qgsgeos.h:79
SIP_DEPRECATED
#define SIP_DEPRECATED
Definition: qgis_sip.h:106
QgsProcessingAlgorithm::outputDefinitions
QgsProcessingOutputDefinitions outputDefinitions() const
Returns an ordered list of output definitions utilized by the algorithm.
Definition: qgsprocessingalgorithm.h:306
QgsProcessingOutputDefinition
Base class for the definition of processing outputs.
Definition: qgsprocessingoutputs.h:42
SIP_CONVERT_TO_SUBCLASS_CODE
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition: qgis_sip.h:177
QgsFeatureRequest
This class wraps a request for features to a vector layer (or directly its vector data provider).
Definition: qgsfeaturerequest.h:76
QgsProcessingFeatureBasedAlgorithm::QgsProcessingFeatureBasedAlgorithm
QgsProcessingFeatureBasedAlgorithm()=default
Constructor for QgsProcessingFeatureBasedAlgorithm.
QgsPrintLayout
Print layout, a QgsLayout subclass for static or atlas-based layouts.
Definition: qgsprintlayout.h:31
SIP_THROW
#define SIP_THROW(name)
Definition: qgis_sip.h:189
QgsProcessingToolboxProxyModel
A sort/filter proxy model for providers and algorithms shown within the Processing toolbox,...
Definition: qgsprocessingtoolboxmodel.h:418
QgsWkbTypes::Unknown
@ Unknown
Definition: qgswkbtypes.h:71
QgsProcessingAlgorithm::Flag
Flag
Flags indicating how and when an algorithm operates and should be exposed to users.
Definition: qgsprocessingalgorithm.h:69
QgsProcessingFeatureBasedAlgorithm::processFeature
virtual QgsFeatureList processFeature(const QgsFeature &feature, QgsProcessingContext &context, QgsProcessingFeedback *feedback) SIP_THROW(QgsProcessingException)=0
Processes an individual input feature from the source.
QgsProcessingContext
Contains information about the context in which a processing algorithm is executed.
Definition: qgsprocessingcontext.h:44
QgsMeshLayer
Represents a mesh layer supporting display of data on structured or unstructured meshes.
Definition: qgsmeshlayer.h:95
SIP_TRANSFER
#define SIP_TRANSFER
Definition: qgis_sip.h:36
qgsfeaturesource.h
Q_DECLARE_OPERATORS_FOR_FLAGS
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsField::ConfigurationFlags) CORE_EXPORT QDataStream &operator<<(QDataStream &out
Writes the field to stream out. QGIS version compatibility is not guaranteed.
QgsFeatureList
QList< QgsFeature > QgsFeatureList
Definition: qgsfeature.h:583
QgsLayoutItem
Base class for graphical items within a QgsLayout.
Definition: qgslayoutitem.h:113
QgsRasterLayer
Represents a raster layer.
Definition: qgsrasterlayer.h:71
QgsCoordinateReferenceSystem
This class represents a coordinate reference system (CRS).
Definition: qgscoordinatereferencesystem.h:206
QgsProcessingFeatureBasedAlgorithm::outputName
virtual QString outputName() const =0
Returns the translated, user visible name for any layers created by this algorithm.
QgsPointXY
A class to represent a 2D point.
Definition: qgspointxy.h:44
qgsprocessingoutputs.h
qgsprocessingutils.h
qgsprocessingparameters.h
QgsProcessingFeatureSource::Flag
Flag
Flags controlling how QgsProcessingFeatureSource fetches features.
Definition: qgsprocessingutils.h:476
QgsProcessingAlgorithm
Abstract base class for processing algorithms.
Definition: qgsprocessingalgorithm.h:52
QgsGeometry
A geometry is the spatial representation of a feature.
Definition: qgsgeometry.h:124
QgsProcessingAlgorithm::VectorProperties
Properties of a vector source or sink used in an algorithm.
Definition: qgsprocessingalgorithm.h:336
QgsVectorLayer
Represents a vector layer which manages a vector based data sets.
Definition: qgsvectorlayer.h:387
QgsMapLayer
Base class for all map layer types.
Definition: qgsmaplayer.h:83
QgsProcessingFeatureSource
QgsFeatureSource subclass which proxies methods to an underlying QgsFeatureSource,...
Definition: qgsprocessingutils.h:471
qgsprocessingcontext.h
QgsProcessingAlgorithm::parameterDefinitions
QgsProcessingParameterDefinitions parameterDefinitions() const
Returns an ordered list of parameter definitions utilized by the algorithm.
Definition: qgsprocessingalgorithm.h:279
QgsFeature
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
Definition: qgsfeature.h:56
QgsWkbTypes
Handles storage of information regarding WKB types and their properties.
Definition: qgswkbtypes.h:42
QgsProcessingOutputDefinitions
QList< const QgsProcessingOutputDefinition * > QgsProcessingOutputDefinitions
List of processing parameters.
Definition: qgsprocessingoutputs.h:143
QgsProcessingAlgorithmConfigurationWidget
A configuration widget for processing algorithms allows providing additional configuration options di...
Definition: qgsprocessingalgorithmconfigurationwidget.h:41
SIP_END
#define SIP_END
Definition: qgis_sip.h:194
QgsProcessing::SourceType
SourceType
Data source types enum.
Definition: qgsprocessing.h:45
QgsProcessingException
Custom exception class for processing related exceptions.
Definition: qgsexception.h:83
QgsFeatureSink
An interface for objects which accept features via addFeature(s) methods.
Definition: qgsfeaturesink.h:34
SIP_VIRTUALERRORHANDLER
#define SIP_VIRTUALERRORHANDLER(name)
Definition: qgis_sip.h:182