Geoscience Reference
In-Depth Information
Chapter 5
Manipulating Raster Data
This chapter deals with manipulating raster data. Most important is gdal_
translate , a utility to convert image and data formats, rescale and subset bands
and spatial extents. It can also add metadata, ground control points and assign infor-
mation about no-data values and the spatial reference system. We will also introduce
gdalinfo and gdal_edit.py to retrieve and edit basic information on the raster
data. Managing raster files such as finding, copying, moving and deleting images is
also covered here ( gdalmanage ).
5.1 gdalinfo
The gdalinfo utility provides general information of a raster dataset, such as the
number of lines, columns and bands. You can also retrieve raster attributes, such as
metadata, projection information, the coordinates of the center pixel and the image
bounding box. It can calculate theminimumandmaximumvalues and other statistical
information such as themean, the standard deviation and the data histogram. Once the
statistical information is obtained, it is stored in an external XML file for subsequent
use.
Usage: gdalinfo [--help-general] [-mm] [-stats] [-hist] [-nogcp]
[-nomd] [-nrat] [-noct] [-nofl] [-checksum] [-proj4]
[-mdd domain]*[-sd subdataset] datasetname
-mm
Display the minimum and maximum values for each band in the dataset.
-stats
Read and display image statistics (minimum, maximum, mean and standard
deviation).
 
 
Search WWH ::




Custom Search