Geoscience Reference
In-Depth Information
gdalinfo HDF4_EOS:EOS_GRID:"MCD12Q1.A2012001.
h18v03.051.2013178170150.hdf":MOD12Q1:Land_Cover_Type_1
Driver: HDF4Image/HDF4 Dataset
Files: MCD12Q1.A2012001.h18v03.051.2013178170150.hdf
Size is 2400, 2400
Coordinate System is:
...
For the interpretation on the listed information, we refer to Sect. 5.1 . The GDAL
data model is explained in Sect. 14.3.2 , defining datasets and subdatasets in more
detail.
3.4 Raster Data Types
Raster images are stored with a data type, which determines how the values for each
pixel are represented. A Byte is a data type that requires eight bits and can represent
256 different values (2 8 ). Complex data types such as a CFloat64 require 64 bits to
store a value of a single pixel. Floating point values can either be represented with
32 bits in single precision (Float32) or 64 bits in double precision (Float64). Integer
values can be signed or unsigned. Signed integers can hold negative numbers, where
unsigned types can not. Unsigned types can represent larger numbers than their signed
counterparts for the same number of bits. It is good practice to choose a data type
that minimizes the number of required bits, while still representing a dynamic range
(min and max) and precision that meets your requirements. Inefficient use of data
types results in larger data volumes and poor performance due to excessive read and
write access to disk. It is also good to keep in mind that data types can be optimized
by scaling the image data and using offset values. For instance, a reflectance value
between 0 and 1 can be scaled to 0 and 65535 (2 16
1). Instead of using a single
precision floating point requiring 32 bits, an unsigned integer can then be used, which
requires only half of the data storage (16 bits). An overview of data formats that are
supported by GDAL and derived image processing software is given in Table 3.1 .
Table 3.1 Overview of raster data types supported by GDAL
(API) GDAL
(API) OGR
C++ equivalent Min value
Max value
Char
0
255
(GDT_)Byte
Unsigned short
0
65535
(GDT_)UInt16
(Signed) short
32768
32767
(GDT_)Int16
Unsigned int
0
4294967295
(GDT_)UInt32
(GDT_)Int32
(OFT)Integer
(Signed) int
2147483648
2147483647
10 38
10 38
Float
≈−
3
×
3
×
(GDT_)Float32
10 308
10 308
Double
≈−
1
.
8
×
1
.
8
×
(GDT_)Float64
(OFT)Real
 
 
Search WWH ::




Custom Search