25using namespace Qt::StringLiterals;
33QString QgsFuzzifyRasterAlgorithmBase::group()
const
35 return QObject::tr(
"Raster analysis" );
38QString QgsFuzzifyRasterAlgorithmBase::groupId()
const
40 return u
"rasteranalysis"_s;
43void QgsFuzzifyRasterAlgorithmBase::initAlgorithm(
const QVariantMap & )
59 auto createOptsParam = std::make_unique<QgsProcessingParameterString>( u
"CREATE_OPTIONS"_s, QObject::tr(
"Creation options" ), QVariant(),
false,
true );
60 createOptsParam->setMetadata( QVariantMap( { { u
"widget_wrapper"_s, QVariantMap( { { u
"widget_type"_s, u
"rasteroptions"_s } } ) } } ) );
62 addParameter( createOptsParam.release() );
64 auto creationOptsParam = std::make_unique<QgsProcessingParameterString>( u
"CREATION_OPTIONS"_s, QObject::tr(
"Creation options" ), QVariant(),
false,
true );
65 creationOptsParam->setMetadata( QVariantMap( { { u
"widget_wrapper"_s, QVariantMap( { { u
"widget_type"_s, u
"rasteroptions"_s } } ) } } ) );
67 addParameter( creationOptsParam.release() );
74 mInputRaster = parameterAsRasterLayer( parameters, u
"INPUT"_s, context );
79 mBand = parameterAsInt( parameters, u
"BAND"_s, context );
80 if ( mBand < 1 || mBand > mInputRaster->bandCount() )
81 throw QgsProcessingException( QObject::tr(
"Invalid band number for BAND (%1): Valid values for input raster are 1 to %2" ).arg( mBand ).arg( mInputRaster->bandCount() ) );
83 mInterface.reset( mInputRaster->dataProvider()->clone() );
84 mExtent = mInputRaster->extent();
85 mLayerWidth = mInputRaster->width();
86 mLayerHeight = mInputRaster->height();
87 mCrs = mInputRaster->crs();
88 mNbCellsXProvider = mInterface->xSize();
89 mNbCellsYProvider = mInterface->ySize();
92 prepareAlgorithmFuzzificationParameters( parameters, context, feedback );
99 QString creationOptions = parameterAsString( parameters, u
"CREATION_OPTIONS"_s, context ).trimmed();
101 const QString optionsString = parameterAsString( parameters, u
"CREATE_OPTIONS"_s, context );
102 if ( !optionsString.isEmpty() )
103 creationOptions = optionsString;
105 const QString outputFile = parameterAsOutputLayer( parameters, u
"OUTPUT"_s, context );
106 const QString outputFormat = parameterAsOutputRasterFormat( parameters, u
"OUTPUT"_s, context );
108 auto writer = std::make_unique<QgsRasterFileWriter>( outputFile );
109 writer->setOutputProviderKey( u
"gdal"_s );
110 if ( !creationOptions.isEmpty() )
112 writer->setCreationOptions( creationOptions.split(
'|' ) );
114 writer->setOutputFormat( outputFormat );
115 std::unique_ptr<QgsRasterDataProvider> provider( writer->createOneBandRaster( mDataType, mNbCellsXProvider, mNbCellsYProvider, mExtent, mCrs ) );
118 if ( !provider->isValid() )
121 provider->setNoDataValue( 1, mNoDataValue );
122 provider->setEditable(
true );
123 const qgssize layerSize =
static_cast<qgssize>( mLayerWidth ) *
static_cast<qgssize>( mLayerHeight );
125 const bool hasReportsDuringClose = provider->hasReportsDuringClose();
126 mMaxProgressDuringBlockWriting = hasReportsDuringClose ? 50.0 : 100.0;
128 fuzzify( provider.get(), feedback );
130 provider->setEditable(
false );
132 if ( feedback && hasReportsDuringClose )
135 if ( !provider->closeWithProgress( scaledFeedback.get() ) )
144 outputs.insert( u
"EXTENT"_s, mExtent.toString() );
145 outputs.insert( u
"CRS_AUTHID"_s, mCrs.authid() );
146 outputs.insert( u
"WIDTH_IN_PIXELS"_s, mLayerWidth );
147 outputs.insert( u
"HEIGHT_IN_PIXELS"_s, mLayerHeight );
148 outputs.insert( u
"TOTAL_PIXEL_COUNT"_s, layerSize );
149 outputs.insert( u
"OUTPUT"_s, outputFile );
158QString QgsFuzzifyRasterLinearMembershipAlgorithm::name()
const
160 return u
"fuzzifyrasterlinearmembership"_s;
163QString QgsFuzzifyRasterLinearMembershipAlgorithm::displayName()
const
165 return QObject::tr(
"Fuzzify raster (linear membership)" );
168QStringList QgsFuzzifyRasterLinearMembershipAlgorithm::tags()
const
170 return QObject::tr(
"fuzzy logic,fuzzify,fuzzy,logic,linear,membership" ).split(
',' );
173QString QgsFuzzifyRasterLinearMembershipAlgorithm::shortDescription()
const
176 "Transforms an input raster to a fuzzified raster where values range from 0 to 1 following a "
177 "linear fuzzy membership function."
181QString QgsFuzzifyRasterLinearMembershipAlgorithm::shortHelpString()
const
184 "This algorithm transforms an input raster "
185 "to a fuzzified raster and thereby assigns values between 0 and 1 following a "
186 "linear fuzzy membership function. The value of 0 implies no membership with the "
187 "defined fuzzy set, a value of 1 depicts full membership. In between, the degree "
188 "of membership of raster values follows a linear membership function.\n\n"
189 "The linear function is constructed using two user-defined input raster values "
190 "which set the point of full membership (high bound, results to 1) and no membership "
191 "(low bound, results to 0) respectively. The fuzzy set in between those values is defined as a "
192 "linear function.\n\n"
193 "Both increasing and decreasing fuzzy sets can be modeled by "
194 "swapping the high and low bound parameters."
198QgsFuzzifyRasterLinearMembershipAlgorithm *QgsFuzzifyRasterLinearMembershipAlgorithm::createInstance()
const
200 return new QgsFuzzifyRasterLinearMembershipAlgorithm();
203void QgsFuzzifyRasterLinearMembershipAlgorithm::addAlgorithmParams()
212 mFuzzifyHighBound = parameterAsDouble( parameters, u
"FUZZYHIGHBOUND"_s, context );
213 mFuzzifyLowBound = parameterAsDouble( parameters, u
"FUZZYLOWBOUND"_s, context );
220 iter.startRasterRead( mBand, mLayerWidth, mLayerHeight, mExtent );
225 bool isNoData =
false;
226 std::unique_ptr<QgsRasterBlock> rasterBlock;
227 while ( iter.readNextRasterPart( mBand, iterCols, iterRows, rasterBlock, iterLeft, iterTop ) )
230 feedback->
setProgress( 100 * iter.progress( mBand ) );
231 auto fuzzifiedBlock = std::make_unique<QgsRasterBlock>( destinationProvider->
dataType( 1 ), iterCols, iterRows );
233 for (
int row = 0; row < iterRows; row++ )
237 for (
int column = 0; column < iterCols; column++ )
242 const double value = rasterBlock->valueAndNoData( row, column, isNoData );
243 double fuzzifiedValue;
247 fuzzifiedValue = mNoDataValue;
249 else if ( mFuzzifyLowBound < mFuzzifyHighBound )
251 if ( value <= mFuzzifyLowBound )
253 else if ( value >= mFuzzifyHighBound )
256 fuzzifiedValue = ( ( value - mFuzzifyLowBound ) / ( mFuzzifyHighBound - mFuzzifyLowBound ) );
258 else if ( mFuzzifyLowBound > mFuzzifyHighBound )
260 if ( value >= mFuzzifyLowBound )
262 else if ( value <= mFuzzifyHighBound )
265 fuzzifiedValue = ( ( value - mFuzzifyLowBound ) / ( mFuzzifyHighBound - mFuzzifyLowBound ) );
269 throw QgsProcessingException( QObject::tr(
"Please choose varying values for the high and low membership parameters" ) );
272 fuzzifiedBlock->setValue( row, column, fuzzifiedValue );
275 if ( !destinationProvider->
writeBlock( fuzzifiedBlock.get(), mBand, iterLeft, iterTop ) )
287QString QgsFuzzifyRasterPowerMembershipAlgorithm::name()
const
289 return u
"fuzzifyrasterpowermembership"_s;
292QString QgsFuzzifyRasterPowerMembershipAlgorithm::displayName()
const
294 return QObject::tr(
"Fuzzify raster (power membership)" );
297QStringList QgsFuzzifyRasterPowerMembershipAlgorithm::tags()
const
299 return QObject::tr(
"fuzzy logic,fuzzify,fuzzy,logic,power,non-linear,membership,exponent" ).split(
',' );
302QString QgsFuzzifyRasterPowerMembershipAlgorithm::shortDescription()
const
305 "Transforms an input raster to a fuzzified raster where values range from 0 to 1 following a "
310QString QgsFuzzifyRasterPowerMembershipAlgorithm::shortHelpString()
const
313 "This algorithm transforms an input raster "
314 "to a fuzzified raster and thereby assigns values between 0 and 1 following a "
315 "power function. The value of 0 implies no membership with the "
316 "defined fuzzy set, a value of 1 depicts full membership. In between, the degree "
317 "of membership of raster values follows a power function.\n\n"
318 "The power function is constructed using three user-defined input raster values "
319 "which set the point of full membership (high bound, results to 1), no membership "
320 "(low bound, results to 0) and function exponent (only positive) respectively. "
321 "The fuzzy set in between those the upper and lower bounds values is then defined as "
322 "a power function.\n\n"
323 "Both increasing and decreasing fuzzy sets can be modeled by "
324 "swapping the high and low bound parameters."
328QgsFuzzifyRasterPowerMembershipAlgorithm *QgsFuzzifyRasterPowerMembershipAlgorithm::createInstance()
const
330 return new QgsFuzzifyRasterPowerMembershipAlgorithm();
333void QgsFuzzifyRasterPowerMembershipAlgorithm::addAlgorithmParams()
343 mFuzzifyHighBound = parameterAsDouble( parameters, u
"FUZZYHIGHBOUND"_s, context );
344 mFuzzifyLowBound = parameterAsDouble( parameters, u
"FUZZYLOWBOUND"_s, context );
345 mFuzzifyExponent = parameterAsDouble( parameters, u
"FUZZYEXPONENT"_s, context );
352 iter.startRasterRead( mBand, mLayerWidth, mLayerHeight, mExtent );
357 bool isNoData =
false;
358 std::unique_ptr<QgsRasterBlock> rasterBlock;
359 while ( iter.readNextRasterPart( mBand, iterCols, iterRows, rasterBlock, iterLeft, iterTop ) )
362 feedback->
setProgress( 100 * iter.progress( mBand ) );
363 auto fuzzifiedBlock = std::make_unique<QgsRasterBlock>( destinationProvider->
dataType( 1 ), iterCols, iterRows );
365 for (
int row = 0; row < iterRows; row++ )
369 for (
int column = 0; column < iterCols; column++ )
374 const double value = rasterBlock->valueAndNoData( row, column, isNoData );
375 double fuzzifiedValue;
379 fuzzifiedValue = mNoDataValue;
381 else if ( mFuzzifyLowBound < mFuzzifyHighBound )
383 if ( value <= mFuzzifyLowBound )
385 else if ( value >= mFuzzifyHighBound )
388 fuzzifiedValue = std::pow( ( value - mFuzzifyLowBound ) / ( mFuzzifyHighBound - mFuzzifyLowBound ), mFuzzifyExponent );
390 else if ( mFuzzifyLowBound > mFuzzifyHighBound )
392 if ( value >= mFuzzifyLowBound )
394 else if ( value <= mFuzzifyHighBound )
397 fuzzifiedValue = std::pow( ( value - mFuzzifyLowBound ) / ( mFuzzifyHighBound - mFuzzifyLowBound ), mFuzzifyExponent );
401 throw QgsProcessingException( QObject::tr(
"Please choose varying values for the high and low membership parameters" ) );
404 fuzzifiedBlock->setValue( row, column, fuzzifiedValue );
407 if ( !destinationProvider->
writeBlock( fuzzifiedBlock.get(), mBand, iterLeft, iterTop ) )
418QString QgsFuzzifyRasterLargeMembershipAlgorithm::name()
const
420 return u
"fuzzifyrasterlargemembership"_s;
423QString QgsFuzzifyRasterLargeMembershipAlgorithm::displayName()
const
425 return QObject::tr(
"Fuzzify raster (large membership)" );
428QStringList QgsFuzzifyRasterLargeMembershipAlgorithm::tags()
const
430 return QObject::tr(
"fuzzy logic,fuzzify,fuzzy,logic,large,membership" ).split(
',' );
433QString QgsFuzzifyRasterLargeMembershipAlgorithm::shortDescription()
const
436 "Transforms an input raster to a fuzzified raster where values range from 0 to 1 following the "
437 "'large' fuzzy membership function."
441QString QgsFuzzifyRasterLargeMembershipAlgorithm::shortHelpString()
const
444 "This algorithm transforms an input raster "
445 "to a fuzzified raster and thereby assigns values between 0 and 1 following the "
446 "'large' fuzzy membership function. The value of 0 implies no membership with the "
447 "defined fuzzy set, a value of 1 depicts full membership. In between, the degree "
448 "of membership of raster values follows the 'large' membership function.\n\n"
449 "The 'large' function is constructed using two user-defined input raster values "
450 "which set the point of half membership (midpoint, results to 0.5) and a predefined "
451 "function spread which controls the function uptake.\n\n"
452 "This function is typically used when larger input raster values should become members "
453 "of the fuzzy set more easily than smaller values."
457QgsFuzzifyRasterLargeMembershipAlgorithm *QgsFuzzifyRasterLargeMembershipAlgorithm::createInstance()
const
459 return new QgsFuzzifyRasterLargeMembershipAlgorithm();
462void QgsFuzzifyRasterLargeMembershipAlgorithm::addAlgorithmParams()
471 mFuzzifyMidpoint = parameterAsDouble( parameters, u
"FUZZYMIDPOINT"_s, context );
472 mFuzzifySpread = parameterAsDouble( parameters, u
"FUZZYSPREAD"_s, context );
479 iter.startRasterRead( mBand, mLayerWidth, mLayerHeight, mExtent );
484 bool isNoData =
false;
485 std::unique_ptr<QgsRasterBlock> rasterBlock;
486 while ( iter.readNextRasterPart( mBand, iterCols, iterRows, rasterBlock, iterLeft, iterTop ) )
489 feedback->
setProgress( 100 * iter.progress( mBand ) );
490 auto fuzzifiedBlock = std::make_unique<QgsRasterBlock>( destinationProvider->
dataType( 1 ), iterCols, iterRows );
492 for (
int row = 0; row < iterRows; row++ )
496 for (
int column = 0; column < iterCols; column++ )
501 const double value = rasterBlock->valueAndNoData( row, column, isNoData );
502 double fuzzifiedValue;
506 fuzzifiedValue = mNoDataValue;
510 fuzzifiedValue = 1 / ( 1 + std::pow( value / mFuzzifyMidpoint, -mFuzzifySpread ) );
513 fuzzifiedBlock->setValue( row, column, fuzzifiedValue );
516 if ( !destinationProvider->
writeBlock( fuzzifiedBlock.get(), mBand, iterLeft, iterTop ) )
528QString QgsFuzzifyRasterSmallMembershipAlgorithm::name()
const
530 return u
"fuzzifyrastersmallmembership"_s;
533QString QgsFuzzifyRasterSmallMembershipAlgorithm::displayName()
const
535 return QObject::tr(
"Fuzzify raster (small membership)" );
538QStringList QgsFuzzifyRasterSmallMembershipAlgorithm::tags()
const
540 return QObject::tr(
"fuzzy logic,fuzzify,fuzzy,logic,small,membership" ).split(
',' );
543QString QgsFuzzifyRasterSmallMembershipAlgorithm::shortDescription()
const
546 "Transforms an input raster to a fuzzified raster where values range from 0 to 1 following the "
547 "'small' fuzzy membership function."
551QString QgsFuzzifyRasterSmallMembershipAlgorithm::shortHelpString()
const
554 "The Fuzzify raster (small membership) algorithm transforms an input raster "
555 "to a fuzzified raster and thereby assigns values between 0 and 1 following the "
556 "'small' fuzzy membership function. The value of 0 implies no membership with the "
557 "defined fuzzy set, a value of 1 depicts full membership. In between, the degree "
558 "of membership of raster values follows the 'small' membership function.\n\n"
559 "The 'small' function is constructed using two user-defined input raster values "
560 "which set the point of half membership (midpoint, results to 0.5) and a predefined "
561 "function spread which controls the function uptake.\n\n"
562 "This function is typically used when smaller input raster values should become members "
563 "of the fuzzy set more easily than higher values."
567QgsFuzzifyRasterSmallMembershipAlgorithm *QgsFuzzifyRasterSmallMembershipAlgorithm::createInstance()
const
569 return new QgsFuzzifyRasterSmallMembershipAlgorithm();
572void QgsFuzzifyRasterSmallMembershipAlgorithm::addAlgorithmParams()
581 mFuzzifyMidpoint = parameterAsDouble( parameters, u
"FUZZYMIDPOINT"_s, context );
582 mFuzzifySpread = parameterAsDouble( parameters, u
"FUZZYSPREAD"_s, context );
589 iter.startRasterRead( mBand, mLayerWidth, mLayerHeight, mExtent );
594 bool isNoData =
false;
595 std::unique_ptr<QgsRasterBlock> rasterBlock;
596 while ( iter.readNextRasterPart( mBand, iterCols, iterRows, rasterBlock, iterLeft, iterTop ) )
599 feedback->
setProgress( 100 * iter.progress( mBand ) );
600 auto fuzzifiedBlock = std::make_unique<QgsRasterBlock>( destinationProvider->
dataType( 1 ), iterCols, iterRows );
602 for (
int row = 0; row < iterRows; row++ )
606 for (
int column = 0; column < iterCols; column++ )
611 const double value = rasterBlock->valueAndNoData( row, column, isNoData );
612 double fuzzifiedValue;
616 fuzzifiedValue = mNoDataValue;
620 fuzzifiedValue = 1 / ( 1 + std::pow( value / mFuzzifyMidpoint, mFuzzifySpread ) );
623 fuzzifiedBlock->setValue( row, column, fuzzifiedValue );
626 if ( !destinationProvider->
writeBlock( fuzzifiedBlock.get(), mBand, iterLeft, iterTop ) )
638QString QgsFuzzifyRasterGaussianMembershipAlgorithm::name()
const
640 return u
"fuzzifyrastergaussianmembership"_s;
643QString QgsFuzzifyRasterGaussianMembershipAlgorithm::displayName()
const
645 return QObject::tr(
"Fuzzify raster (gaussian membership)" );
648QStringList QgsFuzzifyRasterGaussianMembershipAlgorithm::tags()
const
650 return QObject::tr(
"fuzzy logic,fuzzify,fuzzy,logic,gaussian,membership" ).split(
',' );
653QString QgsFuzzifyRasterGaussianMembershipAlgorithm::shortDescription()
const
656 "Transforms an input raster to a fuzzified raster where values range from 0 to 1 following a "
657 "gaussian fuzzy membership function."
661QString QgsFuzzifyRasterGaussianMembershipAlgorithm::shortHelpString()
const
664 "This algorithm transforms an input raster "
665 "to a fuzzified raster and thereby assigns values between 0 and 1 following a "
666 "gaussian fuzzy membership function. The value of 0 implies no membership with the "
667 "defined fuzzy set, a value of 1 depicts full membership. In between, the degree "
668 "of membership of raster values follows a gaussian membership function.\n\n"
669 "The gaussian function is constructed using two user-defined input values "
670 "which set the midpoint of the gaussian function (midpoint, results to 1) and a "
671 "predefined function spread which controls the function spread.\n\n"
672 "This function is typically used when a certain range of raster values around a "
673 "predefined function midpoint should become members of the fuzzy set."
677QgsFuzzifyRasterGaussianMembershipAlgorithm *QgsFuzzifyRasterGaussianMembershipAlgorithm::createInstance()
const
679 return new QgsFuzzifyRasterGaussianMembershipAlgorithm();
682void QgsFuzzifyRasterGaussianMembershipAlgorithm::addAlgorithmParams()
691 mFuzzifyMidpoint = parameterAsDouble( parameters, u
"FUZZYMIDPOINT"_s, context );
692 mFuzzifySpread = parameterAsDouble( parameters, u
"FUZZYSPREAD"_s, context );
699 iter.startRasterRead( mBand, mLayerWidth, mLayerHeight, mExtent );
704 bool isNoData =
false;
705 std::unique_ptr<QgsRasterBlock> rasterBlock;
706 while ( iter.readNextRasterPart( mBand, iterCols, iterRows, rasterBlock, iterLeft, iterTop ) )
709 feedback->
setProgress( 100 * iter.progress( mBand ) );
710 auto fuzzifiedBlock = std::make_unique<QgsRasterBlock>( destinationProvider->
dataType( 1 ), iterCols, iterRows );
712 for (
int row = 0; row < iterRows; row++ )
716 for (
int column = 0; column < iterCols; column++ )
721 const double value = rasterBlock->valueAndNoData( row, column, isNoData );
722 double fuzzifiedValue;
726 fuzzifiedValue = mNoDataValue;
730 fuzzifiedValue = std::exp( -mFuzzifySpread * std::pow( value - mFuzzifyMidpoint, 2 ) );
733 fuzzifiedBlock->setValue( row, column, fuzzifiedValue );
736 if ( !destinationProvider->
writeBlock( fuzzifiedBlock.get(), mBand, iterLeft, iterTop ) )
748QString QgsFuzzifyRasterNearMembershipAlgorithm::name()
const
750 return u
"fuzzifyrasternearmembership"_s;
753QString QgsFuzzifyRasterNearMembershipAlgorithm::displayName()
const
755 return QObject::tr(
"Fuzzify raster (near membership)" );
758QStringList QgsFuzzifyRasterNearMembershipAlgorithm::tags()
const
760 return QObject::tr(
"fuzzy logic,fuzzify,fuzzy,logic,near,membership" ).split(
',' );
763QString QgsFuzzifyRasterNearMembershipAlgorithm::shortDescription()
const
766 "Transforms an input raster to a fuzzified raster where values range from 0 to 1 following the "
767 "'near' fuzzy membership function."
771QString QgsFuzzifyRasterNearMembershipAlgorithm::shortHelpString()
const
774 "The Fuzzify raster (near membership) algorithm transforms an input raster "
775 "to a fuzzified raster and thereby assigns values between 0 and 1 following the "
776 "'near' fuzzy membership function. The value of 0 implies no membership with the "
777 "defined fuzzy set, a value of 1 depicts full membership. In between, the degree "
778 "of membership of raster values follows the 'near' membership function.\n\n"
779 "The 'near' function is constructed using two user-defined input values "
780 "which set the midpoint of the 'near' function (midpoint, results to 1) and a "
781 "predefined function spread which controls the function spread.\n\n"
782 "This function is typically used when a certain range of raster values near a "
783 "predefined function midpoint should become members of the fuzzy set. The function"
784 " generally shows a higher rate of decay than the gaussian membership function."
788QgsFuzzifyRasterNearMembershipAlgorithm *QgsFuzzifyRasterNearMembershipAlgorithm::createInstance()
const
790 return new QgsFuzzifyRasterNearMembershipAlgorithm();
793void QgsFuzzifyRasterNearMembershipAlgorithm::addAlgorithmParams()
802 mFuzzifyMidpoint = parameterAsDouble( parameters, u
"FUZZYMIDPOINT"_s, context );
803 mFuzzifySpread = parameterAsDouble( parameters, u
"FUZZYSPREAD"_s, context );
810 iter.startRasterRead( mBand, mLayerWidth, mLayerHeight, mExtent );
815 bool isNoData =
false;
816 std::unique_ptr<QgsRasterBlock> rasterBlock;
817 while ( iter.readNextRasterPart( mBand, iterCols, iterRows, rasterBlock, iterLeft, iterTop ) )
820 feedback->
setProgress( 100 * iter.progress( mBand ) );
821 auto fuzzifiedBlock = std::make_unique<QgsRasterBlock>( destinationProvider->
dataType( 1 ), iterCols, iterRows );
823 for (
int row = 0; row < iterRows; row++ )
827 for (
int column = 0; column < iterCols; column++ )
832 const double value = rasterBlock->valueAndNoData( row, column, isNoData );
833 double fuzzifiedValue;
837 fuzzifiedValue = mNoDataValue;
841 fuzzifiedValue = 1 / ( 1 + mFuzzifySpread * std::pow( value - mFuzzifyMidpoint, 2 ) );
844 fuzzifiedBlock->setValue( row, column, fuzzifiedValue );
847 if ( !destinationProvider->
writeBlock( fuzzifiedBlock.get(), mBand, iterLeft, iterTop ) )
@ Hidden
Parameter is hidden and should not be shown to users.
@ Advanced
Parameter is an advanced parameter which should be hidden from users by default.
@ Double
Double/float values.
virtual QgsError error() const
Gets current status error.
QString summary() const
Short error description, usually the first error in chain, the real error.
bool isCanceled() const
Tells whether the operation has been canceled already.
void setProgress(double progress)
Sets the current progress for the feedback object.
static std::unique_ptr< QgsFeedback > createScaledFeedback(QgsFeedback *parentFeedback, double startPercentage, double endPercentage)
Returns a feedback object whose [0, 100] progression range will be mapped to parentFeedback [startPer...
Contains information about the context in which a processing algorithm is executed.
Custom exception class for processing related exceptions.
Base class for providing feedback from a processing algorithm.
A numeric output for processing algorithms.
A string output for processing algorithms.
A raster band parameter for Processing algorithms.
A numeric parameter for processing algorithms.
A raster layer destination parameter, for specifying the destination path for a raster layer created ...
A raster layer parameter for processing algorithms.
Base class for raster data providers.
bool writeBlock(QgsRasterBlock *block, int band, int xOffset=0, int yOffset=0)
Writes pixel data from a raster block into the provider data source.
Qgis::DataType dataType(int bandNo) const override=0
Returns data type for the band specified by number.
Iterator for sequentially processing raster cells.
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...