Class: QgsPointClusterRenderer

class qgis.core.QgsPointClusterRenderer

Bases: QgsPointDistanceRenderer

A renderer that automatically clusters points with the same geographic position.

Methods

accept

param visitor

clone

rtype

QgsPointClusterRenderer

clusterSymbol

Returns the symbol used for rendering clustered groups (but not ownership of the symbol).

convertFromRenderer

Creates a QgsPointClusterRenderer from an existing renderer.

convertSymbolRotation

convertSymbolSizeScale

copyRendererData

create

Creates a renderer from XML element

drawGroup

drawLabels

renderFeatureWithSymbol

renderVertexMarker

renderVertexMarkerPolygon

renderVertexMarkerPolyline

save

param doc

setClusterSymbol

Sets the symbol for rendering clustered groups.

startRender

param context

stopRender

param context

usedAttributes

param context

accept(self, visitor: QgsStyleEntityVisitorInterface) → bool
Parameters

visitor (QgsStyleEntityVisitorInterface) –

Return type

bool

clone(self) → QgsPointClusterRenderer
Return type

QgsPointClusterRenderer

clusterSymbol(self) → QgsMarkerSymbol

Returns the symbol used for rendering clustered groups (but not ownership of the symbol).

Return type

QgsMarkerSymbol

convertFromRenderer(renderer: QgsFeatureRenderer) → QgsPointClusterRenderer

Creates a QgsPointClusterRenderer from an existing renderer.

Return type

QgsPointClusterRenderer

Returns

a new renderer if the conversion was possible, otherwise None.

Parameters

renderer (QgsFeatureRenderer) –

convertSymbolRotation()
convertSymbolSizeScale()
copyRendererData()
create(symbologyElem: QDomElement, context: QgsReadWriteContext) → QgsFeatureRenderer

Creates a renderer from XML element

Parameters
Return type

QgsFeatureRenderer

drawGroup()
drawLabels()
renderFeatureWithSymbol()
renderVertexMarker()
renderVertexMarkerPolygon()
renderVertexMarkerPolyline()
save(self, doc: QDomDocument, context: QgsReadWriteContext) → QDomElement
Parameters
Return type

QDomElement

setClusterSymbol(self, symbol: QgsMarkerSymbol)

Sets the symbol for rendering clustered groups.

Parameters

symbol (QgsMarkerSymbol) – new cluster symbol. Ownership is transferred to the renderer.

See also

clusterSymbol()

startRender(self, context: QgsRenderContext, fields: QgsFields)
Parameters
stopRender(self, context: QgsRenderContext)
Parameters

context (QgsRenderContext) –

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

context (QgsRenderContext) –

Return type

Set[str]