QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
A terrain provider where the terrain source is a raster DEM layer. More...
#include <qgsterrainprovider.h>
Public Member Functions | |
QgsRasterDemTerrainProvider ()=default | |
Constructor for QgsRasterDemTerrainProvider. More... | |
QgsRasterDemTerrainProvider * | clone () const override |
Creates a clone of the provider and returns the new object. More... | |
QgsCoordinateReferenceSystem | crs () const override |
Returns the native coordinate reference system of the terrain provider. More... | |
bool | equals (const QgsAbstractTerrainProvider *other) const override |
Returns true if the provider is equal to other. More... | |
double | heightAt (double x, double y) const override |
Returns the height at the point (x,y) in the terrain provider's native crs(). More... | |
QgsRasterLayer * | layer () const |
Returns the raster layer with elevation model to be used as the terrain source. More... | |
const QgsRasterDemTerrainProvider * | operator= (const QgsRasterDemTerrainProvider &other)=delete |
QgsRasterDemTerrainProvider cannot be assigned. More... | |
void | prepare () override |
Called on the main thread prior to accessing the provider from a background thread. More... | |
bool | readXml (const QDomElement &element, const QgsReadWriteContext &context) override |
Reads the terrain provider state from a DOM element. More... | |
void | resolveReferences (const QgsProject *project) override |
Resolves reference to layers from stored layer ID (if it has not been resolved already) More... | |
void | setLayer (QgsRasterLayer *layer) |
Sets the raster layer with elevation model to be used as the terrain source. More... | |
QString | type () const override |
Returns the unique type ID string for the provider. More... | |
QDomElement | writeXml (QDomDocument &document, const QgsReadWriteContext &context) const override |
Returns a DOM element representing the state of the terrain provider. More... | |
Public Member Functions inherited from QgsAbstractTerrainProvider | |
virtual | ~QgsAbstractTerrainProvider () |
double | offset () const |
Returns the vertical offset value, used for adjusting the heights from the terrain provider. More... | |
QgsAbstractTerrainProvider & | operator= (const QgsAbstractTerrainProvider &other)=delete |
QgsAbstractTerrainProvider cannot be assigned. More... | |
double | scale () const |
Returns the vertical scale factor, which can be used to exaggerate vertical heights. More... | |
void | setOffset (double offset) |
Returns the vertical offset value, used for adjusting the heights from the terrain provider. More... | |
void | setScale (double scale) |
Sets the vertical scale factor, which can be used to exaggerate vertical heights. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from QgsAbstractTerrainProvider | |
QgsAbstractTerrainProvider ()=default | |
Constructor for QgsAbstractTerrainProvider. More... | |
QgsAbstractTerrainProvider (const QgsAbstractTerrainProvider &other) | |
Copy constructor. More... | |
void | readCommonProperties (const QDomElement &element, const QgsReadWriteContext &context) |
Reads common properties from a DOM element. More... | |
void | writeCommonProperties (QDomElement &element, const QgsReadWriteContext &context) const |
Writes common properties to a DOM element. More... | |
Protected Attributes inherited from QgsAbstractTerrainProvider | |
double | mOffset = 0.0 |
Offset amount. More... | |
double | mScale = 1.0 |
Scale factor. More... | |
A terrain provider where the terrain source is a raster DEM layer.
Definition at line 230 of file qgsterrainprovider.h.
|
default |
Constructor for QgsRasterDemTerrainProvider.
|
overridevirtual |
Creates a clone of the provider and returns the new object.
Ownership is transferred to the caller.
Implements QgsAbstractTerrainProvider.
Definition at line 180 of file qgsterrainprovider.cpp.
|
overridevirtual |
Returns the native coordinate reference system of the terrain provider.
Implements QgsAbstractTerrainProvider.
Definition at line 153 of file qgsterrainprovider.cpp.
|
overridevirtual |
Returns true
if the provider is equal to other.
Implements QgsAbstractTerrainProvider.
Definition at line 185 of file qgsterrainprovider.cpp.
|
overridevirtual |
Returns the height at the point (x,y) in the terrain provider's native crs().
Returns NaN if the height could not be obtained at the specified point.
Implements QgsAbstractTerrainProvider.
Definition at line 159 of file qgsterrainprovider.cpp.
QgsRasterLayer * QgsRasterDemTerrainProvider::layer | ( | ) | const |
Returns the raster layer with elevation model to be used as the terrain source.
Definition at line 212 of file qgsterrainprovider.cpp.
|
delete |
QgsRasterDemTerrainProvider cannot be assigned.
|
overridevirtual |
Called on the main thread prior to accessing the provider from a background thread.
Subclasses must implement suitable logic in order to prepare for thread-safe calculation of terrain heights on background threads.
Implements QgsAbstractTerrainProvider.
Definition at line 199 of file qgsterrainprovider.cpp.
|
overridevirtual |
Reads the terrain provider state from a DOM element.
Implements QgsAbstractTerrainProvider.
Definition at line 122 of file qgsterrainprovider.cpp.
|
overridevirtual |
Resolves reference to layers from stored layer ID (if it has not been resolved already)
Reimplemented from QgsAbstractTerrainProvider.
Definition at line 114 of file qgsterrainprovider.cpp.
void QgsRasterDemTerrainProvider::setLayer | ( | QgsRasterLayer * | layer | ) |
Sets the raster layer with elevation model to be used as the terrain source.
Definition at line 207 of file qgsterrainprovider.cpp.
|
overridevirtual |
Returns the unique type ID string for the provider.
Implements QgsAbstractTerrainProvider.
Definition at line 109 of file qgsterrainprovider.cpp.
|
overridevirtual |
Returns a DOM element representing the state of the terrain provider.
Implements QgsAbstractTerrainProvider.
Definition at line 138 of file qgsterrainprovider.cpp.