Class: QgsMeshRendererVectorWindBarbSettings

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.

class qgis.core.QgsMeshRendererVectorWindBarbSettings[source]

Bases: object

class WindSpeedUnit(*values)

Bases: 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[source]

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[source]

Returns the units that the data are in

Return type:

QgsMeshRendererVectorWindBarbSettings.WindSpeedUnit

readXml(self, elem: QDomElement)[source]

Reads configuration from the given DOM element

Parameters:

elem (QDomElement)

setMagnitudeMultiplier(self, magnitudeMultiplier: float)[source]

Sets a multiplier for the magnitude to convert it to knots

Parameters:

magnitudeMultiplier (float)

setMagnitudeUnits(self, units: QgsMeshRendererVectorWindBarbSettings.WindSpeedUnit)[source]

Sets the units that the data are in

Parameters:

units (QgsMeshRendererVectorWindBarbSettings.WindSpeedUnit)

setShaftLength(self, shaftLength: float)[source]

Sets the shaft length (in millimeters)

Parameters:

shaftLength (float)

setShaftLengthUnits(self, shaftLengthUnit: Qgis.RenderUnit)[source]

Sets the units for the shaft length.

Parameters:

shaftLengthUnit (Qgis.RenderUnit)

shaftLength(self) float[source]

Returns the shaft length (in millimeters)

Return type:

float

shaftLengthUnits(self) Qgis.RenderUnit[source]

Returns the units for the shaft length.

Return type:

Qgis.RenderUnit

writeXml(self, doc: QDomDocument) QDomElement[source]

Writes configuration to a new DOM element

Parameters:

doc (QDomDocument)

Return type:

QDomElement