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
Adds a
category
to the renderer.Returns the attribute to use for the renderer.
Returns the classification categories used for rendering.
- param key
- rtype
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, state: bool = True)¶
- Parameters
key (str) –
state (bool = True) –
- clone(self) QgsPointCloudRenderer ¶
- Return type
- 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
element (QDomElement) –
context (QgsReadWriteContext) –
- Return type
- createLegendNodes(self, nodeLayer: QgsLayerTreeLayer) List[QgsLayerTreeModelLegendNode] ¶
- Parameters
nodeLayer (QgsLayerTreeLayer) –
- Return type
- 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 specifiedx
andy
(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
block (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)¶
Sets the
attribute
to use for the renderer.See also
- Parameters
attribute (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