16#ifndef QGSELEVATIONMAP_H
17#define QGSELEVATIONMAP_H
52 explicit QgsElevationMap(
const QSize &size,
float devicePixelRatio = 1.0 );
80 void applyEyeDomeLighting( QImage &image,
int distance,
float strength,
float rendererScale )
const;
100 void applyHillshading( QImage &image,
bool multiDirectional,
double altitude,
double azimuth,
double zFactor,
double cellSizeX,
double cellSizeY )
const;
115 QPainter *painter()
const;
132 void fillWithRasterBlock(
QgsRasterBlock *block,
int top,
int left,
double zScale = 1.0,
double offset = 0.0 )
SIP_SKIP;
139 bool isValid() const;
142 static QRgb encodeElevation(
float z );
144 static
float decodeElevation( QRgb colorRaw );
150 inline
bool isNoData( QRgb colorRaw )
const {
return colorRaw == 0;}
159 mutable QImage mElevationImage;
160 mutable std::unique_ptr<QPainter> mPainter;
ElevationMapCombineMethod
Methods used to select the elevation when two elevation maps are combined.
Stores a digital elevation model in a raster image which may get updated as a part of the map layer r...
QgsElevationMap()=default
void applyEyeDomeLighting(QImage &image, int distance, float strength, float rendererScale) const
Applies eye dome lighting effect to the given image.
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.
bool isNoData(QRgb colorRaw) const
Returns whether the encoded value is a no data value.
QRgb * rawElevationImageData()
Returns pointer to the actual elevation image data.
static float decodeElevation(QRgb colorRaw)
Converts a color back to elevation value.
void applyHillshading(QImage &image, bool multiDirectional, double altitude, double azimuth, double zFactor, double cellSizeX, double cellSizeY) const
Applies hill shading effect to the given image.