Class: QgsRasterResampleFilter

class qgis.core.QgsRasterResampleFilter

Bases: QgsRasterInterface

Resample filter pipe for rasters.

Methods

bandCount

rtype:

int

block

param bandNo:

clone

rtype:

QgsRasterResampleFilter

dataType

param bandNo:

initHistogram

Fill in histogram defaults if not specified

initStatistics

Fill in statistics defaults if not specified

maxOversampling

rtype:

float

readXml

Sets base class members from xml.

setInput

param input:

setMaxOversampling

param os:

setZoomedInResampler

Sets resampler for zoomed in scales.

setZoomedOutResampler

Sets resampler for zoomed out scales.

writeXml

param doc:

zoomedInResampler

rtype:

QgsRasterResampler

zoomedOutResampler

rtype:

QgsRasterResampler

bandCount(self) int
Return type:

int

block(self, bandNo: int, extent: QgsRectangle, width: int, height: int, feedback: QgsRasterBlockFeedback = None) QgsRasterBlock
Parameters:
Return type:

QgsRasterBlock

clone(self) QgsRasterResampleFilter
Return type:

QgsRasterResampleFilter

dataType(self, bandNo: int) Qgis.DataType
Parameters:

bandNo (int) –

Return type:

Qgis.DataType

initHistogram(self, histogram: QgsRasterHistogram, bandNo: int, binCount: int, minimum: object = Py_None, maximum: object = Py_None, boundingBox: QgsRectangle = QgsRectangle(), sampleSize: int = 0, includeOutOfRange: bool = False)

Fill in histogram defaults if not specified

Note

the parameters are the same as in histogram()

initStatistics(self, statistics: QgsRasterBandStats, bandNo: int, stats: int, boundingBox: QgsRectangle = QgsRectangle(), binCount: int = 0)

Fill in statistics defaults if not specified

Deprecated since version Use: Qgis.RasterBandStatistic instead of int for stats argument

initStatistics(self, statistics: QgsRasterBandStats, bandNo: int, stats: Union[Qgis.RasterBandStatistics, Qgis.RasterBandStatistic] = Qgis.RasterBandStatistic.All, boundingBox: QgsRectangle = QgsRectangle(), binCount: int = 0) Fill in statistics defaults if not specified

maxOversampling(self) float
Return type:

float

readXml(self, filterElem: QDomElement)

Sets base class members from xml. Usually called from create() methods of subclasses

Parameters:

filterElem (QDomElement) –

setInput(self, input: QgsRasterInterface) bool
Parameters:

input (QgsRasterInterface) –

Return type:

bool

setMaxOversampling(self, os: float)
Parameters:

os (float) –

setZoomedInResampler(self, r: QgsRasterResampler)

Sets resampler for zoomed in scales. Takes ownership of the object

Parameters:

r (QgsRasterResampler) –

setZoomedOutResampler(self, r: QgsRasterResampler)

Sets resampler for zoomed out scales. Takes ownership of the object

Parameters:

r (QgsRasterResampler) –

writeXml(self, doc: QDomDocument, parentElem: QDomElement)
Parameters:
  • doc (QDomDocument) –

  • parentElem (QDomElement) –

zoomedInResampler(self) QgsRasterResampler
Return type:

QgsRasterResampler

zoomedOutResampler(self) QgsRasterResampler
Return type:

QgsRasterResampler