Class: QgsVectorFieldSymbolLayer

class qgis.core.QgsVectorFieldSymbolLayer

Bases: QgsMarkerSymbolLayer

A symbol layer class for displaying displacement arrows based on point layer attributes*

Methods

angleOrientation

rtype

QgsVectorFieldSymbolLayer.AngleOrientation

angleUnits

rtype

QgsVectorFieldSymbolLayer.AngleUnits

bounds

rtype

QRectF

clone

rtype

QgsVectorFieldSymbolLayer

color

rtype

QColor

copyDataDefinedProperties

copyPaintEffect

create

param properties

createFromSld

param element

distanceMapUnitScale

rtype

QgsMapUnitScale

distanceUnit

Returns the units for the distance.

drawPreviewIcon

param context

hasDataDefinedProperties

rtype

bool

layerType

rtype

str

mapUnitScale

rtype

QgsMapUnitScale

markerOffset

markerOffset2

markerOffsetWithWidthAndHeight

outputUnit

rtype

QgsUnitTypes.RenderUnit

properties

rtype

Dict[str, str]

renderPoint

param point

restoreOldDataDefinedProperties

scale

rtype

float

setAngleOrientation

param orientation

setAngleUnits

param units

setColor

param color

setDistanceMapUnitScale

param scale

setDistanceUnit

Sets the units for the distance.

setMapUnitScale

param scale

setOutputUnit

param unit

setScale

param s

setSubSymbol

param symbol

setVectorFieldType

param type

setXAttribute

param attribute

setYAttribute

param attribute

startRender

param context

stopRender

param context

subSymbol

rtype

QgsSymbol

toSld

param doc

usedAttributes

param context

vectorFieldType

rtype

QgsVectorFieldSymbolLayer.VectorFieldType

xAttribute

rtype

str

yAttribute

rtype

str

Attributes

Cartesian

ClockwiseFromNorth

CounterclockwiseFromEast

Degrees

Height

Polar

Radians

class AngleOrientation

Bases: int

class AngleUnits

Bases: int

Cartesian = 0
ClockwiseFromNorth = 0
CounterclockwiseFromEast = 1
Degrees = 0
Height = 2
Polar = 1
Radians = 1
class VectorFieldType

Bases: int

angleOrientation(self) → QgsVectorFieldSymbolLayer.AngleOrientation
Return type

QgsVectorFieldSymbolLayer.AngleOrientation

angleUnits(self) → QgsVectorFieldSymbolLayer.AngleUnits
Return type

QgsVectorFieldSymbolLayer.AngleUnits

bounds(self, Union[QPointF, QPoint], QgsSymbolRenderContext) → QRectF
Return type

QRectF

clone(self)QgsVectorFieldSymbolLayer
Return type

QgsVectorFieldSymbolLayer

color(self) → QColor
Return type

QColor

copyDataDefinedProperties()
copyPaintEffect()
create(properties: Dict[str, str] = {})QgsSymbolLayer
Parameters

properties (Dict[str) –

Return type

QgsSymbolLayer

createFromSld(element: QDomElement)QgsSymbolLayer
Parameters

element (QDomElement) –

Return type

QgsSymbolLayer

distanceMapUnitScale(self)QgsMapUnitScale
Return type

QgsMapUnitScale

distanceUnit(self) → QgsUnitTypes.RenderUnit

Returns the units for the distance.

Return type

QgsUnitTypes.RenderUnit

drawPreviewIcon(self, context: QgsSymbolRenderContext, size: QSize)
Parameters
hasDataDefinedProperties(self) → bool
Return type

bool

layerType(self) → str
Return type

str

mapUnitScale(self)QgsMapUnitScale
Return type

QgsMapUnitScale

markerOffset()
markerOffset2()
markerOffsetWithWidthAndHeight()
outputUnit(self) → QgsUnitTypes.RenderUnit
Return type

QgsUnitTypes.RenderUnit

properties(self) → Dict[str, str]
Return type

Dict[str, str]

renderPoint(self, point: Union[QPointF, QPoint], context: QgsSymbolRenderContext)
Parameters
restoreOldDataDefinedProperties()
scale(self) → float
Return type

float

setAngleOrientation(self, orientation: QgsVectorFieldSymbolLayer.AngleOrientation)
Parameters

orientation (QgsVectorFieldSymbolLayer.AngleOrientation) –

setAngleUnits(self, units: QgsVectorFieldSymbolLayer.AngleUnits)
Parameters

units (QgsVectorFieldSymbolLayer.AngleUnits) –

setColor(self, color: Union[QColor, Qt.GlobalColor])
Parameters

color (Union[QColor) –

setDistanceMapUnitScale(self, scale: QgsMapUnitScale)
Parameters

scale (QgsMapUnitScale) –

setDistanceUnit(self, unit: QgsUnitTypes.RenderUnit)

Sets the units for the distance.

Parameters

unit (QgsUnitTypes.RenderUnit) – distance units

See also

distanceUnit()

setMapUnitScale(self, scale: QgsMapUnitScale)
Parameters

scale (QgsMapUnitScale) –

setOutputUnit(self, unit: QgsUnitTypes.RenderUnit)
Parameters

unit (QgsUnitTypes.RenderUnit) –

setScale(self, s: float)
Parameters

s (float) –

setSubSymbol(self, symbol: QgsSymbol) → bool
Parameters

symbol (QgsSymbol) –

Return type

bool

setVectorFieldType(self, type: QgsVectorFieldSymbolLayer.VectorFieldType)
Parameters

type (QgsVectorFieldSymbolLayer.VectorFieldType) –

setXAttribute(self, attribute: str)
Parameters

attribute (str) –

setYAttribute(self, attribute: str)
Parameters

attribute (str) –

startRender(self, context: QgsSymbolRenderContext)
Parameters

context (QgsSymbolRenderContext) –

stopRender(self, context: QgsSymbolRenderContext)
Parameters

context (QgsSymbolRenderContext) –

subSymbol(self)QgsSymbol
Return type

QgsSymbol

toSld(self, doc: QDomDocument, element: QDomElement, props: Dict[str, str])
Parameters
  • doc (QDomDocument) –

  • element (QDomElement) –

  • props (Dict[str) –

usedAttributes(self, context: QgsRenderContext) → Set[str]
Parameters

context (QgsRenderContext) –

Return type

Set[str]

vectorFieldType(self) → QgsVectorFieldSymbolLayer.VectorFieldType
Return type

QgsVectorFieldSymbolLayer.VectorFieldType

xAttribute(self) → str
Return type

str

yAttribute(self) → str
Return type

str