18 #ifndef QGSALGORITHMRASTERFREQUENCYBYCOMPARISON_H
19 #define QGSALGORITHMRASTERFREQUENCYBYCOMPARISON_H
34 QgsRasterFrequencyByComparisonOperatorBase() =
default;
35 void initAlgorithm(
const QVariantMap &configuration = QVariantMap() )
override;
36 QString
group()
const override;
37 QString
groupId()
const override;
42 virtual int applyComparisonOperator(
double value, std::vector<double>cellValueStack ) = 0;
45 std::unique_ptr< QgsRasterInterface > mInputValueRasterInterface;
46 int mInputValueRasterBand;
47 std::vector< QgsRasterAnalysisUtils::RasterLogicInput > mInputs;
49 double mNoDataValue = -9999;
54 double mRasterUnitsPerPixelX;
55 double mRasterUnitsPerPixelY;
58 class QgsRasterFrequencyByEqualOperatorAlgorithm :
public QgsRasterFrequencyByComparisonOperatorBase
61 QgsRasterFrequencyByEqualOperatorAlgorithm() =
default;
62 QString name()
const override;
63 QString displayName()
const override;
64 QStringList tags()
const override;
65 QString shortHelpString()
const override;
66 QgsRasterFrequencyByEqualOperatorAlgorithm *createInstance() const override
SIP_FACTORY;
69 int applyComparisonOperator(
double searchValue, std::vector<
double>cellValueStack ) override;
72 class QgsRasterFrequencyByGreaterThanOperatorAlgorithm : public QgsRasterFrequencyByComparisonOperatorBase
75 QgsRasterFrequencyByGreaterThanOperatorAlgorithm() =
default;
76 QString name()
const override;
77 QString displayName()
const override;
78 QStringList tags()
const override;
79 QString shortHelpString()
const override;
80 QgsRasterFrequencyByGreaterThanOperatorAlgorithm *createInstance() const override
SIP_FACTORY;
83 int applyComparisonOperator(
double value, std::vector<
double>cellValueStack ) override;
86 class QgsRasterFrequencyByLessThanOperatorAlgorithm : public QgsRasterFrequencyByComparisonOperatorBase
89 QgsRasterFrequencyByLessThanOperatorAlgorithm() =
default;
90 QString name()
const override;
91 QString displayName()
const override;
92 QStringList tags()
const override;
93 QString shortHelpString()
const override;
94 QgsRasterFrequencyByLessThanOperatorAlgorithm *createInstance() const override
SIP_FACTORY;
97 int applyComparisonOperator(
double value, std::vector<
double>cellValueStack ) override;
102 #endif // QGSALGORITHMRASTERFREQUENCYBYCOMPARISON_H