Class: QgsRasterDataProvider¶
Base class for raster data providers.
Note
This is an abstract class, with methods which must be implemented by a subclass.
The following methods must be implemented: QgsRasterInterface.bandCount()
, QgsDataProvider.crs()
, QgsDataProvider.description()
, QgsDataProvider.isValid()
, lastError()
, lastErrorTitle()
, QgsDataProvider.name()
Class Hierarchy¶
Base classes¶
Abstract base class for spatial data provider implementations. |
|
Base class for processing filters like renderers, reprojector, resampler etc. |
Enums
alias of |
|
alias of |
Abstract Methods
Returns the verbose error text for the last error in this provider |
|
Returns the caption error text for the last error in this provider |
Methods
Returns the (possibly |
|
Returns a string color name representation of a color interpretation. |
|
Copy member variables from other raster data provider. |
|
Returns the dpi of the output device. |
|
Returns |
|
Returns whether provider-level resampling is enabled. |
|
Returns maximum oversampling factor for zoomed-out operations. |
|
Loads the filesystem-based attribute table for the specified bandNumber from path, optionally reporting any error in errorMessage, returns |
|
Remove the attribute table for the specified bandNumber. |
|
Set the attribute table to attributeTable for the specified bandNumber, if the attributeTable is |
|
Sets the output device resolution. |
|
Returns |
|
Writes pixel data from a raster block into the provider data source. |
|
Writes the filesystem-based attribute table for the specified bandNumber to path, optionally reporting any error in errorMessage, returns |
|
Returns resampling method for zoomed-in operations. |
|
Returns resampling method for zoomed-out operations. |
Virtual Methods
In PyQGIS, only methods marked as virtual
can be safely overridden in a Python subclass of QgsRasterDataProvider. See the FAQ for more details.
Read band offset for raster value |
|
Read band scale for raster value |
|
Read block of data using given extent and size. |
|
Returns the raster layers pyramid list. |
|
Creates pyramid overviews. |
|
Returns data type for the band specified by number |
|
Enable or disable provider-level resampling. |
|
Returns the fields of the raster layer for data providers that expose them, the default implementation returns an empty list. |
|
Returns a new image downloader for the raster legend. |
|
Identify raster value(s) found on the point position. |
|
Returns |
|
Checks whether the provider is in editing mode, i.e. raster write operations will be accepted. |
|
Returns the format of the error text for the last error in this provider |
|
Returns the maximum tile size in pixels for the data provider. |
|
Returns a list of native resolutions if available, i.e. map units per pixel at which the raster source was originally created. |
|
Returns flags containing the supported capabilities of the data provider. |
|
Reads the native attribute table, optionally reporting any error in errorMessage, returns |
|
Reload data (data could change) |
|
Remove dataset |
|
Samples a raster value from the specified band found at the point position. |
|
Turns on/off editing mode of the provider. |
|
Sets maximum oversampling factor for zoomed-out operations. |
|
Set no data value on created dataset |
|
Sets the source nodata value usage |
|
Set resampling method to apply for zoomed-in operations. |
|
Set resampling method to apply for zoomed-out operations. |
|
Returns |
|
Value representing no data value. |
|
Step height for raster iterations. |
|
Step width for raster iterations. |
|
Returns the sublayers of this layer - useful for providers that manage their own layers, such as WMS |
|
Returns whether the provider supplies a legend graphic |
|
Transforms coordinates between source image coordinate space [0..width]x[0..height] and layer coordinate space (georeferenced coordinates). |
|
Returns the source nodata value usage |
|
Returns a list of user no data value ranges. |
|
Validates creation options for a specific dataset and destination format. |
|
Validates pyramid creation options for a specific dataset and destination format |
|
Writes into the provider datasource |
|
Static Methods
Creates a new dataset with mDataSourceURI |
|
Decodes the URI returning a struct with all the parameters for |
|
Encodes the URI starting from the struct . |
|
Converts a string formatName to a raster identify format. |
|
Converts a raster identify format to a translated string label. |
|
Converts a raster identify format to a string name. |
|
Converts a raster identify format to a capability. |
|
Returns a list of pyramid resampling method name and label pairs for given provider |
Signals
Emit a message to be displayed on status bar, usually used by network providers (WMS,WCS) |
Attributes
- class qgis.core.QgsRasterDataProvider[source]¶
Bases:
QgsDataProvider
,QgsRasterInterface
- __init__()
- __init__(uri: str | None, providerOptions: QgsDataProvider.ProviderOptions = QgsDataProvider.ProviderOptions(), flags: Qgis.DataProviderReadFlags | Qgis.DataProviderReadFlag = Qgis.DataProviderReadFlags())
Constructor for QgsRasterDataProvider.
The
uri
argument gives a provider-specific uri indicating the underlying data source and it’s parameters.The
options
argument specifies generic provider options and since QGIS 3.16 creation flags are specified within theflags
value.- Parameters:
uri (Optional[str])
providerOptions (QgsDataProvider.ProviderOptions = QgsDataProvider.ProviderOptions())
flags (Union[Qgis.DataProviderReadFlags, Qgis.DataProviderReadFlag] = Qgis.DataProviderReadFlags())
- ProviderCapabilities¶
alias of
RasterProviderCapabilities
- ProviderCapability¶
alias of
RasterProviderCapability
- ResamplingMethod¶
alias of
RasterResamplingMethod
- TransformImageToLayer = 0¶
- TransformLayerToImage = 1¶
- class TransformType¶
Bases:
int
- class VirtualRasterInputLayers¶
Bases:
object
Struct that stores information of the raster used in
QgsVirtualRasterProvider
for the calculations, this struct is stored in the DecodedUriParametersNote
used by
QgsVirtualRasterProvider
only- provider¶
- class VirtualRasterParameters¶
Bases:
object
Struct that stores the information about the parameters that should be given to the
QgsVirtualRasterProvider
through theQgsRasterDataProvider
.DecodedUriParametersNote
used by
QgsVirtualRasterProvider
only- formula¶
- height¶
- rInputLayers¶
- width¶
- attributeTable(self, bandNumber: int) QgsRasterAttributeTable | None [source]¶
Returns the (possibly
None
) attribute table for the specifiedbandNumber
.Added in version 3.30.
- Parameters:
bandNumber (int)
- Return type:
Optional[QgsRasterAttributeTable]
- virtual bandDescription(self, bandNumber: int) str [source]¶
- Parameters:
bandNumber (int)
- Return type:
str
- virtual bandOffset(self, bandNo: int) float [source]¶
Read band offset for raster value
- Parameters:
bandNo (int)
- Return type:
float
- virtual bandScale(self, bandNo: int) float [source]¶
Read band scale for raster value
- Parameters:
bandNo (int)
- Return type:
float
- virtual block(self, bandNo: int, boundingBox: QgsRectangle, width: int, height: int, feedback: QgsRasterBlockFeedback | None = None) QgsRasterBlock | None [source]¶
Read block of data using given extent and size.
- Parameters:
bandNo (int)
boundingBox (QgsRectangle)
width (int)
height (int)
feedback (Optional[QgsRasterBlockFeedback] = None)
- Return type:
Optional[QgsRasterBlock]
- virtual buildPyramidList(self, overviewList: Iterable[int] = []) List[QgsRasterPyramid] ¶
Returns the raster layers pyramid list.
This method returns a list of pyramid layers which are valid for the data provider. The returned list is a complete list of all possible layers, and includes both pyramids layers which currently exist and layers which have not yet been constructed. To know which of the pyramid layers ACTUALLY exists you need to look at the
QgsRasterPyramid.getExists()
member for each value in the list.The returned list is suitable for passing to the
buildPyramids()
method. First, modify the returned list by calling QgsRasterPyramid.setBuild( ``True` )` for every layer you want to create pyramids for, and then pass the modified list tobuildPyramids()
.- Parameters:
overviewList (Iterable[int] = []) – used to construct the pyramid list (optional), when empty the list is defined by the provider.
See also
See also
- Return type:
List[QgsRasterPyramid]
- virtual buildPyramids(self, pyramidList: Iterable[QgsRasterPyramid], resamplingMethod: str | None = '', format: Qgis.RasterPyramidFormat = Qgis.RasterPyramidFormat.GeoTiff, configOptions: Iterable[str | None] = [], feedback: QgsRasterBlockFeedback | None = None) str [source]¶
Creates pyramid overviews.
- Parameters:
pyramidList (Iterable[QgsRasterPyramid]) – a list of
QgsRasterPyramids
to create overviews for. TheQgsRasterPyramid.setBuild()
flag should be set toTrue
for every layer where pyramids are desired.resamplingMethod (Optional[str] = '') – resampling method to use when creating the pyramids. The
pyramidResamplingMethods()
method can be used to retrieve a list of valid resampling methods available for specific raster data providers.format (Qgis.RasterPyramidFormat = Qgis.RasterPyramidFormat.GeoTiff) – raster pyramid format.
configOptions (Iterable[Optional[str]] = []) – optional configuration options which are passed to the specific data provider for use during pyramid creation.
feedback (Optional[QgsRasterBlockFeedback] = None) – optional feedback argument for progress reports and cancellation support.
See also
See also
See also
- Return type:
str
- virtual colorInterpretation(self, bandNo: int) Qgis.RasterColorInterpretation [source]¶
Returns data type for the band specified by number
- Parameters:
bandNo (int)
- Return type:
- colorName(self, colorInterpretation: Qgis.RasterColorInterpretation) str [source]¶
Returns a string color name representation of a color interpretation. It is translated since QGIS 3.40
- Parameters:
colorInterpretation (Qgis.RasterColorInterpretation)
- Return type:
str
- virtual colorTable(self, bandNo: int) List[QgsColorRampShader.ColorRampItem] ¶
- Parameters:
bandNo (int)
- Return type:
- copyBaseSettings(self, other: QgsRasterDataProvider)[source]¶
Copy member variables from other raster data provider. Useful for implementation of
clone()
method in subclasses- Parameters:
other (QgsRasterDataProvider)
- static create(providerKey: str | None, uri: str | None, format: str | None, nBands: int, type: Qgis.DataType, width: int, height: int, crs: QgsCoordinateReferenceSystem, createOptions: Iterable[str | None] = [])[source]¶
Creates a new dataset with mDataSourceURI
- Parameters:
providerKey (Optional[str])
uri (Optional[str])
format (Optional[str])
nBands (int)
type (Qgis.DataType)
width (int)
height (int)
createOptions (Iterable[Optional[str]] = []) -> (Optional[QgsRasterDataProvider])
- static decodeVirtualRasterProviderUri(uri: str | None)[source]¶
Decodes the URI returning a struct with all the parameters for
QgsVirtualRasterProvider
classNote
used by Virtual Raster Provider only
Note
since QGIS 3.22
- Parameters:
uri (Optional[str]) -> (QgsRasterDataProvider.VirtualRasterParameters)
- virtual enableProviderResampling(self, enable: bool) bool [source]¶
Enable or disable provider-level resampling.
- Return type:
bool
- Returns:
True
if success
Added in version 3.16.
- Parameters:
enable (bool)
- static encodeVirtualRasterProviderUri(parts: QgsRasterDataProvider.VirtualRasterParameters) str [source]¶
Encodes the URI starting from the struct .
Note
used by Virtual Raster Provider only
Note
since QGIS 3.22
- Parameters:
- Return type:
str
- virtual fields(self) QgsFields [source]¶
Returns the fields of the raster layer for data providers that expose them, the default implementation returns an empty list.
Added in version 3.14.
- Return type:
- virtual getLegendGraphicFetcher(self, mapSettings: QgsMapSettings | None) QgsImageFetcher | None [source]¶
Returns a new image downloader for the raster legend.
- Parameters:
mapSettings (Optional[QgsMapSettings]) – map settings for legend providers supporting contextual legends.
- Return type:
Optional[QgsImageFetcher]
- Returns:
a download handler or
None
if the provider does not support legend at all. Ownership of the returned object is transferred to caller.
- hasPyramids(self) bool [source]¶
Returns
True
if raster has at least one existing pyramid.The
buildPyramidList()
method can be used to retrieve additional details about potential and existing pyramid layers.See also
See also
- Return type:
bool
- virtual identify(self, point: QgsPointXY, format: Qgis.RasterIdentifyFormat, boundingBox: QgsRectangle = QgsRectangle(), width: int = 0, height: int = 0, dpi: int = 96) QgsRasterIdentifyResult [source]¶
Identify raster value(s) found on the point position. The context parameters extent, width and height are important to identify on the same zoom level as a displayed map and to do effective caching (WCS). If context params are not specified the highest resolution is used.
capabilities()
may be used to test if format is supported by provider. Values are set to ‘no data’ or empty string if point is outside data source extent.- Parameters:
point (QgsPointXY) – coordinates in data source CRS
format (Qgis.RasterIdentifyFormat) – result format
boundingBox (
QgsRectangle
= QgsRectangle()) – context bounding boxwidth (int = 0) – context width
height (int = 0) – context height
dpi (int = 96) – context dpi
- Return type:
- Returns:
QgsRaster
.IdentifyFormatValue: map of values for each band, keys are band numbers (from 1).QgsRaster
.IdentifyFormatFeature: map ofQgsRasterFeatureList
for each sublayerQgsRaster
.IdentifyFormatHtml: map of HTML strings for each sublayer (WMS). Empty if failed or there are no results.
Note
The arbitraryness of the returned document is enforced by WMS standards up to at least v1.3.0
See also
sample()
which is much more efficient for simple “value at point” queries.
- static identifyFormatFromName(formatName: str | None) Qgis.RasterIdentifyFormat [source]¶
Converts a string
formatName
to a raster identify format.See also
- Parameters:
formatName (Optional[str])
- Return type:
- static identifyFormatLabel(format: Qgis.RasterIdentifyFormat) str [source]¶
Converts a raster identify
format
to a translated string label.- Parameters:
format (Qgis.RasterIdentifyFormat)
- Return type:
str
- static identifyFormatName(format: Qgis.RasterIdentifyFormat) str [source]¶
Converts a raster identify
format
to a string name.See also
- Parameters:
format (Qgis.RasterIdentifyFormat)
- Return type:
str
- static identifyFormatToCapability(format: Qgis.RasterIdentifyFormat) Qgis.RasterInterfaceCapability [source]¶
Converts a raster identify
format
to a capability.- Parameters:
format (Qgis.RasterIdentifyFormat)
- Return type:
- virtual ignoreExtents(self) bool [source]¶
Returns
True
if the extents reported by the data provider are not reliable and it’s possible that there is renderable content outside of these extents.Added in version 3.10.0.
- Return type:
bool
- virtual isEditable(self) bool [source]¶
Checks whether the provider is in editing mode, i.e. raster write operations will be accepted. By default providers are not editable. Use
setEditable()
method to enable/disable editing.See also
See also
- Return type:
bool
- isProviderResamplingEnabled(self) bool [source]¶
Returns whether provider-level resampling is enabled.
Note
Resampling is effective only if
zoomedInResamplingMethod()
and/orzoomedOutResamplingMethod()
return non-nearest resampling.See also
See also
See also
Added in version 3.16.
- Return type:
bool
- abstract lastError(self) str [source]¶
Returns the verbose error text for the last error in this provider
If an operation returns 0 (e.g.
draw()
), this function returns the text of the error associated with the failure. Interactive users of this provider can then, for example, call a QMessageBox to display the contents.- Return type:
str
- virtual lastErrorFormat(self) str [source]¶
Returns the format of the error text for the last error in this provider
- Return type:
str
- abstract lastErrorTitle(self) str [source]¶
Returns the caption error text for the last error in this provider
If an operation returns 0 (e.g.
draw()
), this function returns the text of the error associated with the failure. Interactive users of this provider can then, for example, call a QMessageBox to display the contents.- Return type:
str
- maxOversampling(self) float [source]¶
Returns maximum oversampling factor for zoomed-out operations.
Added in version 3.16.
- Return type:
float
- virtual maximumTileSize(self) QSize [source]¶
Returns the maximum tile size in pixels for the data provider. By default, the maximum tile size is set to
QgsRasterIterator
.DEFAULT_MAXIMUM_TILE_WIDTH xQgsRasterIterator
.DEFAULT_MAXIMUM_TILE_HEIGHT but can be overridden in subclasses (e.g. WMS can retrieve that information from the GetCapabilities document).Added in version 3.40.
- Return type:
QSize
- virtual nativeResolutions(self) List[float] ¶
Returns a list of native resolutions if available, i.e. map units per pixel at which the raster source was originally created.
Resolutions are calculated in the provider’s
crs()
.Added in version 3.8.0.
- Return type:
List[float]
- virtual providerCapabilities(self) Qgis.RasterProviderCapabilities [source]¶
Returns flags containing the supported capabilities of the data provider.
- Return type:
- static pyramidResamplingMethods(providerKey: str | None) List[Tuple[str, str]] ¶
Returns a list of pyramid resampling method name and label pairs for given provider
- Parameters:
providerKey (Optional[str])
- Return type:
List[Tuple[str, str]]
- readFileBasedAttributeTable(self, bandNumber: int, path: str | None)[source]¶
Loads the filesystem-based attribute table for the specified
bandNumber
frompath
, optionally reporting any error inerrorMessage
, returnsTrue
on success.- Returns:
True
on success
Added in version 3.30.
- Parameters:
bandNumber (int)
path (Optional[str]) -> (bool)
- virtual readNativeAttributeTable(self)[source]¶
Reads the native attribute table, optionally reporting any error in
errorMessage
, returnsTrue
on success. The default implementation does nothing and returnsFalse
. Data providers that have NativeRasterAttributeTable provider capability will try to read the native attribute table.- Returns:
True
on success
Added in version 3.30.
- removeAttributeTable(self, bandNumber: int)[source]¶
Remove the attribute table for the specified
bandNumber
. If the attribute table does not exist this method does nothing.Added in version 3.30.
- Parameters:
bandNumber (int)
- virtual sample(self, point: QgsPointXY, band: int, boundingBox: QgsRectangle = QgsRectangle(), width: int = 0, height: int = 0, dpi: int = 96)[source]¶
Samples a raster value from the specified
band
found at thepoint
position. The context parametersboundingBox
,width
andheight
are important to identify on the same zoom level as a displayed map and to do effective caching (WCS). If context params are not specified the highest resolution is used.If
ok
is specified and the point is outside data source extent, or an invalid band number was specified, thenok
will be set toFalse
. In this case the function will return a NaN value.See also
identify()
which is much more flexible but considerably less efficient.Added in version 3.4.
- Parameters:
point (QgsPointXY)
band (int)
boundingBox (
QgsRectangle
= QgsRectangle())width (int = 0)
height (int = 0)
dpi (int = 96) -> (float)
- setAttributeTable(self, bandNumber: int, attributeTable: QgsRasterAttributeTable | None)[source]¶
Set the attribute table to
attributeTable
for the specifiedbandNumber
, if theattributeTable
isNone
any existing attribute table for the specified band will be removed.Note
Ownership of the attribute table is transferred to the provider.
Added in version 3.30.
- Parameters:
bandNumber (int)
attributeTable (Optional[QgsRasterAttributeTable])
- virtual setEditable(self, enabled: bool) bool [source]¶
Turns on/off editing mode of the provider. When in editing mode, it is possible to overwrite data of the provider using
writeBlock()
calls.- Return type:
bool
- Returns:
True
if the switch to/from editing mode was successful
Note
Only some providers support editing mode and even those may fail to turn the underlying data source into editing mode, so it is necessary to check the return value whether the operation was successful.
See also
See also
- Parameters:
enabled (bool)
- virtual setMaxOversampling(self, factor: float) bool [source]¶
Sets maximum oversampling factor for zoomed-out operations.
- Return type:
bool
- Returns:
True
if success
Added in version 3.16.
- Parameters:
factor (float)
- virtual setNoDataValue(self, bandNo: int, noDataValue: float) bool [source]¶
Set no data value on created dataset
- Parameters:
bandNo (int) – band number
noDataValue (float) – no data value
- Return type:
bool
- virtual setUseSourceNoDataValue(self, bandNo: int, use: bool)[source]¶
Sets the source nodata value usage
- Parameters:
bandNo (int)
use (bool)
- virtual setUserNoDataValue(self, bandNo: int, noData: Iterable[QgsRasterRange])[source]¶
- Parameters:
bandNo (int)
noData (Iterable[QgsRasterRange])
- virtual setZoomedInResamplingMethod(self, method: Qgis.RasterResamplingMethod) bool [source]¶
Set resampling method to apply for zoomed-in operations.
- Return type:
bool
- Returns:
True
if success
Added in version 3.16.
- Parameters:
method (Qgis.RasterResamplingMethod)
- virtual setZoomedOutResamplingMethod(self, method: Qgis.RasterResamplingMethod) bool [source]¶
Set resampling method to apply for zoomed-out operations.
- Return type:
bool
- Returns:
True
if success
Added in version 3.16.
- Parameters:
method (Qgis.RasterResamplingMethod)
- virtual sourceHasNoDataValue(self, bandNo: int) bool [source]¶
Returns
True
if source band has no data value- Parameters:
bandNo (int)
- Return type:
bool
- virtual sourceNoDataValue(self, bandNo: int) float [source]¶
Value representing no data value.
- Parameters:
bandNo (int)
- Return type:
float
- signal statusChanged[source]¶
Emit a message to be displayed on status bar, usually used by network providers (WMS,WCS)
- virtual subLayers(self) List[str] [source]¶
Returns the sublayers of this layer - useful for providers that manage their own layers, such as WMS
- Return type:
List[str]
- virtual supportsLegendGraphic(self) bool [source]¶
Returns whether the provider supplies a legend graphic
- Return type:
bool
- virtual transformCoordinates(self, point: QgsPoint, type: QgsRasterDataProvider.TransformType) QgsPoint [source]¶
Transforms coordinates between source image coordinate space [0..width]x[0..height] and layer coordinate space (georeferenced coordinates). Often this transformation is a simple 2D affine transformation (offset and scaling), but rasters with different georeferencing methods like GCPs (ground control points) or RPCs (rational polynomial coefficients) may require a more complex transform.
If the transform fails (input coordinates are outside of the valid range or data provider does not support this functionality), an empty point is returned.
Added in version 3.14.
- Parameters:
point (QgsPoint)
- Return type:
- virtual useSourceNoDataValue(self, bandNo: int) bool [source]¶
Returns the source nodata value usage
- Parameters:
bandNo (int)
- Return type:
bool
- virtual userNoDataValues(self, bandNo: int) List[QgsRasterRange] [source]¶
Returns a list of user no data value ranges.
- Parameters:
bandNo (int)
- Return type:
List[QgsRasterRange]
- userNoDataValuesContains(self, bandNo: int, value: float) bool [source]¶
Returns
True
if user no data contains value- Parameters:
bandNo (int)
value (float)
- Return type:
bool
- virtual validateCreationOptions(self, createOptions: Iterable[str | None], format: str | None) str [source]¶
Validates creation options for a specific dataset and destination format.
Note
used by GDAL provider only
Note
see also
validateCreationOptionsFormat()
in gdal provider for validating options based on format only- Parameters:
createOptions (Iterable[Optional[str]])
format (Optional[str])
- Return type:
str
- virtual validatePyramidsConfigOptions(self, pyramidsFormat: Qgis.RasterPyramidFormat, configOptions: Iterable[str | None], fileFormat: str | None) str [source]¶
Validates pyramid creation options for a specific dataset and destination format
Note
used by GDAL provider only
- Parameters:
pyramidsFormat (Qgis.RasterPyramidFormat)
configOptions (Iterable[Optional[str]])
fileFormat (Optional[str])
- Return type:
str
- virtual write(self, data: PyQt5.sip.voidptr | None, band: int, width: int, height: int, xOffset: int, yOffset: int) bool [source]¶
Writes into the provider datasource
- Parameters:
data (Optional[PyQt5.sip.voidptr])
band (int)
width (int)
height (int)
xOffset (int)
yOffset (int)
- Return type:
bool
- writeBlock(self, block: QgsRasterBlock | None, band: int, xOffset: int = 0, yOffset: int = 0) bool [source]¶
Writes pixel data from a raster block into the provider data source.
This will override previously stored pixel values. It is assumed that cells in the passed raster block are aligned with the cells of the data source. If raster block does not cover the whole area of the data source, only a subset of pixels covered by the raster block will be overwritten. By default, writing of raster data starts from the first cell of the raster - it is possible to set offset in pixels by specifying non-zero xOffset and yOffset values.
Writing is supported only by some data providers. Provider has to be in editing mode in order to allow write operations.
See also
See also
- Return type:
bool
- Returns:
True
on success- Parameters:
block (Optional[QgsRasterBlock])
band (int)
xOffset (int = 0)
yOffset (int = 0)
- writeFileBasedAttributeTable(self, bandNumber: int, path: str | None)[source]¶
Writes the filesystem-based attribute table for the specified
bandNumber
topath
, optionally reporting any error inerrorMessage
, returnsTrue
on success.- Returns:
True
on success
Note
No checks for Raster Attribute Table validity are performed when saving, it is client code responsibility to handle validation.
Added in version 3.30.
- Parameters:
bandNumber (int)
path (Optional[str]) -> (bool)
- zoomedInResamplingMethod(self) Qgis.RasterResamplingMethod [source]¶
Returns resampling method for zoomed-in operations.
Added in version 3.16.
- Return type:
- zoomedOutResamplingMethod(self) Qgis.RasterResamplingMethod [source]¶
Returns resampling method for zoomed-out operations.
Added in version 3.16.
- Return type: