21 #ifndef QGSRASTERLAYER_H 22 #define QGSRASTERLAYER_H 24 #include "qgis_core.h" 179 : loadDefaultStyle( loadDefaultStyle )
183 bool loadDefaultStyle =
true;
204 const QString &baseName = QString(),
205 const QString &providerKey =
"gdal",
243 static bool isValidRasterFileName(
const QString &fileNameQString, QString &retError );
244 static bool isValidRasterFileName(
const QString &fileNameQString );
247 static QDateTime lastModified(
const QString &name );
250 void setDataProvider(
const QString &provider );
275 int bandCount()
const;
278 QString bandName(
int bandNoInt )
const;
289 void reload()
override;
298 void draw( QPainter *theQPainter,
307 QString htmlMetadata()
const override;
310 QPixmap paletteAsPixmap(
int bandNumber = 1 );
313 QString providerType()
const;
316 double rasterUnitsPerPixelX()
const;
318 double rasterUnitsPerPixelY()
const;
333 bool generateLookupTableFlag =
true );
353 bool defaultContrastEnhancementSettings(
358 void setDefaultContrastEnhancement();
361 QStringList subLayers()
const override;
366 QImage previewAsImage( QSize size,
const QColor &bgColor = Qt::white,
367 QImage::Format format = QImage::Format_ARGB32_Premultiplied );
375 void setLayerOrder(
const QStringList &layers )
override;
380 void setSubLayerVisibility(
const QString &name,
bool vis )
override;
383 QDateTime timestamp()
const override;
386 void showStatusMessage(
const QString &message );
390 bool readSymbology(
const QDomNode &node, QString &errorMessage,
const QgsReadWriteContext &context )
override;
393 bool readStyle(
const QDomNode &node, QString &errorMessage,
const QgsReadWriteContext &context )
override;
399 bool writeSymbology( QDomNode &, QDomDocument &doc, QString &errorMessage,
const QgsReadWriteContext &context )
const override;
402 bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage,
const QgsReadWriteContext &context )
const override;
405 bool writeXml( QDomNode &layer_node, QDomDocument &doc,
const QgsReadWriteContext &context )
const override;
412 void closeDataProvider();
424 bool generateLookupTableFlag,
427 void computeMinMax(
int band,
432 double &min,
double &max );
435 const QString QSTRING_NOT_SET;
436 const QString TRSTRING_NOT_SET;
442 QDateTime mLastModified;
447 QString mProviderKey;
454 QgsRectangle mLastRectangleUsedByRefreshContrastEnhancementIfNeeded;
The class is used as a container of context for various read/write operations on other objects...
A rectangle specified with double values.
Base class for all map layer types.
Base class for processing modules.
static const QgsContrastEnhancement::ContrastEnhancementAlgorithm MULTIPLE_BAND_MULTI_BYTE_ENHANCEMENT_ALGORITHM
Default enhancement algorithm for multiple band raster of type different from Byte.
QgsHueSaturationFilter * hueSaturationFilter() const
DrawingStyle
This enumerator describes the different kinds of drawing we can do.
This class provides qgis with the ability to render raster datasets onto the mapcanvas.
QgsRasterPipe * pipe()
Get raster pipe.
Resample filter pipe for rasters.
QgsRasterRenderer * renderer() const
static const double SAMPLE_SIZE
Default sample size (number of pixels) for estimated statistics/histogram calculation.
QgsBrightnessContrastFilter * brightnessFilter() const
ColorShadingAlgorithm
This enumerator describes the types of shading that can be used.
static const QgsRasterMinMaxOrigin::Limits MULTIPLE_BAND_SINGLE_BYTE_MIN_MAX_LIMITS
Default enhancement limits for multiple band raster of type Byte.
Perform transforms between map coordinates and device coordinates.
This class describes the origin of min/max values.
static const QgsContrastEnhancement::ContrastEnhancementAlgorithm SINGLE_BAND_ENHANCEMENT_ALGORITHM
Default enhancement algorithm for single band raster.
LayerType rasterType()
Accessor for raster layer type (which is a read only property)
static const QgsRasterMinMaxOrigin::Limits SINGLE_BAND_MIN_MAX_LIMITS
Default enhancement limits for single band raster.
Limits
This enumerator describes the limits used to compute min/max values.
QList< QPair< QString, QColor > > QgsLegendColorList
LayerOptions(bool loadDefaultStyle=true)
Constructor for LayerOptions.
ContrastEnhancementAlgorithm
This enumerator describes the types of contrast enhancement algorithms that can be used...
Contains information about the context of a rendering operation.
QgsRasterResampleFilter * resampleFilter() const
Set raster resample filter. Takes ownership of the resample filter object.
Brightness/contrast filter pipe for rasters.
Color and saturation filter pipe for rasters.
bool isSpatial() const override
Returns true if the layer is considered a spatial layer, ie it has some form of geometry associated w...
Base class for utility classes that encapsulate information necessary for rendering of map layers...
This class provides details of the viewable area that a raster will be rendered into.
LayerType
This enumerator describes the type of raster layer.
Raster renderer pipe that applies colors to a raster.
static const QgsContrastEnhancement::ContrastEnhancementAlgorithm MULTIPLE_BAND_SINGLE_BYTE_ENHANCEMENT_ALGORITHM
Default enhancement algorithm for multiple band raster of type Byte.
Setting options for loading raster layers.
static const QgsRasterMinMaxOrigin::Limits MULTIPLE_BAND_MULTI_BYTE_MIN_MAX_LIMITS
Default enhancement limits for multiple band raster of type different from Byte.
Base class for raster data providers.