18#ifndef QGSALGORITHMVECTORIZE_H
19#define QGSALGORITHMVECTORIZE_H
35 QString
group()
const final;
37 void initAlgorithm(
const QVariantMap &configuration = QVariantMap() )
final;
44 std::unique_ptr<QgsRasterInterface> mInterface;
47 double mNoDataValue = -9999;
51 double mRasterUnitsPerPixelX = 0;
52 double mRasterUnitsPerPixelY = 0;
53 int mNbCellsXProvider = 0;
54 int mNbCellsYProvider = 0;
55 QgsReclassifyUtils::RasterClass::BoundsType mBoundsType = QgsReclassifyUtils::RasterClass::IncludeMax;
56 bool mUseNoDataForMissingValues =
false;
59 virtual QString outputName()
const = 0;
62 virtual QgsGeometry createGeometryForPixel(
double centerX,
double centerY,
double pixelWidthX,
double pixelWidthY )
const = 0;
68class QgsRasterPixelsToPolygonsAlgorithm :
public QgsVectorizeAlgorithmBase
71 QgsRasterPixelsToPolygonsAlgorithm() =
default;
72 QString name()
const override;
73 QString displayName()
const override;
74 QStringList tags()
const override;
75 QString shortHelpString()
const override;
76 QString shortDescription()
const override;
77 QgsRasterPixelsToPolygonsAlgorithm *createInstance() const override
SIP_FACTORY;
80 QString outputName() const override;
81 Qgis::ProcessingSourceType outputType() const override;
82 Qgis::WkbType sinkType() const override;
83 QgsGeometry createGeometryForPixel(
double centerX,
double centerY,
double pixelWidthX,
double pixelWidthY ) const override;
89class QgsRasterPixelsToPointsAlgorithm : public QgsVectorizeAlgorithmBase
92 QgsRasterPixelsToPointsAlgorithm() =
default;
93 QString name()
const override;
94 QString displayName()
const override;
95 QStringList tags()
const override;
96 QString shortHelpString()
const override;
97 QString shortDescription()
const override;
98 QgsRasterPixelsToPointsAlgorithm *createInstance() const override
SIP_FACTORY;
101 QString outputName() const override;
102 Qgis::ProcessingSourceType outputType() const override;
103 Qgis::WkbType sinkType() const override;
104 QgsGeometry createGeometryForPixel(
double centerX,
double centerY,
double pixelWidthX,
double pixelWidthY ) const override;
The Qgis class provides global constants for use throughout the application.
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.
This class 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.