16 #ifndef QGSRASTERANALYSISUTILS_H 17 #define QGSRASTERANALYSISUTILS_H 19 #include "qgis_analysis.h" 39 namespace QgsRasterAnalysisUtils
45 void cellInfoForBBox(
const QgsRectangle &rasterBBox,
const QgsRectangle &featureBBox,
double cellSizeX,
double cellSizeY,
int &nCellsX,
int &nCellsY,
46 int rasterWidth,
int rasterHeight,
51 double cellSizeX,
double cellSizeY,
const QgsRectangle &rasterBBox,
const std::function<
void(
double )> &addValue,
bool skipNodata =
true );
54 void statisticsFromPreciseIntersection(
QgsRasterInterface *rasterInterface,
int rasterBand,
const QgsGeometry &poly,
int nCellsX,
int nCellsY,
55 double cellSizeX,
double cellSizeY,
const QgsRectangle &rasterBBox,
const std::function<
void(
double,
double )> &addValue,
bool skipNodata =
true );
58 bool validPixel(
double value );
64 std::unique_ptr< QgsProcessingParameterDefinition > createRasterTypeParameter(
const QString &name,
65 const QString &description,
74 struct RasterLogicInput
76 std::unique_ptr< QgsRasterInterface > sourceDataProvider;
77 std::unique_ptr< QgsRasterProjector> projector;
79 bool hasNoDataValue =
false;
80 std::vector< int > bands { 1 };
83 ANALYSIS_EXPORT
void applyRasterLogicOperator(
const std::vector< QgsRasterAnalysisUtils::RasterLogicInput > &inputs,
QgsRasterDataProvider *destinationRaster,
double outputNoDataValue,
const bool treatNoDataAsFalse,
85 std::function<
void(
const std::vector< std::unique_ptr< QgsRasterBlock > > &,
bool &,
bool &,
int,
int,
bool )> &applyLogicFunc,
93 #endif // QGSRASTERANALYSISUTILS_H A rectangle specified with double values.
DataType
Raster data types.
A geometry is the spatial representation of a feature.
Thirty two bit floating point (float)
Base class for feedback objects to be used for cancellation of something running in a worker thread...
Base class for processing filters like renderers, reprojector, resampler etc.
unsigned long long qgssize
Qgssize is used instead of size_t, because size_t is stdlib type, unknown by SIP, and it would be har...
QgsRasterProjector implements approximate projection support for it calculates grid of points in sour...
Base class for the definition of processing parameters.
Base class for raster data providers.