Class: QgsMeshRendererVectorWindBarbSettings

class qgis.core.QgsMeshRendererVectorWindBarbSettings

Bases: sip.wrapper

Represents a mesh renderer settings for vector datasets displayed with wind barbs

Note

The API is considered EXPERIMENTAL and can be changed without a notice

Added in version 3.38:

Enums

WindSpeedUnit

Bases: enum.IntEnum

Methods

magnitudeMultiplier

Returns the multiplier for the magnitude to convert it to knots, according to the units set with setMagnitudeUnits() A custom multiplier can be set with setMagnitudeMultiplier() for the case when units are set to OtherUnit

magnitudeUnits

Returns the units that the data are in

readXml

Reads configuration from the given DOM element

setMagnitudeMultiplier

Sets a multiplier for the magnitude to convert it to knots

setMagnitudeUnits

Sets the units that the data are in

setShaftLength

Sets the shaft length (in millimeters)

setShaftLengthUnits

Returns the units for the shaft length

shaftLength

Returns the shaft length (in millimeters)

shaftLengthUnits

Sets the units for the shaft length

writeXml

Writes configuration to a new DOM element

class WindSpeedUnit(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: enum.IntEnum

Wind speed units. Wind barbs use knots so we use this enum for preset conversion values

  • MetersPerSecond: Meters per second

  • KilometersPerHour: Kilometers per hour

  • Knots: Knots (Nautical miles per hour)

  • MilesPerHour: Miles per hour

  • FeetPerSecond: Feet per second

  • OtherUnit: Other unit

FeetPerSecond = 4
KilometersPerHour = 1
Knots = 2
MetersPerSecond = 0
MilesPerHour = 3
OtherUnit = 5
magnitudeMultiplier(self) float

Returns the multiplier for the magnitude to convert it to knots, according to the units set with setMagnitudeUnits() A custom multiplier can be set with setMagnitudeMultiplier() for the case when units are set to OtherUnit

Return type:

float

magnitudeUnits(self) QgsMeshRendererVectorWindBarbSettings.WindSpeedUnit

Returns the units that the data are in

Return type:

QgsMeshRendererVectorWindBarbSettings.WindSpeedUnit

readXml(self, elem: QDomElement)

Reads configuration from the given DOM element

Parameters:

elem (QDomElement)

setMagnitudeMultiplier(self, magnitudeMultiplier: float)

Sets a multiplier for the magnitude to convert it to knots

Parameters:

magnitudeMultiplier (float)

setMagnitudeUnits(self, units: QgsMeshRendererVectorWindBarbSettings.WindSpeedUnit)

Sets the units that the data are in

Parameters:

units (QgsMeshRendererVectorWindBarbSettings.WindSpeedUnit)

setShaftLength(self, shaftLength: float)

Sets the shaft length (in millimeters)

Parameters:

shaftLength (float)

setShaftLengthUnits(self, shaftLengthUnit: Qgis.RenderUnit)

Returns the units for the shaft length

Parameters:

shaftLengthUnit (Qgis.RenderUnit)

shaftLength(self) float

Returns the shaft length (in millimeters)

Return type:

float

shaftLengthUnits(self) Qgis.RenderUnit

Sets the units for the shaft length

Return type:

Qgis.RenderUnit

writeXml(self, doc: QDomDocument) QDomElement

Writes configuration to a new DOM element

Parameters:

doc (QDomDocument)

Return type:

QDomElement