Class: QgsPointDisplacementRenderer¶
-
class
qgis.core.
QgsPointDisplacementRenderer
(labelAttributeName: str = '')¶ Bases:
QgsPointDistanceRenderer
Constructor for QgsPointDisplacementRenderer.
- Parameters
labelAttributeName (str = '') – optional attribute name for labeling points
A renderer that automatically displaces points with the same geographic location.
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.
- rtype
QgsPointDisplacementRenderer
Creates a
QgsPointDisplacementRenderer
from an existing renderer.Create a renderer from XML element
Returns the placement method used for dispersing the points.
- param doc
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 the placement method used for dispersing the points.
- param context
- param context
- param context
Attributes
-
ConcentricRings
= 1¶
-
Grid
= 2¶
-
class
Placement
¶ Bases:
int
-
Ring
= 0¶
-
centerSymbol
(self) → QgsMarkerSymbol¶ Returns the symbol for the center of a displacement group (but not ownership of the symbol).
See also
- Return type
-
circleColor
(self) → QColor¶ Returns the color used for drawing the displacement group circle.
See also
See also
- Return type
QColor
-
circleRadiusAddition
(self) → float¶ Returns the factor for increasing the ring size of displacement groups.
See also
- Return type
float
-
circleWidth
(self) → float¶ Returns the line width for the displacement group circle in mm.
See also
See also
- Return type
float
-
clone
(self) → QgsPointDisplacementRenderer¶ - Return type
-
convertFromRenderer
(renderer: QgsFeatureRenderer) → QgsPointDisplacementRenderer¶ Creates a
QgsPointDisplacementRenderer
from an existing renderer.- Return type
- Returns
a new renderer if the conversion was possible, otherwise None.
New in version 2.5.
- Parameters
renderer (QgsFeatureRenderer) –
-
convertSymbolRotation
()¶
-
convertSymbolSizeScale
()¶
-
copyRendererData
()¶
-
create
(symbologyElem: QDomElement, context: QgsReadWriteContext) → QgsFeatureRenderer¶ Create a renderer from XML element
- Parameters
symbologyElem (QDomElement) –
context (QgsReadWriteContext) –
- Return type
-
drawGroup
()¶
-
drawLabels
()¶
-
placement
(self) → QgsPointDisplacementRenderer.Placement¶ Returns the placement method used for dispersing the points.
See also
New in version 2.12.
- Return type
-
renderFeatureWithSymbol
()¶
-
renderVertexMarker
()¶
-
renderVertexMarkerPolygon
()¶
-
renderVertexMarkerPolyline
()¶
-
save
(self, doc: QDomDocument, context: QgsReadWriteContext) → QDomElement¶ - Parameters
doc (QDomDocument) –
context (QgsReadWriteContext) –
- Return type
QDomElement
-
setCenterSymbol
(self, symbol: QgsMarkerSymbol)¶ Sets the center symbol for a displacement group.
- Parameters
symbol (QgsMarkerSymbol) – new center symbol. Ownership is transferred to the renderer.
See also
-
setCircleColor
(self, color: Union[QColor, Qt.GlobalColor])¶ Sets the color used for drawing the displacement group circle.
- Parameters
color (Union[QColor) – circle color
See also
See also
-
setCircleRadiusAddition
(self, distance: float)¶ Sets a factor for increasing the ring size of displacement groups.
- Parameters
distance (float) – addition factor
See also
-
setCircleWidth
(self, width: float)¶ Sets the line width for the displacement group circle.
- Parameters
width (float) – line width in mm
See also
See also
-
setPlacement
(self, placement: QgsPointDisplacementRenderer.Placement)¶ Sets the placement method used for dispersing the points.
- Parameters
placement (QgsPointDisplacementRenderer.Placement) – placement method
See also
New in version 2.12.
-
startRender
(self, context: QgsRenderContext, fields: QgsFields)¶ - Parameters
context (QgsRenderContext) –
fields (QgsFields) –
-
stopRender
(self, context: QgsRenderContext)¶ - Parameters
context (QgsRenderContext) –
-
usedAttributes
(self, context: QgsRenderContext) → Set[str]¶ - Parameters
context (QgsRenderContext) –
- Return type
Set[str]