18#ifndef QGSALGORITHMRECLASSIFYBYLAYER_H
19#define QGSALGORITHMRECLASSIFYBYLAYER_H
35 QString
group()
const final;
37 void initAlgorithm(
const QVariantMap &configuration = QVariantMap() )
final;
44 virtual void addAlgorithmParams() = 0;
56 virtual QVector<QgsReclassifyUtils::RasterClass> createClasses(
57 QgsReclassifyUtils::RasterClass::BoundsType boundsType,
63 std::unique_ptr<QgsRasterInterface> mInterface;
66 double mNoDataValue = -9999;
70 double mRasterUnitsPerPixelX = 0;
71 double mRasterUnitsPerPixelY = 0;
72 int mNbCellsXProvider = 0;
73 int mNbCellsYProvider = 0;
74 QgsReclassifyUtils::RasterClass::BoundsType mBoundsType = QgsReclassifyUtils::RasterClass::IncludeMax;
75 bool mUseNoDataForMissingValues =
false;
81class QgsReclassifyByLayerAlgorithm :
public QgsReclassifyAlgorithmBase
84 QgsReclassifyByLayerAlgorithm() =
default;
85 QString name()
const override;
86 QString displayName()
const override;
87 QStringList tags()
const override;
88 QString shortHelpString()
const override;
89 QgsReclassifyByLayerAlgorithm *createInstance() const override
SIP_FACTORY;
92 void addAlgorithmParams() override;
94 QVector<QgsReclassifyUtils::RasterClass> createClasses(
95 QgsReclassifyUtils::RasterClass::BoundsType boundsType,
100 int mMinFieldIdx = -1;
101 int mMaxFieldIdx = -1;
102 int mValueFieldIdx = -1;
109class QgsReclassifyByTableAlgorithm : public QgsReclassifyAlgorithmBase
112 QgsReclassifyByTableAlgorithm() =
default;
113 QString name()
const override;
114 QString displayName()
const override;
115 QStringList tags()
const override;
116 QString shortHelpString()
const override;
117 QgsReclassifyByTableAlgorithm *createInstance() const override
SIP_FACTORY;
120 void addAlgorithmParams() override;
122 QVector<QgsReclassifyUtils::RasterClass> createClasses( QgsReclassifyUtils::RasterClass::BoundsType boundsType, const QVariantMap ¶meters,
QgsProcessingContext &context,
QgsProcessingFeedback *feedback ) override;
DataType
Raster data types.
@ Float32
Thirty two bit floating point (float)
This class represents a coordinate reference system (CRS).
Wrapper for iterator of features from vector data provider or vector layer.
Abstract base class for processing algorithms.
virtual QString group() const
Returns the name of the group this algorithm belongs to.
virtual bool prepareAlgorithm(const QVariantMap ¶meters, QgsProcessingContext &context, QgsProcessingFeedback *feedback)
Prepares the algorithm to run using the specified parameters.
virtual QString groupId() const
Returns the unique ID of the group this algorithm belongs to.
virtual QVariantMap processAlgorithm(const QVariantMap ¶meters, QgsProcessingContext &context, QgsProcessingFeedback *feedback)=0
Runs the algorithm using the specified parameters.
virtual void initAlgorithm(const QVariantMap &configuration=QVariantMap())=0
Initializes the algorithm using the specified configuration.
Contains information about the context in which a processing algorithm is executed.
Base class for providing feedback from a processing algorithm.
A rectangle specified with double values.