19#ifndef QGSRASTERLAYERELEVATIONPROPERTIES_H
20#define QGSRASTERLAYERELEVATIONPROPERTIES_H
72 void setEnabled(
bool enabled );
106 void setBandNumber(
int band );
142 QMap<int, QgsDoubleRange> fixedRangePerBand()
const;
154 void setFixedRangePerBand(
const QMap<int, QgsDoubleRange> &ranges );
231 double elevationLimit()
const;
243 void setElevationLimit(
double limit );
264 void setDefaultProfileLineSymbol(
const QColor &color );
265 void setDefaultProfileFillSymbol(
const QColor &color );
267 bool mEnabled =
false;
271 std::unique_ptr< QgsLineSymbol > mProfileLineSymbol;
272 std::unique_ptr< QgsFillSymbol > mProfileFillSymbol;
274 double mElevationLimit = std::numeric_limits< double >::quiet_NaN();
278 QMap< int, QgsDoubleRange > mRangePerBand;
RasterElevationMode
Raster layer elevation modes.
@ RepresentsElevationSurface
Pixel values represent an elevation surface.
ProfileSurfaceSymbology
Surface symbology type for elevation profile plots.
@ Line
The elevation surface will be rendered using a line symbol.
QgsRange which stores a range of double values.
A fill symbol type, for rendering Polygon and MultiPolygon geometries.
A line symbol type, for rendering LineString and MultiLineString geometries.
virtual QgsMapLayerElevationProperties * clone() const =0
Creates a clone of the properties.
QgsMapLayerElevationProperties(QObject *parent)
Constructor for QgsMapLayerElevationProperties, with the specified parent object.
virtual QDomElement writeXml(QDomElement &element, QDomDocument &doc, const QgsReadWriteContext &context)=0
Writes the properties to a DOM element, to be used later with readXml().
virtual bool readXml(const QDomElement &element, const QgsReadWriteContext &context)=0
Reads the elevation properties from a DOM element previously written by writeXml().
virtual bool hasElevation() const
Returns true if the layer has an elevation or z component.
Base class for all map layer types.
bool isEnabled() const
Returns true if the elevation properties are enabled, i.e.
~QgsRasterLayerElevationProperties() override
QList< double > significantZValues(QgsMapLayer *layer) const override
Returns a list of significant elevation/z-values for the specified layer, using the settings defined ...
Qgis::ProfileSurfaceSymbology profileSymbology() const
Returns the symbology option used to render the raster profile in elevation profile plots.
int bandNumber() const
Returns the band number from which the elevation should be taken.
QgsDoubleRange calculateZRange(QgsMapLayer *layer) const override
Attempts to calculate the overall elevation or z range for the specified layer, using the settings de...
QgsMapLayerElevationProperties::Flags flags() const override
Returns flags associated to the elevation properties.
QString htmlSummary() const override
Returns a HTML formatted summary of the properties.
bool isVisibleInZRange(const QgsDoubleRange &range, QgsMapLayer *layer=nullptr) const override
Returns true if the layer should be visible and rendered for the specified z range.
QgsRasterLayerElevationProperties(QObject *parent)
Constructor for QgsRasterLayerElevationProperties, with the specified parent object.
bool showByDefaultInElevationProfilePlots() const override
Returns true if the layer should be visible by default in newly created elevation profile plots.
Represents a raster layer.
A container for the context for various read/write operations on objects.