18#ifndef QGSALGORITHMVECTORIZE_H
19#define QGSALGORITHMVECTORIZE_H
36 QString
group()
const final;
38 void initAlgorithm(
const QVariantMap &configuration = QVariantMap() )
final;
47 std::unique_ptr< QgsRasterInterface > mInterface;
50 double mNoDataValue = -9999;
54 double mRasterUnitsPerPixelX = 0;
55 double mRasterUnitsPerPixelY = 0;
56 int mNbCellsXProvider = 0;
57 int mNbCellsYProvider = 0;
58 QgsReclassifyUtils::RasterClass::BoundsType mBoundsType = QgsReclassifyUtils::RasterClass::IncludeMax;
59 bool mUseNoDataForMissingValues =
false;
63 virtual QString outputName()
const = 0;
66 virtual QgsGeometry createGeometryForPixel(
double centerX,
double centerY,
double pixelWidthX,
double pixelWidthY )
const = 0;
72class QgsRasterPixelsToPolygonsAlgorithm :
public QgsVectorizeAlgorithmBase
76 QgsRasterPixelsToPolygonsAlgorithm() =
default;
77 QString name()
const override;
78 QString displayName()
const override;
79 QStringList tags()
const override;
80 QString shortHelpString()
const override;
81 QString shortDescription()
const override;
82 QgsRasterPixelsToPolygonsAlgorithm *createInstance() const override
SIP_FACTORY;
86 QString outputName() const override;
88 Qgis::WkbType sinkType() const override;
89 QgsGeometry createGeometryForPixel(
double centerX,
double centerY,
double pixelWidthX,
double pixelWidthY ) const override;
96class QgsRasterPixelsToPointsAlgorithm : public QgsVectorizeAlgorithmBase
100 QgsRasterPixelsToPointsAlgorithm() =
default;
101 QString name()
const override;
102 QString displayName()
const override;
103 QStringList tags()
const override;
104 QString shortHelpString()
const override;
105 QString shortDescription()
const override;
106 QgsRasterPixelsToPointsAlgorithm *createInstance() const override
SIP_FACTORY;
110 QString outputName() const override;
112 Qgis::WkbType sinkType() const override;
113 QgsGeometry createGeometryForPixel(
double centerX,
double centerY,
double pixelWidthX,
double pixelWidthY ) const override;
The Qgis class provides global constants for use throughout the application.
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.
Contains enumerations and other constants for use in processing algorithms and parameters.
SourceType
Data source types enum.
A rectangle specified with double values.