Class: QgsPointDisplacementRenderer¶
A renderer that automatically displaces points with the same geographic location.
Class Hierarchy¶
Base classes¶
An abstract base class for distance based point renderers (e.g., clusterer and displacement renderers). |
|
Abstract base class for all 2D vector feature renderers. |
Abstract Methods
Methods
Returns the symbol for the center of a displacement group (but not ownership of the symbol). |
|
Returns the color used for drawing the displacement group circle. |
|
Returns the factor for increasing the ring size of displacement groups. |
|
Returns the line width for the displacement group circle in mm. |
|
Returns the factor for label distance from the symbol. |
|
Returns the placement method used for dispersing the points. |
|
Sets the center symbol for a displacement group. |
|
Sets the color used for drawing the displacement group circle. |
|
Sets a factor for increasing the ring size of displacement groups. |
|
Sets the line width for the displacement group circle. |
|
Sets a factor for increasing the label distances from the symbol. |
|
Sets the placement method used for dispersing the points. |
Static Methods
Creates a |
|
Create a renderer from XML element |
Attributes
- class qgis.core.QgsPointDisplacementRenderer[source]¶
Bases:
QgsPointDistanceRenderer
- __init__(labelAttributeName: str | None = '')
Constructor for QgsPointDisplacementRenderer.
- Parameters:
labelAttributeName (Optional[str] = '') – optional attribute name for labeling points
- ConcentricRings = 1¶
- Grid = 2¶
- class Placement¶
Bases:
int
- Ring = 0¶
- centerSymbol(self) QgsMarkerSymbol | None [source]¶
Returns the symbol for the center of a displacement group (but not ownership of the symbol).
See also
- Return type:
Optional[QgsMarkerSymbol]
- circleColor(self) QColor [source]¶
Returns the color used for drawing the displacement group circle.
See also
See also
- Return type:
QColor
- circleRadiusAddition(self) float [source]¶
Returns the factor for increasing the ring size of displacement groups.
See also
- Return type:
float
- circleWidth(self) float [source]¶
Returns the line width for the displacement group circle in mm.
See also
See also
- Return type:
float
- static convertFromRenderer(renderer: QgsFeatureRenderer | None) QgsPointDisplacementRenderer | None [source]¶
Creates a
QgsPointDisplacementRenderer
from an existing renderer.- Return type:
Optional[QgsPointDisplacementRenderer]
- Returns:
a new renderer if the conversion was possible, otherwise
None
.- Parameters:
renderer (Optional[QgsFeatureRenderer])
- static create(symbologyElem: QDomElement, context: QgsReadWriteContext) QgsFeatureRenderer | None [source]¶
Create a renderer from XML element
- Parameters:
symbologyElem (QDomElement)
context (QgsReadWriteContext)
- Return type:
Optional[QgsFeatureRenderer]
- drawLabels()¶
- labelDistanceFactor(self) float [source]¶
Returns the factor for label distance from the symbol.
See also
Added in version 3.8.
- Return type:
float
- placement(self) QgsPointDisplacementRenderer.Placement [source]¶
Returns the placement method used for dispersing the points.
See also
- Return type:
- setCenterSymbol(self, symbol: QgsMarkerSymbol | None)[source]¶
Sets the center symbol for a displacement group.
- Parameters:
symbol (Optional[QgsMarkerSymbol]) – new center symbol. Ownership is transferred to the renderer.
See also
- setCircleColor(self, color: QColor | Qt.GlobalColor)[source]¶
Sets the color used for drawing the displacement group circle.
- Parameters:
color (Union[QColor, Qt.GlobalColor]) – circle color
See also
See also
- setCircleRadiusAddition(self, distance: float)[source]¶
Sets a factor for increasing the ring size of displacement groups.
- Parameters:
distance (float) – addition factor
See also
- setCircleWidth(self, width: float)[source]¶
Sets the line width for the displacement group circle.
- Parameters:
width (float) – line width in mm
See also
See also
- setLabelDistanceFactor(self, factor: float)[source]¶
Sets a factor for increasing the label distances from the symbol.
- Parameters:
factor (float) – addition factor
See also
Added in version 3.8.
- setPlacement(self, placement: QgsPointDisplacementRenderer.Placement)[source]¶
Sets the placement method used for dispersing the points.
- Parameters:
placement (QgsPointDisplacementRenderer.Placement) – placement method
See also