18#ifndef QGSALGORITHMVECTORIZE_H
19#define QGSALGORITHMVECTORIZE_H
36 QString
group()
const final;
38 void initAlgorithm(
const QVariantMap &configuration = QVariantMap() )
final;
45 std::unique_ptr<QgsRasterInterface> mInterface;
48 double mNoDataValue = -9999;
52 double mRasterUnitsPerPixelX = 0;
53 double mRasterUnitsPerPixelY = 0;
54 int mNbCellsXProvider = 0;
55 int mNbCellsYProvider = 0;
56 QgsReclassifyUtils::RasterClass::BoundsType mBoundsType = QgsReclassifyUtils::RasterClass::IncludeMax;
57 bool mUseNoDataForMissingValues =
false;
60 virtual QString outputName()
const = 0;
63 virtual QgsGeometry createGeometryForPixel(
double centerX,
double centerY,
double pixelWidthX,
double pixelWidthY )
const = 0;
69class QgsRasterPixelsToPolygonsAlgorithm :
public QgsVectorizeAlgorithmBase
72 QgsRasterPixelsToPolygonsAlgorithm() =
default;
73 QString name()
const override;
74 QString displayName()
const override;
75 QStringList tags()
const override;
76 QString shortHelpString()
const override;
77 QString shortDescription()
const override;
78 QgsRasterPixelsToPolygonsAlgorithm *createInstance() const override
SIP_FACTORY;
81 QString outputName() const override;
82 Qgis::ProcessingSourceType outputType() const override;
83 Qgis::WkbType sinkType() const override;
84 QgsGeometry createGeometryForPixel(
double centerX,
double centerY,
double pixelWidthX,
double pixelWidthY ) const override;
90class QgsRasterPixelsToPointsAlgorithm : public QgsVectorizeAlgorithmBase
93 QgsRasterPixelsToPointsAlgorithm() =
default;
94 QString name()
const override;
95 QString displayName()
const override;
96 QStringList tags()
const override;
97 QString shortHelpString()
const override;
98 QString shortDescription()
const override;
99 QgsRasterPixelsToPointsAlgorithm *createInstance() const override
SIP_FACTORY;
102 QString outputName() const override;
103 Qgis::ProcessingSourceType outputType() const override;
104 Qgis::WkbType sinkType() const override;
105 QgsGeometry createGeometryForPixel(
double centerX,
double centerY,
double pixelWidthX,
double pixelWidthY ) const override;
ProcessingSourceType
Processing data source types.
DataType
Raster data types.
@ Float32
Thirty two bit floating point (float).
WkbType
The WKB type describes the number of dimensions a geometry has.
Represents a coordinate reference system (CRS).
A geometry is the spatial representation of a feature.
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.