QGIS API Documentation  2.99.0-Master (c558d51)
qgsraster.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsraster.h - Raster namespace
3  --------------------------------------
4  Date : Apr 2013
5  Copyright : (C) 2013 by Radim Blazek
6  email : radim dot blazek at gmail dot com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSRASTER_H
19 #define QGSRASTER_H
20 
21 #include <QString>
22 
23 #include "qgis.h"
24 
28 class CORE_EXPORT QgsRaster
29 {
30  public:
31  // This is modified copy of GDALColorInterp
33  {
34  UndefinedColorInterpretation = 0,
35  GrayIndex = 1,
37  PaletteIndex = 2, // indexed color table
39  RedBand = 3,
41  GreenBand = 4,
43  BlueBand = 5,
45  AlphaBand = 6,
47  HueBand = 7,
49  SaturationBand = 8,
51  LightnessBand = 9,
53  CyanBand = 10,
55  MagentaBand = 11,
57  YellowBand = 12,
59  BlackBand = 13,
61  YCbCr_YBand = 14,
63  YCbCr_CbBand = 15,
65  YCbCr_CrBand = 16,
67  ContinuousPalette = 17
69  };
70 
72  {
73  IdentifyFormatUndefined = 0,
74  IdentifyFormatValue = 1, // numerical pixel value
75  IdentifyFormatText = 1 << 1, // WMS text
76  IdentifyFormatHtml = 1 << 2, // WMS HTML
77  IdentifyFormatFeature = 1 << 3, // WMS GML/JSON -> feature
78  };
79 
80  // Progress types
82  {
83  ProgressHistogram = 0,
84  ProgressPyramids = 1,
85  ProgressStatistics = 2
86  };
87 
89  {
90  PyramidsFlagNo = 0,
91  PyramidsFlagYes = 1,
92  PyramidsCopyExisting = 2
93  };
94 
96  {
97  PyramidsGTiff = 0,
98  PyramidsInternal = 1,
99  PyramidsErdas = 2
100  };
101 
104  {
108  ContrastEnhancementCumulativeCut
109  };
110 
113  {
115  SingleBandGray, // a single band image drawn as a range of gray colors
116  SingleBandPseudoColor, // a single band image drawn using a pseudocolor algorithm
117  PalettedColor, // a "Palette" image drawn using color table
118  PalettedSingleBandGray, // a "Palette" layer drawn in gray scale
119  PalettedSingleBandPseudoColor, // a "Palette" layerdrawn using a pseudocolor algorithm
120  PalettedMultiBandColor, // currently not supported
121  MultiBandSingleBandGray, // a layer containing 2 or more bands, but a single band drawn as a range of gray colors
122  MultiBandSingleBandPseudoColor, // a layer containing 2 or more bands, but a single band drawn using a pseudocolor algorithm
123  MultiBandColor, // a layer containing 2 or more bands, mapped to RGB color space. In the case of a multiband with only two bands, one band will be mapped to more than one color.
124  SingleBandColorDataStyle // ARGB values rendered directly
125  };
126 
127  static QString contrastEnhancementLimitsAsString( QgsRaster::ContrastEnhancementLimits theLimits );
128  static ContrastEnhancementLimits contrastEnhancementLimitsFromString( const QString& theLimits );
129 
136  static bool isRepresentableValue( double value, Qgis::DataType dataType );
137 
145  static double representableValue( double value, Qgis::DataType dataType );
146 };
147 
148 #endif
149 
150 
IdentifyFormat
Definition: qgsraster.h:71
DrawingStyle
This enumerator describes the different kinds of drawing we can do.
Definition: qgsraster.h:112
RasterProgressType
Definition: qgsraster.h:81
DataType
Raster data types.
Definition: qgis.h:60
ContrastEnhancementLimits
Contrast enhancement limits.
Definition: qgsraster.h:103
ColorInterpretation
Definition: qgsraster.h:32
Raster namespace.
Definition: qgsraster.h:28
RasterBuildPyramids
Definition: qgsraster.h:88
RasterPyramidsFormat
Definition: qgsraster.h:95