Class: QgsRasterProjector¶
- class qgis.core.QgsRasterProjector¶
Bases:
QgsRasterInterface
QgsRasterProjector
implements approximate projection support for it calculates grid of points in source CRS for target CRS + extent which are used to calculate affine transformation matrices.Methods
- rtype:
int
- param bandNo:
- rtype:
QgsRasterProjector
- param bandNo:
Calculate destination extent and size from source extent and size
Returns the destination CRS
Calculate destination extent and size from source extent and size
Fill in histogram defaults if not specified
Fill in statistics defaults if not specified
- rtype:
QgsRasterProjector.Precision
- param precision:
Sets the source and destination CRS
- param precision:
Returns the source CRS
Attributes
- Approximate = 0¶
- Exact = 1¶
- class Precision¶
Bases:
int
- baseClass¶
alias of
QgsRasterProjector
- bandCount(self) int ¶
- Return type:
int
- block(self, bandNo: int, extent: QgsRectangle, width: int, height: int, feedback: QgsRasterBlockFeedback = None) QgsRasterBlock ¶
- Parameters:
bandNo (int) –
extent (QgsRectangle) –
width (int) –
height (int) –
feedback (
QgsRasterBlockFeedback
= None) –
- Return type:
- clone(self) QgsRasterProjector ¶
- Return type:
- dataType(self, bandNo: int) Qgis.DataType ¶
- Parameters:
bandNo (int) –
- Return type:
- destExtentSize(self, srcExtent: QgsRectangle, srcXSize: int, srcYSize: int) Tuple[bool, QgsRectangle, int, int] ¶
Calculate destination extent and size from source extent and size
- Parameters:
srcExtent (QgsRectangle) –
srcXSize (int) –
srcYSize (int) –
- Return type:
Tuple[bool,
QgsRectangle
, int, int]
- destinationCrs(self) QgsCoordinateReferenceSystem ¶
Returns the destination CRS
- Return type:
- extentSize(ct: QgsCoordinateTransform, srcExtent: QgsRectangle, srcXSize: int, srcYSize: int) Tuple[bool, QgsRectangle, int, int] ¶
Calculate destination extent and size from source extent and size
- Parameters:
ct (QgsCoordinateTransform) –
srcExtent (QgsRectangle) –
srcXSize (int) –
srcYSize (int) –
- Return type:
Tuple[bool,
QgsRectangle
, int, int]
- 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 = QgsRasterBandStats.All, boundingBox: QgsRectangle = QgsRectangle(), binCount: int = 0)¶
Fill in statistics defaults if not specified
- precision(self) QgsRasterProjector.Precision ¶
- Return type:
- precisionLabel(precision: QgsRasterProjector.Precision) str ¶
- Parameters:
precision (QgsRasterProjector.Precision) –
- Return type:
str
- setCrs(self, srcCRS: QgsCoordinateReferenceSystem, destCRS: QgsCoordinateReferenceSystem, srcDatumTransform: int = -1, destDatumTransform: int = -1)¶
Sets the source and destination CRS
Deprecated since version QGIS: 3.8 use transformContext version instead
setCrs(self, srcCRS:
QgsCoordinateReferenceSystem
, destCRS:QgsCoordinateReferenceSystem
, transformContext:QgsCoordinateTransformContext
) Sets source CRS tosrcCRS
and destination CRS todestCRS
and the transformation context totransformContext
New in version 3.8.
- Parameters:
srcCRS (QgsCoordinateReferenceSystem) –
destCRS (QgsCoordinateReferenceSystem) –
srcDatumTransform (int = -1) –
destDatumTransform (int = -1) –
- setPrecision(self, precision: QgsRasterProjector.Precision)¶
- Parameters:
precision (QgsRasterProjector.Precision) –
- sourceCrs(self) QgsCoordinateReferenceSystem ¶
Returns the source CRS
- Return type:
- staticMetaObject = <PyQt5.QtCore.QMetaObject object>¶