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;
72 class 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;
89 QgsGeometry createGeometryForPixel(
double centerX,
double centerY,
double pixelWidthX,
double pixelWidthY )
const override;
96 class 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;
113 QgsGeometry createGeometryForPixel(
double centerX,
double centerY,
double pixelWidthX,
double pixelWidthY )
const override;
119 #endif // QGSALGORITHMVECTORIZE_H virtual bool prepareAlgorithm(const QVariantMap ¶meters, QgsProcessingContext &context, QgsProcessingFeedback *feedback) SIP_THROW(QgsProcessingException)
Prepares the algorithm to run using the specified parameters.
A rectangle specified with double values.
Base class for providing feedback from a processing algorithm.
virtual QString group() const
Returns the name of the group this algorithm belongs to.
DataType
Raster data types.
A geometry is the spatial representation of a feature.
Thirty two bit floating point (float)
Abstract base class for processing algorithms.
virtual void initAlgorithm(const QVariantMap &configuration=QVariantMap())=0
Initializes the algorithm using the specified configuration.
Type
The WKB type describes the number of dimensions a geometry has.
virtual QVariantMap processAlgorithm(const QVariantMap ¶meters, QgsProcessingContext &context, QgsProcessingFeedback *feedback) SIP_THROW(QgsProcessingException)=0
Runs the algorithm using the specified parameters.
This class represents a coordinate reference system (CRS).
SourceType
Data source types enum.
virtual QString groupId() const
Returns the unique ID of the group this algorithm belongs to.
Contains information about the context in which a processing algorithm is executed.