Class: QgsPointCloudClassifiedRenderer

class qgis.core.QgsPointCloudClassifiedRenderer

Bases: QgsPointCloudRenderer

Renders point clouds by a classification attribute.

New in version 3.18.

QgsPointCloudClassifiedRenderer() Constructor for QgsPointCloudClassifiedRenderer.

Methods

addCategory

Adds a category to the renderer.

attribute

Returns the attribute to use for the renderer.

categories

Returns the classification categories used for rendering.

checkLegendItem

param key

clone

rtype

QgsPointCloudRenderer

copyCommonProperties

Copies common point cloud properties (such as point size and screen error) to the destination renderer.

create

Creates an RGB renderer from an XML element.

createLegendNodes

param nodeLayer

defaultCategories

Returns the default list of categories.

drawPoint

Draws a point using a color at the specified x and y (in map coordinates).

legendItemChecked

param key

legendRuleKeys

rtype

List[str]

pointXY

Retrieves the x and y coordinate for the point at index i.

pointZ

Retrieves the z value for the point at index i.

renderBlock

param block

restoreCommonProperties

Restores common renderer properties (such as point size and screen error) from the specified DOM element.

save

param doc

saveCommonProperties

Saves common renderer properties (such as point size and screen error) to the specified DOM element.

setAttribute

Sets the attribute to use for the renderer.

setCategories

Sets the classification categories used for rendering.

type

rtype

str

usedAttributes

param context

willRenderPoint

param pointAttributes

addCategory(self, category: QgsPointCloudCategory)

Adds a category to the renderer.

See also

categories()

Parameters

category (QgsPointCloudCategory) –

attribute(self)str

Returns the attribute to use for the renderer.

See also

setAttribute()

Return type

str

categories(self)List[QgsPointCloudCategory]

Returns the classification categories used for rendering.

See also

setCategories()

Return type

List[QgsPointCloudCategory]

checkLegendItem(self, key: str, state: bool = True)
Parameters
  • key (str) –

  • state (bool = True) –

clone(self)QgsPointCloudRenderer
Return type

QgsPointCloudRenderer

copyCommonProperties(self, destination: QgsPointCloudRenderer)

Copies common point cloud properties (such as point size and screen error) to the destination renderer.

create(element: QDomElement, context: QgsReadWriteContext)QgsPointCloudRenderer

Creates an RGB renderer from an XML element.

Parameters
Return type

QgsPointCloudRenderer

createLegendNodes(self, nodeLayer: QgsLayerTreeLayer)List[QgsLayerTreeModelLegendNode]
Parameters

nodeLayer (QgsLayerTreeLayer) –

Return type

List[QgsLayerTreeModelLegendNode]

defaultCategories()List[QgsPointCloudCategory]

Returns the default list of categories.

Return type

List[QgsPointCloudCategory]

drawPoint(self, x: float, y: float, color: Union[QColor, Qt.GlobalColor, QGradient], context: QgsPointCloudRenderContext)

Draws a point using a color at the specified x and y (in map coordinates).

legendItemChecked(self, key: str)bool
Parameters

key (str) –

Return type

bool

legendRuleKeys(self)List[str]
Return type

List[str]

pointXY(context: QgsPointCloudRenderContext, ptr: str, i: int)Tuple[float, float]

Retrieves the x and y coordinate for the point at index i.

pointZ(context: QgsPointCloudRenderContext, ptr: str, i: int)float

Retrieves the z value for the point at index i.

renderBlock(self, block: QgsPointCloudBlock, context: QgsPointCloudRenderContext)
Parameters
restoreCommonProperties(self, element: QDomElement, context: QgsReadWriteContext)

Restores common renderer properties (such as point size and screen error) from the specified DOM element.

save(self, doc: QDomDocument, context: QgsReadWriteContext)QDomElement
Parameters
Return type

QDomElement

saveCommonProperties(self, element: QDomElement, context: QgsReadWriteContext)

Saves common renderer properties (such as point size and screen error) to the specified DOM element.

setAttribute(self, attribute: str)

Sets the attribute to use for the renderer.

See also

attribute()

Parameters

attribute (str) –

setCategories(self, categories: Iterable[QgsPointCloudCategory])

Sets the classification categories used for rendering.

See also

categories()

Parameters

categories (Iterable[QgsPointCloudCategory]) –

type(self)str
Return type

str

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

context (QgsPointCloudRenderContext) –

Return type

Set[str]

willRenderPoint(self, pointAttributes: Dict[str, Any])bool
Parameters

pointAttributes (Dict[str) –

Return type

bool