Class: QgsRasterPipe¶
- class qgis.core.QgsRasterPipe¶
Bases:
sip.wrapper
Constructor for QgsRasterPipe.
Base class for processing modules.
Enums
Bases:
enum.IntEnum
Methods
- param idx
- rtype
QgsBrightnessContrastFilter
Test if interface at index may be switched on/off
- rtype
QgsHueSaturationFilter
Try to insert interface at specified index and connect if connection would fail, the interface is not inserted and
False
is returned- rtype
QgsRasterInterface
- rtype
QgsRasterNuller
- rtype
QgsRasterProjector
- rtype
QgsRasterDataProvider
Remove and delete interface at given index if possible
- rtype
QgsRasterRenderer
Try to replace interface at specified index and connect if connection would fail, the interface is not inserted and
False
is returned- rtype
QgsRasterResampleFilter
Returns which stage of the pipe should apply resampling
Insert a new known interface in default place or replace interface of the same role if it already exists.
Set interface at index on/off Returns
True
on successSelect which stage of the pipe should apply resampling.
- rtype
int
Attributes
- BrightnessRole = 3¶
- HueSaturationRole = 7¶
- NullerRole = 6¶
- ProjectorRole = 5¶
- ProviderRole = 1¶
- RendererRole = 2¶
- ResamplerRole = 4¶
- class ResamplingStage(value)¶
Bases:
enum.IntEnum
Stage at which resampling occurs.
New in version 3.16.
ResampleFilter
:Provider
:
- Provider = 1¶
- ResampleFilter = 0¶
- class Role¶
Bases:
int
- UnknownRole = 0¶
- at(self, idx: int) → QgsRasterInterface¶
- Parameters
idx (int) –
- Return type
- brightnessFilter(self) → QgsBrightnessContrastFilter¶
- Return type
- canSetOn(self, idx: int, on: bool) → bool¶
Test if interface at index may be switched on/off
- Parameters
idx (int) –
on (bool) –
- Return type
bool
- hueSaturationFilter(self) → QgsHueSaturationFilter¶
- Return type
- insert(self, idx: int, interface: QgsRasterInterface) → bool¶
Try to insert interface at specified index and connect if connection would fail, the interface is not inserted and
False
is returned- Parameters
idx (int) –
interface (QgsRasterInterface) –
- Return type
bool
- last(self) → QgsRasterInterface¶
- Return type
- nuller(self) → QgsRasterNuller¶
- Return type
- projector(self) → QgsRasterProjector¶
- Return type
- provider(self) → QgsRasterDataProvider¶
- Return type
- remove(self, idx: int) → bool¶
Remove and delete interface at given index if possible
remove(self, interface:
QgsRasterInterface
) -> bool Remove and delete interface from pipe if possible- Parameters
idx (int) –
- Return type
bool
- renderer(self) → QgsRasterRenderer¶
- Return type
- replace(self, idx: int, interface: QgsRasterInterface) → bool¶
Try to replace interface at specified index and connect if connection would fail, the interface is not inserted and
False
is returned- Parameters
idx (int) –
interface (QgsRasterInterface) –
- Return type
bool
- resampleFilter(self) → QgsRasterResampleFilter¶
- Return type
- resamplingStage(self) → QgsRasterPipe.ResamplingStage¶
Returns which stage of the pipe should apply resampling
New in version 3.16.
- Return type
- set(self, interface: QgsRasterInterface) → bool¶
Insert a new known interface in default place or replace interface of the same role if it already exists. Known interfaces are:
QgsRasterDataProvider
,QgsRasterRenderer
,QgsRasterResampleFilter
,QgsRasterProjector
and their subclasses. For unknown interfaces it mus be explicitly specified position where it should be inserted usinginsert()
method.- Parameters
interface (QgsRasterInterface) –
- Return type
bool
- setOn(self, idx: int, on: bool) → bool¶
Set interface at index on/off Returns
True
on success- Parameters
idx (int) –
on (bool) –
- Return type
bool
- setResamplingStage(self, stage: QgsRasterPipe.ResamplingStage)¶
Select which stage of the pipe should apply resampling.
Provider resampling is only supported if provider sets ProviderHintCanPerformProviderResampling in
providerCapabilities()
.New in version 3.16.
- Parameters
stage (QgsRasterPipe.ResamplingStage) –
- size(self) → int¶
- Return type
int