16#ifndef QGSELEVATIONMAP_H
17#define QGSELEVATIONMAP_H
49 explicit QgsElevationMap(
const QSize &size,
float devicePixelRatio = 1.0 );
77 void applyEyeDomeLighting( QImage &image,
int distance,
float strength,
float rendererScale )
const;
97 void applyHillshading( QImage &image,
bool multiDirectional,
double altitude,
double azimuth,
double zFactor,
double cellSizeX,
double cellSizeY )
const;
112 QPainter *painter()
const;
129 void fillWithRasterBlock(
QgsRasterBlock *block,
int top,
int left,
double zScale = 1.0,
double offset = 0.0 )
SIP_SKIP;
136 bool isValid() const;
139 static QRgb encodeElevation(
float z );
141 static
float decodeElevation( QRgb colorRaw );
147 inline
bool isNoData( QRgb colorRaw )
const {
return colorRaw == 0;}
156 mutable QImage mElevationImage;
157 mutable std::unique_ptr<QPainter> mPainter;
ElevationMapCombineMethod
Methods used to select the elevation when two elevation maps are combined.
Stores digital elevation model in a raster image which may get updated as a part of map layer renderi...
QgsElevationMap()=default
float noDataValue() const
Returns the no data value for the elevation map.
QImage rawElevationImage() const
Returns raw elevation image with elevations encoded as color values.
QRgb * rawElevationImageData()
Returns pointer to the actual elevation image data.