18#ifndef QGSALGORITHMRASTERSTACKPOSITION_H
19#define QGSALGORITHMRASTERSTACKPOSITION_H
34 QgsRasterStackPositionAlgorithmBase() =
default;
35 void initAlgorithm(
const QVariantMap &configuration = QVariantMap() )
override;
36 QString
group()
const override;
37 QString
groupId()
const override;
42 virtual int findPosition( std::vector<std::unique_ptr<QgsRasterBlock>> &rasterBlockStack,
int &row,
int &col,
bool &noDataInRasterBlockStack ) = 0;
43 double mNoDataValue = -9999;
46 std::vector<QgsRasterAnalysisUtils::RasterLogicInput> mInputs;
47 bool mIgnoreNoData =
false;
52 double mRasterUnitsPerPixelX = 0;
53 double mRasterUnitsPerPixelY = 0;
56class QgsRasterStackLowestPositionAlgorithm :
public QgsRasterStackPositionAlgorithmBase
59 QgsRasterStackLowestPositionAlgorithm() =
default;
60 QString name()
const override;
61 QString displayName()
const override;
62 QStringList tags()
const override;
63 QString shortHelpString()
const override;
64 QgsRasterStackLowestPositionAlgorithm *createInstance() const override
SIP_FACTORY;
67 int findPosition( std::vector<std::unique_ptr<
QgsRasterBlock>> &rasterBlockStack,
int &row,
int &col,
bool &noDataInRasterBlockStack ) override;
70class QgsRasterStackHighestPositionAlgorithm : public QgsRasterStackPositionAlgorithmBase
73 QgsRasterStackHighestPositionAlgorithm() =
default;
74 QString name()
const override;
75 QString displayName()
const override;
76 QStringList tags()
const override;
77 QString shortHelpString()
const override;
78 QgsRasterStackHighestPositionAlgorithm *createInstance() const override
SIP_FACTORY;
81 int findPosition( std::vector<std::unique_ptr<
QgsRasterBlock>> &rasterBlockStack,
int &row,
int &col,
bool &noDataInRasterBlockStack ) override;
This class represents a coordinate reference system (CRS).
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.