Geoscience Reference
In-Depth Information
Many practical applications use multi-dimensional raster data. For instance, satel-
lite images acquiredwithmultispectral sensors are often stored in amulti-band image,
where each band represents a spectral band of the electromagnetic spectrum in which
the incoming light was recorded. Storing these bands as a multi-band image sim-
plifies the read and write (input/output) operations of image processing software,
because it does not have to deal with multiple input files. The GDAL application
programming interface (API) provides methods to read and write selected bands of
an image (see also Chap. 14 ) . An example of a three band raster image is provided
in Fig. 3.4 .
3.3 Complex Datasets
Some file formats can contain complex datasets that contain subdatasets. As an exam-
ple, the HDF4 format is used for the land cover product from MODIS (MCD12Q1,
see Appendix A.2.4). It contains 16 single band subdatasets, which we can list using
the command gdalinfo (see Sect. 5.1 ) , followed by the HDF4 filename:
gdalinfo MCD12Q1.A2012001.h18v03.051.2013178170150.hdf
Driver: HDF4/Hierarchical Data Format Release 4
Files: MCD12Q1.A2012001.h18v03.051.2013178170150.hdf
Size is 512, 512
Coordinate System is ''
Metadata:
ALGORITHMPACKAGEACCEPTANCEDATE=1998-01-01
ALGORITHMPACKAGEMATURITYCODE=LAUNCH
ALGORITHMPACKAGENAME=MOD12Q1
...
Subdatasets:
SUBDATASET_1_NAME=HDF4_EOS:EOS_GRID:"MCD12Q1.A2012001.
h18v03.051.2013178170150.hdf":MOD12Q1:Land_Cover_Type_1
SUBDATASET_1_DESC=[2400x2400] Land_Cover_Type_1 MOD12Q1 (8-bit
unsigned integer)
...
SUBDATASET_16_NAME=HDF4_EOS:EOS_GRID:"MCD12Q1.A2012001.
h18v03.051.2013178170150.hdf":MOD12Q1:LC_Property_3
SUBDATASET_16_DESC=[2400x2400] LC_Property_3 MOD12Q1 (8-bit
unsigned integer)
Corner Coordinates:
Upper Left
(
0.0,
0.0)
Lower Left
(
0.0,
512.0)
Upper Right (
512.0,
0.0)
Lower Right (
512.0,
512.0)
Center
(
256.0,
256.0)
The 16 subdatasets are listed with a name and a description. To inspect a particular
subdataset, we can use the same gdalinfo command, followed by its name (includ-
ing everything after the equal sign). For example, for the first subdataset:
 
 
Search WWH ::




Custom Search