Class: QgsRasterResampleFilter

class qgis.core.QgsRasterResampleFilter

Bases: QgsRasterInterface

Resample filter pipe for rasters.

Methods

bandCount

rtype:

int

block

param bandNo:

clone

rtype:

Optional[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:

Optional[QgsRasterResampler]

zoomedOutResampler

rtype:

Optional[QgsRasterResampler]

bandCount(self) int
Return type:

int

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

Optional[QgsRasterBlock]

clone(self) QgsRasterResampleFilter | None
Return type:

Optional[QgsRasterResampleFilter]

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

bandNo (int)

Return type:

Qgis.DataType

initHistogram(self, histogram: QgsRasterHistogram, bandNo: int, binCount: int, minimum: Any = Py_None, maximum: Any = 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 = QgsRasterBandStats.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 | None) bool
Parameters:

input (Optional[QgsRasterInterface])

Return type:

bool

setMaxOversampling(self, os: float)
Parameters:

os (float)

setZoomedInResampler(self, r: QgsRasterResampler | None)

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

Parameters:

r (Optional[QgsRasterResampler])

setZoomedOutResampler(self, r: QgsRasterResampler | None)

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

Parameters:

r (Optional[QgsRasterResampler])

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

  • parentElem (QDomElement)

zoomedInResampler(self) QgsRasterResampler | None
Return type:

Optional[QgsRasterResampler]

zoomedOutResampler(self) QgsRasterResampler | None
Return type:

Optional[QgsRasterResampler]