Class: QgsPointCloudAttributeByRampRenderer¶
- class qgis.core.QgsPointCloudAttributeByRampRenderer¶
Bases:
QgsPointCloudRenderer
An RGB renderer for 2d visualisation of point clouds using embedded red, green and blue attributes.
New in version 3.18.
QgsPointCloudAttributeByRampRenderer() Constructor for QgsPointCloudAttributeByRampRenderer.
Methods
Adds a point to the list of points to be triangulated (only used when
renderAsTriangles()
is enabled)Returns the attribute to use for the renderer.
- rtype:
QgsPointCloudRenderer
Returns the color ramp shader function used to visualize the attribute.
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:
Draws a point using a
color
at the specifiedx
andy
(in map coordinates).Returns the maximum value for attributes which will be used by the color ramp shader.
Returns the minimum value for attributes which will be used by the color ramp shader.
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 color ramp
shader
function used to visualize the attribute.Sets the
maximum
value for attributes which will be used by the color ramp shader.Sets the
minimum
value for attributes which will be used by the color ramp shader.- rtype:
str
- param context:
- addPointToTriangulation(self, x: float, y: float, z: float, color: QColor | Qt.GlobalColor | QGradient, context: QgsPointCloudRenderContext)¶
Adds a point to the list of points to be triangulated (only used when
renderAsTriangles()
is enabled)New in version 3.36.
- attribute(self) str ¶
Returns the attribute to use for the renderer.
See also
- Return type:
str
- clone(self) QgsPointCloudRenderer ¶
- Return type:
- colorRampShader(self) QgsColorRampShader ¶
Returns the color ramp shader function used to visualize the attribute.
See also
- 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:
- drawPoint(self, x: float, y: float, color: QColor | Qt.GlobalColor | QGradient, context: QgsPointCloudRenderContext)¶
Draws a point using a
color
at the specifiedx
andy
(in map coordinates).
- maximum(self) float ¶
Returns the maximum value for attributes which will be used by the color ramp shader.
See also
See also
- Return type:
float
- minimum(self) float ¶
Returns the minimum value for attributes which will be used by the color ramp shader.
See also
See also
- Return type:
float
- 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) –
- setColorRampShader(self, shader: QgsColorRampShader)¶
Sets the color ramp
shader
function used to visualize the attribute.See also
- Parameters:
shader (QgsColorRampShader) –
- setMaximum(self, maximum: float)¶
Sets the
maximum
value for attributes which will be used by the color ramp shader.See also
See also
- Parameters:
maximum (float) –
- setMinimum(self, minimum: float)¶
Sets the
minimum
value for attributes which will be used by the color ramp shader.See also
See also
- Parameters:
minimum (float) –
- type(self) str ¶
- Return type:
str
- usedAttributes(self, context: QgsPointCloudRenderContext) Set[str] ¶
- Parameters:
context (QgsPointCloudRenderContext) –
- Return type:
Set[str]