img文件结构详解
ERDAS IMAGINE .img Files
ERDAS IMAGINE uses .img files to store raster data. These files use the ERDAS IMAGINE Hierarchal File Format (HFA) structure. Figure 1, below, shows the different objects of data stored in a .img file. The contents of the .img file is not fixed. Many of the items shown below are optional. In addition, because of the open nature of the file format, other developers may create and add new types of items to the file.
The C Programmers’ Toolkit provides programmers with the functions needed to read and write ERDAS IMAGINE .img files. Even though the file format is documented in the HFA Object Directory chapter, it is recommended that you read this section because it will greatly reduce development time. In addition, it will guarantee compatibility with future versions of the .img file format.
Figure 1: Examples of Objects Stored in a .img File
File Information
Each .img file stores basic information about the file, including:
file name
layer name
number of layers
date the file was last modified
This information applies to all of the layers.
Sensor Information
img文件如何打开
data on the input medium which is extracted by the import program and stored as an object in the .img file. This object contains ephemeris information about the sensor, such as:
date and time scene was scanned
calibration information of the sensor
orientation of the sensor
original dimensions for data
data storage format
number of bands
The data presented are dependent upon the sensor. Each sensor provides different types of information. The sensor object is named:
<format type>_Header
Sensor Sensor Object
ADRG ADRG_Header
ADRI ADRI_Header
DEM DEM_Header
DTED DTED_Header
Landsat TM TM_Header
Landsat MSS MSS_Header
NOAA AVHRR AVHRR_Header
SPOT SPOT_Header
Raster Layer Information
Each raster layer within a .img file has its own ancillary data, including the following parameters: height and width (rows and columns)
layer type (continuous or thematic)
compression (see below)
block size (see below)
This information is usually the same for each layer.
Compression
When you import a file into ERDAS IMAGINE you have the option to compress the data. Currently, ERDAS
in the layer. For example, if the layer contains large homogenous areas (e.g., blocks of water) then compressing
would not save you much disk space.
Data will be compressed only when it is stored. ERDAS IMAGINE automatically uncompresses data before the layer is run through a process. The time that it takes to uncompress the data is minimal.
Block Size
ERDAS IMAGINE software uses a tiled format to store raster layers. The tiled format allows raster layers to be displayed and resampled quickly. The raster layer is divided into tiles (i.e., blocks) when ERDAS IMAGINE creates or imports a .img file. You can define the size of these blocks when you either create the file or import it. The default block size is 64 pixels by 64 pixels.
i The default block size is acceptable for most applications and should not need to be changed.
6464512512columns
rows
pixels
Figure 2: Example of a 512 x 512 Layer with a Block Size of 64 x 64 Pixels
Attribute Data
Continuous Raster Layer
The attribute table object for a continuous raster layer, by default, includes the following information:
histogram contrast table Thematic Raster Layer
For a thematic raster layer, the attribute table object, by default, includes the following information:
histogram
class names
class values
color table (red, green, and blue values).
Attribute data can also include additional information for thematic raster layers, such as the area, opacity, and attributes for each class.
Statistics
The following statistics are calculated for each raster layer:
minimum and maximum data file values
mean of the data file values
median of the data file values
mode of the data file values
standard deviation of the data file values
You should create statistics for a layer if they do not exist. Certain Viewer functions (e.g., contrast tools) will not run without layer statistics. Rebuilding statistics for a raster layer may be necessary. For example, if you decide that you do not want to include zero file values in the statistics calculation (and they are currently included), you could rebuild the statistics without zero file values.
Map Information
Map information for a raster layer will be created only when the layer has been georeferenced. If the layer has been georeferenced, the following information will be stored in the raster layer:
upper left X,Y coordinates
pixel size
map unit used for measurement (e.g., meters, inches, feet)
Map Projection Information
If the raster layer has been georeferenced, then the following projection information will be generated for the layer:
map projection
spheroid

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。