QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
|
Abstract base class for terrain providers. More...
#include <qgsterrainprovider.h>
Public Member Functions | |
virtual | ~QgsAbstractTerrainProvider () |
virtual QgsAbstractTerrainProvider * | clone () const =0 |
Creates a clone of the provider and returns the new object. | |
virtual QgsCoordinateReferenceSystem | crs () const =0 |
Returns the native coordinate reference system of the terrain provider. | |
virtual bool | equals (const QgsAbstractTerrainProvider *other) const =0 |
Returns true if the provider is equal to other. | |
virtual double | heightAt (double x, double y) const =0 |
Returns the height at the point (x,y) in the terrain provider's native crs(). | |
double | offset () const |
Returns the vertical offset value, used for adjusting the heights from the terrain provider. | |
QgsAbstractTerrainProvider & | operator= (const QgsAbstractTerrainProvider &other)=delete |
QgsAbstractTerrainProvider cannot be assigned. | |
virtual void | prepare ()=0 |
Called on the main thread prior to accessing the provider from a background thread. | |
virtual bool | readXml (const QDomElement &element, const QgsReadWriteContext &context)=0 |
Reads the terrain provider state from a DOM element. | |
virtual void | resolveReferences (const QgsProject *project) |
Resolves reference to layers from stored layer ID (if it has not been resolved already) | |
double | scale () const |
Returns the vertical scale factor, which can be used to exaggerate vertical heights. | |
void | setOffset (double offset) |
Returns the vertical offset value, used for adjusting the heights from the terrain provider. | |
void | setScale (double scale) |
Sets the vertical scale factor, which can be used to exaggerate vertical heights. | |
virtual QString | type () const =0 |
Returns the unique type ID string for the provider. | |
virtual QDomElement | writeXml (QDomDocument &document, const QgsReadWriteContext &context) const =0 |
Returns a DOM element representing the state of the terrain provider. | |
Protected Member Functions | |
QgsAbstractTerrainProvider ()=default | |
Constructor for QgsAbstractTerrainProvider. | |
QgsAbstractTerrainProvider (const QgsAbstractTerrainProvider &other) | |
Copy constructor. | |
void | readCommonProperties (const QDomElement &element, const QgsReadWriteContext &context) |
Reads common properties from a DOM element. | |
void | writeCommonProperties (QDomElement &element, const QgsReadWriteContext &context) const |
Writes common properties to a DOM element. | |
Protected Attributes | |
double | mOffset = 0.0 |
Offset amount. | |
double | mScale = 1.0 |
Scale factor. | |
Abstract base class for terrain providers.
Definition at line 40 of file qgsterrainprovider.h.
|
virtualdefault |
|
protecteddefault |
Constructor for QgsAbstractTerrainProvider.
|
protected |
Copy constructor.
Definition at line 28 of file qgsterrainprovider.cpp.
|
pure virtual |
Creates a clone of the provider and returns the new object.
Ownership is transferred to the caller.
Implemented in QgsFlatTerrainProvider, QgsRasterDemTerrainProvider, and QgsMeshTerrainProvider.
|
pure virtual |
Returns the native coordinate reference system of the terrain provider.
Implemented in QgsFlatTerrainProvider, QgsRasterDemTerrainProvider, and QgsMeshTerrainProvider.
|
pure virtual |
Returns true
if the provider is equal to other.
Implemented in QgsFlatTerrainProvider, QgsRasterDemTerrainProvider, and QgsMeshTerrainProvider.
|
pure virtual |
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.
Implemented in QgsFlatTerrainProvider, QgsRasterDemTerrainProvider, and QgsMeshTerrainProvider.
|
inline |
Returns the vertical offset value, used for adjusting the heights from the terrain provider.
Definition at line 149 of file qgsterrainprovider.h.
|
delete |
QgsAbstractTerrainProvider cannot be assigned.
|
pure virtual |
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.
Implemented in QgsFlatTerrainProvider, QgsRasterDemTerrainProvider, and QgsMeshTerrainProvider.
|
protected |
Reads common properties from a DOM element.
Definition at line 41 of file qgsterrainprovider.cpp.
|
pure virtual |
Reads the terrain provider state from a DOM element.
Implemented in QgsFlatTerrainProvider, QgsRasterDemTerrainProvider, and QgsMeshTerrainProvider.
|
virtual |
Resolves reference to layers from stored layer ID (if it has not been resolved already)
Reimplemented in QgsRasterDemTerrainProvider, and QgsMeshTerrainProvider.
Definition at line 23 of file qgsterrainprovider.cpp.
|
inline |
Returns the vertical scale factor, which can be used to exaggerate vertical heights.
Definition at line 133 of file qgsterrainprovider.h.
|
inline |
Returns the vertical offset value, used for adjusting the heights from the terrain provider.
Definition at line 157 of file qgsterrainprovider.h.
|
inline |
Sets the vertical scale factor, which can be used to exaggerate vertical heights.
Definition at line 141 of file qgsterrainprovider.h.
|
pure virtual |
Returns the unique type ID string for the provider.
Implemented in QgsFlatTerrainProvider, QgsRasterDemTerrainProvider, and QgsMeshTerrainProvider.
|
protected |
Writes common properties to a DOM element.
Definition at line 35 of file qgsterrainprovider.cpp.
|
pure virtual |
Returns a DOM element representing the state of the terrain provider.
Implemented in QgsFlatTerrainProvider, QgsRasterDemTerrainProvider, and QgsMeshTerrainProvider.
|
protected |
Offset amount.
Definition at line 188 of file qgsterrainprovider.h.
|
protected |
Scale factor.
Definition at line 185 of file qgsterrainprovider.h.