Class: QgsDemTerrainSettings

Terrain settings for a terrain generator that uses a raster DEM layer to build terrain.

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.

Added in version 3.42.

Class Hierarchy

Inheritance diagram of qgis._3d.QgsDemTerrainSettings

Base classes

QgsAbstractTerrainSettings

Base class for all terrain settings classes.

Methods

copyCommonProperties

equalsCommon

layer

Returns the raster layer with elevation model to be used for terrain generation.

readCommonProperties

resolution

Returns the resolution of the terrain (how many elevation samples are taken on one side of a terrain tile).

setLayer

Sets the raster layer with elevation model to be used for terrain generation.

setResolution

Sets the resolution of the terrain (how many elevation samples are taken on one side of a terrain tile).

setSkirtHeight

Sets the skirt height (in world units).

skirtHeight

Returns the skirt height (in world units).

writeCommonProperties

Static Methods

create

Creates a new instance of a QgsDemTerrainSettings object.

class qgis._3d.QgsDemTerrainSettings[source]

Bases: QgsAbstractTerrainSettings

copyCommonProperties()
static create() QgsAbstractTerrainSettings | None[source]

Creates a new instance of a QgsDemTerrainSettings object.

Return type:

Optional[QgsAbstractTerrainSettings]

equalsCommon()
layer(self) QgsRasterLayer | None[source]

Returns the raster layer with elevation model to be used for terrain generation.

See also

setLayer()

Return type:

Optional[QgsRasterLayer]

readCommonProperties()
resolution(self) int[source]

Returns the resolution of the terrain (how many elevation samples are taken on one side of a terrain tile).

See also

resolution()

Return type:

int

setLayer(self, layer: QgsRasterLayer | None)[source]

Sets the raster layer with elevation model to be used for terrain generation.

See also

layer()

Parameters:

layer (Optional[QgsRasterLayer])

setResolution(self, resolution: int)[source]

Sets the resolution of the terrain (how many elevation samples are taken on one side of a terrain tile).

See also

resolution()

Parameters:

resolution (int)

setSkirtHeight(self, height: float)[source]

Sets the skirt height (in world units).

Skirts at the edges of terrain tiles help hide cracks between adjacent tiles.

See also

skirtHeight()

Parameters:

height (float)

skirtHeight(self) float[source]

Returns the skirt height (in world units).

Skirts at the edges of terrain tiles help hide cracks between adjacent tiles.

See also

setSkirtHeight()

Return type:

float

writeCommonProperties()