Class: QgsPointCloudClassifiedRenderer¶
- class qgis.core.QgsPointCloudClassifiedRenderer¶
Bases:
QgsPointCloudRenderer
Renders point clouds by a classification attribute.
Added in version 3.18.
QgsPointCloudClassifiedRenderer(attributeName: Optional[str] = ‘’, categories: Iterable[QgsPointCloudCategory] = []) Constructor for QgsPointCloudClassifiedRenderer.
Methods
Adds a
category
to the renderer.Returns the attribute to use for the renderer.
Returns the classification categories used for rendering.
- param key:
- rtype:
Optional[QgsPointCloudRenderer]
Copies common point cloud properties (such as point size and screen error) to the
destination
renderer.Creates an RGB renderer from an XML
element
.- param nodeLayer:
Returns the default list of categories.
Draws a point using a
color
at the specifiedx
andy
(in map coordinates).- param key:
- rtype:
List[str]
Retrieves the x and y coordinate for the point at index
i
.Retrieves the z value for the point at index
i
.- param block:
Restores common renderer properties (such as point size and screen error) from the specified DOM
element
.- param doc:
Saves common renderer properties (such as point size and screen error) to the specified DOM
element
.Sets the
attribute
to use for the renderer.Sets the classification
categories
used for rendering.- rtype:
str
- param context:
- param pointAttributes:
- addCategory(self, category: QgsPointCloudCategory)¶
Adds a
category
to the renderer.See also
- Parameters:
category (QgsPointCloudCategory)
- attribute(self) str ¶
Returns the attribute to use for the renderer.
See also
- Return type:
str
- categories(self) List[QgsPointCloudCategory] ¶
Returns the classification categories used for rendering.
See also
- Return type:
List[QgsPointCloudCategory]
- checkLegendItem(self, key: str | None, state: bool = True)¶
- Parameters:
key (Optional[str])
state (bool = True)
- clone(self) QgsPointCloudRenderer | None ¶
- Return type:
Optional[QgsPointCloudRenderer]
- copyCommonProperties(self, destination: QgsPointCloudRenderer | None)¶
Copies common point cloud properties (such as point size and screen error) to the
destination
renderer.
- create(element: QDomElement, context: QgsReadWriteContext) QgsPointCloudRenderer | None ¶
Creates an RGB renderer from an XML
element
.- Parameters:
element (QDomElement)
context (QgsReadWriteContext)
- Return type:
Optional[QgsPointCloudRenderer]
- createLegendNodes(self, nodeLayer: QgsLayerTreeLayer | None) List[QgsLayerTreeModelLegendNode] ¶
- Parameters:
nodeLayer (Optional[QgsLayerTreeLayer])
- Return type:
- defaultCategories() List[QgsPointCloudCategory] ¶
Returns the default list of categories.
- Return type:
List[QgsPointCloudCategory]
- drawPoint(self, x: float, y: float, color: QColor | Qt.GlobalColor, context: QgsPointCloudRenderContext)¶
Draws a point using a
color
at the specifiedx
andy
(in map coordinates).
- legendItemChecked(self, key: str | None) bool ¶
- Parameters:
key (Optional[str])
- Return type:
bool
- legendRuleKeys(self) List[str] ¶
- Return type:
List[str]
- pointXY(context: QgsPointCloudRenderContext, ptr: str | None, i: int)¶
Retrieves the x and y coordinate for the point at index
i
.
- pointZ(context: QgsPointCloudRenderContext, ptr: str | None, i: int) float ¶
Retrieves the z value for the point at index
i
.
- renderBlock(self, block: QgsPointCloudBlock | None, context: QgsPointCloudRenderContext)¶
- Parameters:
block (Optional[QgsPointCloudBlock])
context (QgsPointCloudRenderContext)
- restoreCommonProperties(self, element: QDomElement, context: QgsReadWriteContext)¶
Restores common renderer properties (such as point size and screen error) from the specified DOM
element
.See also
- save(self, doc: QDomDocument, context: QgsReadWriteContext) QDomElement ¶
- Parameters:
doc (QDomDocument)
context (QgsReadWriteContext)
- 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
.See also
- setAttribute(self, attribute: str | None)¶
Sets the
attribute
to use for the renderer.See also
- Parameters:
attribute (Optional[str])
- setCategories(self, categories: Iterable[QgsPointCloudCategory])¶
Sets the classification
categories
used for rendering.See also
- 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