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

attribute

Returns the attribute to use for the renderer.

clone

rtype

QgsPointCloudRenderer

colorRampShader

Returns the color ramp shader function used to visualize the attribute.

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

drawPoint

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

maximum

Returns the maximum value for attributes which will be used by the color ramp shader.

minimum

Returns the minimum value for attributes which will be used by the color ramp shader.

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.

setColorRampShader

Sets the color ramp shader function used to visualize the attribute.

setMaximum

Sets the maximum value for attributes which will be used by the color ramp shader.

setMinimum

Sets the minimum value for attributes which will be used by the color ramp shader.

type

rtype

str

usedAttributes

param context

attribute(self)str

Returns the attribute to use for the renderer.

See also

setAttribute()

Return type

str

clone(self)QgsPointCloudRenderer
Return type

QgsPointCloudRenderer

colorRampShader(self)QgsColorRampShader

Returns the color ramp shader function used to visualize the attribute.

Return type

QgsColorRampShader

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]

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).

maximum(self)float

Returns the maximum value for attributes which will be used by the color ramp shader.

See also

setMaximum()

See also

minimum()

Return type

float

minimum(self)float

Returns the minimum value for attributes which will be used by the color ramp shader.

See also

setMinimum()

See also

maximum()

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
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) –

setColorRampShader(self, shader: QgsColorRampShader)

Sets the color ramp shader function used to visualize the attribute.

Parameters

shader (QgsColorRampShader) –

setMaximum(self, maximum: float)

Sets the maximum value for attributes which will be used by the color ramp shader.

See also

maximum()

See also

setMinimum()

Parameters

maximum (float) –

setMinimum(self, minimum: float)

Sets the minimum value for attributes which will be used by the color ramp shader.

See also

minimum()

See also

setMaximum()

Parameters

minimum (float) –

type(self)str
Return type

str

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

context (QgsPointCloudRenderContext) –

Return type

Set[str]