Class: Qgs3DTerrainRegistry¶
Registry of available 3d terrain classes.
Qgs3DTerrainRegistry is not usually directly created, but rather accessed through Qgs3D.terrainRegistry().
Added in version 3.42.
Methods
Registers a new terrain type. |
|
Create terrain settings directly from a project's elevation properties. |
|
Creates a new instance of the terrain settings of the specified type. |
|
Returns metadata for specified terrain type. |
|
Returns a list of all available terrain types. |
- class qgis._3d.Qgs3DTerrainRegistry[source]¶
Bases:
object
- addType(self, metadata: Qgs3DTerrainAbstractMetadata | None) bool [source]¶
Registers a new terrain type. Takes ownership of the
metadata
instance.- Parameters:
metadata (Optional[Qgs3DTerrainAbstractMetadata])
- Return type:
bool
- configureTerrainFromProject(self, properties: QgsProjectElevationProperties | None) QgsAbstractTerrainSettings | None [source]¶
Create terrain settings directly from a project’s elevation
properties
.- Parameters:
properties (Optional[QgsProjectElevationProperties])
- Return type:
Optional[QgsAbstractTerrainSettings]
- createTerrainSettings(self, type: str | None) QgsAbstractTerrainSettings | None [source]¶
Creates a new instance of the terrain settings of the specified
type
.The caller takes ownership of the returned object.
Returns
None
if the specified type is not found in the registry.- Parameters:
type (Optional[str])
- Return type:
Optional[QgsAbstractTerrainSettings]
- terrainMetadata(self, type: str | None) Qgs3DTerrainAbstractMetadata | None [source]¶
Returns metadata for specified terrain
type
. ReturnsNone
if not found- Parameters:
type (Optional[str])
- Return type:
Optional[Qgs3DTerrainAbstractMetadata]