18 #ifndef QGSALGORITHMRECLASSIFYBYLAYER_H 19 #define QGSALGORITHMRECLASSIFYBYLAYER_H 36 QString
group()
const final;
38 void initAlgorithm(
const QVariantMap &configuration = QVariantMap() )
final;
46 virtual void addAlgorithmParams() = 0;
58 virtual QVector< QgsReclassifyUtils::RasterClass > createClasses(
59 QgsReclassifyUtils::RasterClass::BoundsType boundsType,
65 std::unique_ptr< QgsRasterInterface > mInterface;
68 double mNoDataValue = -9999;
72 double mRasterUnitsPerPixelX = 0;
73 double mRasterUnitsPerPixelY = 0;
74 int mNbCellsXProvider = 0;
75 int mNbCellsYProvider = 0;
76 QgsReclassifyUtils::RasterClass::BoundsType mBoundsType = QgsReclassifyUtils::RasterClass::IncludeMax;
77 bool mUseNoDataForMissingValues =
false;
83 class QgsReclassifyByLayerAlgorithm :
public QgsReclassifyAlgorithmBase
88 QgsReclassifyByLayerAlgorithm() =
default;
89 QString name()
const override;
90 QString displayName()
const override;
91 QStringList tags()
const override;
92 QString shortHelpString()
const override;
93 QgsReclassifyByLayerAlgorithm *createInstance()
const override SIP_FACTORY;
96 void addAlgorithmParams()
override;
98 QVector< QgsReclassifyUtils::RasterClass > createClasses(
99 QgsReclassifyUtils::RasterClass::BoundsType boundsType,
103 int mMinFieldIdx = -1;
104 int mMaxFieldIdx = -1;
105 int mValueFieldIdx = -1;
113 class QgsReclassifyByTableAlgorithm :
public QgsReclassifyAlgorithmBase
118 QgsReclassifyByTableAlgorithm() =
default;
119 QString name()
const override;
120 QString displayName()
const override;
121 QStringList tags()
const override;
122 QString shortHelpString()
const override;
123 QgsReclassifyByTableAlgorithm *createInstance()
const override SIP_FACTORY;
127 void addAlgorithmParams()
override;
129 QVector< QgsReclassifyUtils::RasterClass > createClasses( QgsReclassifyUtils::RasterClass::BoundsType boundsType,
136 #endif // QGSALGORITHMRECLASSIFYBYLAYER_H virtual bool prepareAlgorithm(const QVariantMap ¶meters, QgsProcessingContext &context, QgsProcessingFeedback *feedback) SIP_THROW(QgsProcessingException)
Prepares the algorithm to run using the specified parameters.
Wrapper for iterator of features from vector data provider or vector layer.
A rectangle specified with double values.
Base class for providing feedback from a processing algorithm.
virtual QString group() const
Returns the name of the group this algorithm belongs to.
DataType
Raster data types.
Thirty two bit floating point (float)
Abstract base class for processing algorithms.
virtual void initAlgorithm(const QVariantMap &configuration=QVariantMap())=0
Initializes the algorithm using the specified configuration.
virtual QVariantMap processAlgorithm(const QVariantMap ¶meters, QgsProcessingContext &context, QgsProcessingFeedback *feedback) SIP_THROW(QgsProcessingException)=0
Runs the algorithm using the specified parameters.
This class represents a coordinate reference system (CRS).
virtual QString groupId() const
Returns the unique ID of the group this algorithm belongs to.
Contains information about the context in which a processing algorithm is executed.