Class: QgsLine3DSymbol

class qgis._3d.QgsLine3DSymbol

Bases: QgsAbstract3DSymbol

3D symbol that draws linestring geometries as planar polygons (created from lines using a buffer with given thickness).

Warning

This is not considered stable API, and may change in future QGIS releases. It is exposed to the Python bindings as a tech preview only.

New in version 3.0.

QgsLine3DSymbol() Constructor for QgsLine3DSymbol

Methods

altitudeBinding

Returns method that determines how altitude is bound to individual vertices

altitudeClamping

Returns method that determines altitude (whether to clamp to feature to terrain)

clone

rtype:

QgsAbstract3DSymbol

compatibleGeometryTypes

rtype:

List[Qgis.GeometryType]

copyBaseSettings

Copies base class settings from this object to a destination object.

create

Creates a new QgsLine3DSymbol.

extrusionHeight

Returns extrusion height (in map units)

height

Returns height (altitude) of the symbol (in map units)

materialSettings

Returns material settings used for shading of the symbol

offset

Returns vertical offset of the symbol (in map units)

readXml

param elem:

renderAsSimpleLines

Returns whether the renderer will render data with simple lines (otherwise it uses buffer)

setAltitudeBinding

Sets method that determines how altitude is bound to individual vertices

setAltitudeClamping

Sets method that determines altitude (whether to clamp to feature to terrain)

setDefaultPropertiesFromLayer

param layer:

setExtrusionHeight

Sets extrusion height (in map units)

setHeight

Sets height (altitude) of the symbol (in map units)

setMaterialSettings

Sets the material settings used for shading of the symbol.

setOffset

Sets vertical offset of the symbol (in map units)

setRenderAsSimpleLines

Sets whether the renderer will render data with simple lines (otherwise it uses buffer)

setWidth

Sets width of the line symbol (in map units)

type

rtype:

str

width

Returns width of the line symbol (in map units)

writeXml

param elem:

altitudeBinding(self) Qgis.AltitudeBinding

Returns method that determines how altitude is bound to individual vertices

Return type:

Qgis.AltitudeBinding

altitudeClamping(self) Qgis.AltitudeClamping

Returns method that determines altitude (whether to clamp to feature to terrain)

Return type:

Qgis.AltitudeClamping

clone(self) QgsAbstract3DSymbol
Return type:

QgsAbstract3DSymbol

compatibleGeometryTypes(self) List[Qgis.GeometryType]
Return type:

List[Qgis.GeometryType]

copyBaseSettings(self, destination: QgsAbstract3DSymbol)

Copies base class settings from this object to a destination object.

create() QgsAbstract3DSymbol

Creates a new QgsLine3DSymbol.

Caller takes ownership of the returned symbol.

Return type:

QgsAbstract3DSymbol

extrusionHeight(self) float

Returns extrusion height (in map units)

Return type:

float

height(self) float

Returns height (altitude) of the symbol (in map units)

Deprecated since version QGIS: 3.36. Use offset() instead.

Return type:

float

materialSettings(self) QgsAbstractMaterialSettings

Returns material settings used for shading of the symbol

Return type:

QgsAbstractMaterialSettings

offset(self) float

Returns vertical offset of the symbol (in map units)

New in version 3.36.

Return type:

float

readXml(self, elem: QDomElement, context: QgsReadWriteContext)
Parameters:
renderAsSimpleLines(self) bool

Returns whether the renderer will render data with simple lines (otherwise it uses buffer)

Return type:

bool

setAltitudeBinding(self, altBinding: Qgis.AltitudeBinding)

Sets method that determines how altitude is bound to individual vertices

Parameters:

altBinding (Qgis.AltitudeBinding) –

setAltitudeClamping(self, altClamping: Qgis.AltitudeClamping)

Sets method that determines altitude (whether to clamp to feature to terrain)

Parameters:

altClamping (Qgis.AltitudeClamping) –

setDefaultPropertiesFromLayer(self, layer: QgsVectorLayer)
Parameters:

layer (QgsVectorLayer) –

setExtrusionHeight(self, extrusionHeight: float)

Sets extrusion height (in map units)

Parameters:

extrusionHeight (float) –

setHeight(self, height: float)

Sets height (altitude) of the symbol (in map units)

Deprecated since version QGIS: 3.36. Use setOffset() instead.

Parameters:

height (float) –

setMaterialSettings(self, materialSettings: QgsAbstractMaterialSettings)

Sets the material settings used for shading of the symbol.

Ownership of material is transferred to the symbol.

Parameters:

materialSettings (QgsAbstractMaterialSettings) –

setOffset(self, offset: float)

Sets vertical offset of the symbol (in map units)

New in version 3.36.

Parameters:

offset (float) –

setRenderAsSimpleLines(self, enabled: bool)

Sets whether the renderer will render data with simple lines (otherwise it uses buffer)

Parameters:

enabled (bool) –

setWidth(self, width: float)

Sets width of the line symbol (in map units)

Parameters:

width (float) –

type(self) str
Return type:

str

width(self) float

Returns width of the line symbol (in map units)

Return type:

float

writeXml(self, elem: QDomElement, context: QgsReadWriteContext)
Parameters: