Class: QgsPointCloudExtentRenderer¶
- class qgis.core.QgsPointCloudExtentRenderer¶
Bases:
QgsPointCloudRenderer
A renderer for 2d visualisation of point clouds which shows the dataset’s extents using a fill symbol.
New in version 3.18.
QgsPointCloudExtentRenderer(symbol:
QgsFillSymbol
= None) Constructor for QgsPointCloudExtentRenderer.Optionally the
symbol
to use for showing the extent can be specified. If specified, ownership is transferred to the renderer. If nosymbol
is specified a default one will be created instead.Methods
Adds a point to the list of points to be triangulated (only used when
renderAsTriangles()
is enabled)- rtype:
QgsPointCloudRenderer
Copies common point cloud properties (such as point size and screen error) to the
destination
renderer.Creates an extent renderer from an XML
element
.- param nodeLayer:
Returns a new instance of the default fill symbol to use for showing point cloud extents.
Draws a point using a
color
at the specifiedx
andy
(in map coordinates).Returns the symbol used to render the cloud's extent.
Retrieves the x and y coordinate for the point at index
i
.Retrieves the z value for the point at index
i
.- param block:
Renders a polygon
extent
geometry to the specified rendercontext
.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
symbol
used to render the cloud's extent.- param context:
- param context:
- rtype:
str
- 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.
- 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 extent renderer from an XML
element
.- Parameters:
element (QDomElement) –
context (QgsReadWriteContext) –
- Return type:
- createLegendNodes(self, nodeLayer: QgsLayerTreeLayer) List[QgsLayerTreeModelLegendNode] ¶
- Parameters:
nodeLayer (QgsLayerTreeLayer) –
- Return type:
- defaultFillSymbol() QgsFillSymbol ¶
Returns a new instance of the default fill symbol to use for showing point cloud extents.
- 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).
- fillSymbol(self) QgsFillSymbol ¶
Returns the symbol used to render the cloud’s extent.
See also
- Return type:
- 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) –
- renderExtent(self, extent: QgsGeometry, context: QgsPointCloudRenderContext)¶
Renders a polygon
extent
geometry to the specified rendercontext
.- Parameters:
extent (QgsGeometry) –
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
- setFillSymbol(self, symbol: QgsFillSymbol)¶
Sets the
symbol
used to render the cloud’s extent.Ownership of
symbol
is transferred to the renderer.See also
- Parameters:
symbol (QgsFillSymbol) –
- startRender(self, context: QgsPointCloudRenderContext)¶
- Parameters:
context (QgsPointCloudRenderContext) –
- stopRender(self, context: QgsPointCloudRenderContext)¶
- Parameters:
context (QgsPointCloudRenderContext) –
- type(self) str ¶
- Return type:
str