Skip to content

Commit d435bfc

Browse files
committedDec 17, 2012
QgsRasterBlock::DataType moved to QGis::DataType
1 parent e2f9fcd commit d435bfc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+338
-337
lines changed
 

‎python/core/qgis.sip

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,29 @@ class QGis
7474
//! description strings for feature types
7575
// static const char *qgisFeatureTypes[];
7676

77+
/** Raster data types.
78+
* This is modified and extended copy of GDALDataType.
79+
*/
80+
enum DataType
81+
{
82+
/*! Unknown or unspecified type */ UnknownDataType = 0,
83+
/*! Eight bit unsigned integer (quint8) */ Byte = 1,
84+
/*! Sixteen bit unsigned integer (quint16) */ UInt16 = 2,
85+
/*! Sixteen bit signed integer (qint16) */ Int16 = 3,
86+
/*! Thirty two bit unsigned integer (quint32) */ UInt32 = 4,
87+
/*! Thirty two bit signed integer (qint32) */ Int32 = 5,
88+
/*! Thirty two bit floating point (float) */ Float32 = 6,
89+
/*! Sixty four bit floating point (double) */ Float64 = 7,
90+
/*! Complex Int16 */ CInt16 = 8,
91+
/*! Complex Int32 */ CInt32 = 9,
92+
/*! Complex Float32 */ CFloat32 = 10,
93+
/*! Complex Float64 */ CFloat64 = 11,
94+
/*! Color, alpha, red, green, blue, 4 bytes the same as
95+
QImage::Format_ARGB32 */ ARGB32 = 12,
96+
/*! Color, alpha, red, green, blue, 4 bytes the same as
97+
QImage::Format_ARGB32_Premultiplied */ ARGB32_Premultiplied = 13
98+
};
99+
77100
/** Map units that qgis supports
78101
* @note that QGIS < 1.4 api had only Meters, Feet, Degrees and UnknownUnit
79102
* @note and QGIS >1.8 returns to that

‎python/core/raster/qgsrasterblock.sip

Lines changed: 8 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,11 @@
11
class QgsRasterBlock
22
{
33
%TypeHeaderCode
4+
#include <qgis.h>
45
#include <qgsrasterblock.h>
56
%End
67

78
public:
8-
9-
/** Data types.
10-
* This is modified and extended copy of GDALDataType.
11-
*/
12-
enum DataType
13-
{
14-
/*! Unknown or unspecified type */ UnknownDataType = 0,
15-
/*! Eight bit unsigned integer */ Byte = 1,
16-
/*! Sixteen bit unsigned integer */ UInt16 = 2,
17-
/*! Sixteen bit signed integer */ Int16 = 3,
18-
/*! Thirty two bit unsigned integer */ UInt32 = 4,
19-
/*! Thirty two bit signed integer */ Int32 = 5,
20-
/*! Thirty two bit floating point */ Float32 = 6,
21-
/*! Sixty four bit floating point */ Float64 = 7,
22-
/*! Complex Int16 */ CInt16 = 8,
23-
/*! Complex Int32 */ CInt32 = 9,
24-
/*! Complex Float32 */ CFloat32 = 10,
25-
/*! Complex Float64 */ CFloat64 = 11,
26-
/*! Color, alpha, red, green, blue, 4 bytes the same as
27-
QImage::Format_ARGB32 */ ARGB32 = 12,
28-
/*! Color, alpha, red, green, blue, 4 bytes the same as
29-
QImage::Format_ARGB32_Premultiplied */ ARGB32_Premultiplied = 13
30-
};
31-
329
struct Range
3310
{
3411
double min;
@@ -38,11 +15,11 @@ class QgsRasterBlock
3815

3916
QgsRasterBlock();
4017

41-
QgsRasterBlock( DataType theDataType, int theWidth, int theHeight, double theNoDataValue );
18+
QgsRasterBlock( QGis::DataType theDataType, int theWidth, int theHeight, double theNoDataValue );
4219

4320
virtual ~QgsRasterBlock();
4421

45-
bool reset( DataType theDataType, int theWidth, int theHeight, double theNoDataValue );
22+
bool reset( QGis::DataType theDataType, int theWidth, int theHeight, double theNoDataValue );
4623

4724
bool isEmpty() const;
4825

@@ -51,16 +28,16 @@ class QgsRasterBlock
5128
int dataTypeSize( int bandNo ) const;
5229

5330
/** Returns true if data type is numeric */
54-
bool typeIsNumeric( QgsRasterBlock::DataType type ) const;
31+
bool typeIsNumeric( QGis::DataType type ) const;
5532

5633
/** Returns true if data type is color */
57-
bool typeIsColor( QgsRasterBlock::DataType type ) const;
34+
bool typeIsColor( QGis::DataType type ) const;
5835

5936
/** Returns data type for the band specified by number */
60-
virtual QgsRasterBlock::DataType dataType() const;
37+
virtual QGis::DataType dataType() const;
6138

6239
/** For given data type returns wider type and sets no data value */
63-
static QgsRasterBlock::DataType typeWithNoDataValue( DataType dataType, double *noDataValue );
40+
static QGis::DataType typeWithNoDataValue( QGis::DataType dataType, double *noDataValue );
6441

6542
double noDataValue( ) const;
6643

@@ -85,7 +62,7 @@ class QgsRasterBlock
8562
//char * bits( size_t index );
8663
static QString printValue( double value );
8764

88-
bool convert( QgsRasterBlock::DataType destDataType );
65+
bool convert( QGis::DataType destDataType );
8966
QImage image() const;
9067
bool setImage( const QImage * image );
9168

0 commit comments

Comments
 (0)
Please sign in to comment.