Class: QgsVectorFieldSymbolLayer¶
- class qgis.core.QgsVectorFieldSymbolLayer¶
Bases:
QgsMarkerSymbolLayer
A symbol layer class for displaying displacement arrows based on point layer attributes.
Methods
- rtype
QgsVectorFieldSymbolLayer.AngleOrientation
- rtype
QgsVectorFieldSymbolLayer.AngleUnits
- rtype
QRectF
- rtype
QgsVectorFieldSymbolLayer
- rtype
QColor
Copies all data defined properties of this layer to another symbol layer.
Copies paint effect of this layer to another symbol layer
Creates the symbol layer
- param element
- rtype
QgsMapUnitScale
Returns the units for the distance.
- param context
- rtype
bool
- rtype
str
- rtype
QgsMapUnitScale
Calculates the required marker offset, including both the symbol offset and any displacement required to align with the marker's anchor point.
Calculates the required marker offset, including both the symbol offset and any displacement required to align with the marker's anchor point.
- rtype
QgsUnitTypes.RenderUnit
- rtype
Dict[str, Any]
- param point
Restores older data defined properties from string map.
- rtype
float
- param orientation
- param units
- param color
- param scale
Sets the units for the distance.
- param scale
- param unit
- param s
- param symbol
- param type
- param attribute
- param attribute
- param context
- param context
- rtype
QgsSymbol
- param doc
- param context
- rtype
bool
- rtype
QgsVectorFieldSymbolLayer.VectorFieldType
- rtype
str
- rtype
str
Attributes
- 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
- angleUnits(self) QgsVectorFieldSymbolLayer.AngleUnits ¶
- Return type
- bounds(self, Union[QPointF, QPoint], QgsSymbolRenderContext) QRectF ¶
- Return type
QRectF
- clone(self) QgsVectorFieldSymbolLayer ¶
- Return type
- color(self) QColor ¶
- Return type
QColor
- copyDataDefinedProperties(self, destLayer: QgsSymbolLayer)¶
Copies all data defined properties of this layer to another symbol layer.
- Parameters
destLayer – destination layer
- copyPaintEffect(self, destLayer: QgsSymbolLayer)¶
Copies paint effect of this layer to another symbol layer
- Parameters
destLayer – destination layer
New in version 2.9.
- create(properties: Dict[str, Any] = {}) QgsSymbolLayer ¶
Creates the symbol layer
- Parameters
properties (Dict[str) –
- Return type
- createFromSld(element: QDomElement) QgsSymbolLayer ¶
- Parameters
element (QDomElement) –
- Return type
- distanceMapUnitScale(self) QgsMapUnitScale ¶
- Return type
- distanceUnit(self) QgsUnitTypes.RenderUnit ¶
Returns the units for the distance.
See also
- Return type
- drawPreviewIcon(self, context: QgsSymbolRenderContext, size: QSize)¶
- Parameters
context (QgsSymbolRenderContext) –
size (QSize) –
- hasDataDefinedProperties(self) bool ¶
- Return type
bool
- layerType(self) str ¶
- Return type
str
- mapUnitScale(self) QgsMapUnitScale ¶
- Return type
- markerOffset(self, context: QgsSymbolRenderContext) Tuple[float, float] ¶
Calculates the required marker offset, including both the symbol offset and any displacement required to align with the marker’s anchor point.
- Parameters
context – symbol render context
offsetX – will be set to required horizontal offset (in painter units)
offsetY – will be set to required vertical offset (in painter units)
- markerOffset2(self, context: QgsSymbolRenderContext, width: float, height: float, widthUnit: QgsUnitTypes.RenderUnit, heightUnit: QgsUnitTypes.RenderUnit, widthMapUnitScale: QgsMapUnitScale, heightMapUnitScale: QgsMapUnitScale) Tuple[float, float] ¶
Note
available in Python bindings as markerOffset2
- markerOffsetWithWidthAndHeight(self, context: QgsSymbolRenderContext, width: float, height: float) Tuple[float, float] ¶
Calculates the required marker offset, including both the symbol offset and any displacement required to align with the marker’s anchor point.
- Parameters
context – symbol render context
width – marker width
height – marker height
offsetX – will be set to required horizontal offset (in painter units)
offsetY – will be set to required vertical offset (in painter units)
Note
available in Python as markerOffsetWithWidthAndHeight
- outputUnit(self) QgsUnitTypes.RenderUnit ¶
- Return type
- properties(self) Dict[str, Any] ¶
- Return type
Dict[str, Any]
- renderPoint(self, point: Union[QPointF, QPoint], context: QgsSymbolRenderContext)¶
- Parameters
point (Union[QPointF) –
context (QgsSymbolRenderContext) –
- restoreOldDataDefinedProperties(self, stringMap: Dict[str, Any])¶
Restores older data defined properties from string map.
New in version 3.0.
- 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
- setMapUnitScale(self, scale: QgsMapUnitScale)¶
- Parameters
scale (QgsMapUnitScale) –
- setOutputUnit(self, unit: QgsUnitTypes.RenderUnit)¶
- Parameters
unit (QgsUnitTypes.RenderUnit) –
- setScale(self, s: float)¶
- Parameters
s (float) –
- setVectorFieldType(self, type: QgsVectorFieldSymbolLayer.VectorFieldType)¶
- Parameters
- 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) –
- toSld(self, doc: QDomDocument, element: QDomElement, props: Dict[str, Any])¶
- Parameters
doc (QDomDocument) –
element (QDomElement) –
props (Dict[str) –
- usedAttributes(self, context: QgsRenderContext) Set[str] ¶
- Parameters
context (QgsRenderContext) –
- Return type
Set[str]
- usesMapUnits(self) bool ¶
- Return type
bool
- vectorFieldType(self) QgsVectorFieldSymbolLayer.VectorFieldType ¶
- Return type
- xAttribute(self) str ¶
- Return type
str
- yAttribute(self) str ¶
- Return type
str