Class: QgsRasterVectorFieldRenderer

Raster renderer which draws a vector field stored in raster bands.

The way that the raster data is interpreted as vectors (eg. Cartesian component per band, single band with cardinal direction) can be set using setSourceMode()

Added in version 4.4.

List of all members, including inherited members

Class Hierarchy

Inheritance diagram of qgis.core.QgsRasterVectorFieldRenderer

Base classes

QgsRasterRenderer

Raster renderer pipe that applies colors to a raster.

QgsRasterInterface

Base class for processing filters like renderers, reprojector, resampler etc.

Constructor

__init__

Abstract Methods

clone

Methods

directionBand

Returns the band which holds the coded compass directions, used when the sourceMode() is Qgis.RasterVectorFieldSourceMode.EncodedDirection.

directionEncoding

Returns the scheme the directionBand() is coded with.

maximumMagnitude

Returns the magnitude the symbology treats as the largest one of the raster.

minimumMagnitude

Returns the magnitude the symbology treats as the smallest one of the raster.

setDirectionBand

Attempts to set the band which holds the coded compass directions.

setDirectionEncoding

Sets the scheme the directionBand() is coded with.

setMaximumMagnitude

Sets the magnitude the symbology treats as the largest one of the raster.

setMinimumMagnitude

Sets the magnitude the symbology treats as the smallest one of the raster.

setSettings

Sets the settings used to render the vector field.

setSourceMode

Sets the way the vectors are stored in the raster bands.

setXBand

Attempts to set the band which holds the x component of the vectors.

setYBand

Attempts to set the band which holds the y component of the vectors.

settings

Returns the settings used to render the vector field.

sourceMode

Returns the way the vectors are stored in the raster bands.

xBand

Returns the band which holds the x component of the vectors.

yBand

Returns the band which holds the y component of the vectors.

Static Methods

create

Creates an instance of the renderer based on definition from XML (used by renderer registry)

class qgis.core.QgsRasterVectorFieldRenderer[source]

Bases: QgsRasterRenderer

__init__(input: QgsRasterInterface | None)

Creates a vector field renderer

Parameters:

input (QgsRasterInterface|None)

abstract clone(self) → QgsRasterVectorFieldRenderer | None[source]
Return type:

QgsRasterVectorFieldRenderer|None

static create(elem: QDomElement, input: QgsRasterInterface | None) → QgsRasterRenderer | None

Creates an instance of the renderer based on definition from XML (used by renderer registry)

Parameters:
Return type:

QgsRasterRenderer|None

directionBand(self) → int[source]

Returns the band which holds the coded compass directions, used when the sourceMode() is Qgis.RasterVectorFieldSourceMode.EncodedDirection.

Return type:

int

directionEncoding(self) → Qgis.RasterDirectionEncoding[source]

Returns the scheme the directionBand() is coded with.

Return type:

Qgis.RasterDirectionEncoding

maximumMagnitude(self) → float[source]

Returns the magnitude the symbology treats as the largest one of the raster.

Note

Ignored when the sourceMode() is Qgis.RasterVectorFieldSourceMode.EncodedDirection

Return type:

float

minimumMagnitude(self) → float[source]

Returns the magnitude the symbology treats as the smallest one of the raster.

Note

Ignored when the sourceMode() is Qgis.RasterVectorFieldSourceMode.EncodedDirection

Return type:

float

setDirectionBand(self, band: int) → bool[source]

Attempts to set the band which holds the coded compass directions.

Returns True if the band was successfully set.

See also

directionBand()

Parameters:

band (int)

Return type:

bool

setDirectionEncoding(self, encoding: Qgis.RasterDirectionEncoding)[source]

Sets the scheme the directionBand() is coded with.

Parameters:

encoding (Qgis.RasterDirectionEncoding)

setMaximumMagnitude(self, magnitude: float)[source]

Sets the magnitude the symbology treats as the largest one of the raster.

Parameters:

magnitude (float)

setMinimumMagnitude(self, magnitude: float)[source]

Sets the magnitude the symbology treats as the smallest one of the raster.

Parameters:

magnitude (float)

setSettings(self, settings: QgsVectorFieldSettings)[source]

Sets the settings used to render the vector field.

See also

settings()

Parameters:

settings (QgsVectorFieldSettings)

setSourceMode(self, mode: Qgis.RasterVectorFieldSourceMode)[source]

Sets the way the vectors are stored in the raster bands.

See also

sourceMode()

Parameters:

mode (Qgis.RasterVectorFieldSourceMode)

setXBand(self, band: int) → bool[source]

Attempts to set the band which holds the x component of the vectors.

Returns True if the band was successfully set.

See also

xBand()

Parameters:

band (int)

Return type:

bool

setYBand(self, band: int) → bool[source]

Attempts to set the band which holds the y component of the vectors.

Returns True if the band was successfully set.

See also

yBand()

Parameters:

band (int)

Return type:

bool

settings(self) → QgsVectorFieldSettings[source]

Returns the settings used to render the vector field.

See also

setSettings()

Return type:

QgsVectorFieldSettings

sourceMode(self) → Qgis.RasterVectorFieldSourceMode[source]

Returns the way the vectors are stored in the raster bands.

See also

setSourceMode()

Return type:

Qgis.RasterVectorFieldSourceMode

xBand(self) → int[source]

Returns the band which holds the x component of the vectors.

See also

setXBand()

Return type:

int

yBand(self) → int[source]

Returns the band which holds the y component of the vectors.

See also

setYBand()

Return type:

int