McIDAS Programmer's Manual
Version 2015
[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]
Area (image) files, where nnnn is a user-defined number.
In McIDAS-X, images are stored in binary files called areas. Each area file is a collection of information that defines the image and its associated ancillary data.
Area files are usually named AREAnnnn, where nnnn is a four-digit number between 0000 and 9999. This number is called the area file number. For example, AREA0013 is the name of the file containing area 13.
Areas do not have to follow this standard naming convention. The file masking option of DSSERVE may be used to access a data file of any name through the ADDE.Area files consist of these six blocks:
Some blocks also contain satellite-specific information, which is located in the Image-specific characteristics section. For area file Application Program Interfaces (APIs), refer to the API functions list.
For more information about reading, writing and deleting image data, see the section titled Image data in Chapter 5, Accessing Data. |
The first 64 words of an area file contain the directory block for the image. The directory lists ancillary information about the image, such as the number of lines and data points per line, the satellite ID and the number of spectral bands. The data in the directory is stored as 32-bit (4-byte) twos- complement binary integers or as ASCII characters.
Each of the directory's 64 words is described below. Since some of the words are satellite-specific, see the section titled Image-specific characteristics that follows. All byte offsets and pointers are zero-based. Note that all data shown as yyyddd are the year and day-of-year. The yyy values are the actual year modulo 1900.
Word | Description |
---|---|
spectral band map for bands 33-64 if word 14 is greater than 32; otherwise this value is satellite-specific |
|
actual image start time, hhmmss; in milliseconds for POES data |
|
For more information about image data, see the section titled Image data in Chapter 5, Accessing Data. For more information about coordinate systems, see the section titled Coordinate systems in Chapter 2, Learning the Basics. |
The navigation (NAV) block contains the information for determining the location of data points in physical space. Word 35 of the directory block contains the byte offset to the start of the navigation block. If an image isn't navigated, word 35 is zero. The NAV block format varies with each satellite; see the section titled Image-specific characteristics that follows.
The calibration (CAL) block contains information for converting image data from its stored (internal) units to more meaningful units such as radiance or albedo. The presence of this block depends on the implementation of the satellite-specific calibration. Word 63 of the directory block contains the byte offset to the start of the calibration block. If there is no CAL block, word 63 is zero. The calibration block format varies with each satellite; see the section titled Image-specific characteristics that follows.
The supplemental (or auxiliary) block contains additional information that is specific to a data type. For example, information specific to radar data is stored in this block. Also, the latitude/longitude grid for the LALO navigation is stored in this block. Word 60 of the directory block contains the byte offset to the start of the supplemental block. Word 61 contains the total number of entries in the supplemental block. If there is no supplemental block, words 60 and 61 are zero.
The data block contains the actual image data values. Any data point in an image or image sector can be located with image and file coordinates.
An area file may be produced from an image by sampling or averaging the data. In the case of multiband images, the file may include only a portion of the measured spectral bands, so that each element contains fewer data values than are contained in the original image. To map an area back to the original image, these two formulas are used:
Image Line = UpperLeftLine + (File Line * LineResolution)
Image Element = UpperLeftEle + (File Element * ElementResolution)
UpperLeftLine is the line coordinate of the first image line and UpperLeftEle is the element coordinate of the first image element. File Line and File Element are zero-based.
When LineResolution and ElementResolution are both 1, the image resolution is 1, or full resolution. If the image resolution is 4, every fourth line and element of an image originally at resolution 1 are included in the image. Each sensor has its own scan resolution, so an image resolution of one will mean different geographic resolutions from one satellite to another.
Each line is divided into two parts: the line prefix and the actual data values as shown below. The line prefix contains information about the image and the particular line.
line prefix 1 line data 1 line prefix 2 line data 2 etc.
|_____________|___________|_____________|___________|___...
0 byte numbers increase >>
Although the size and content of the line prefix depend on the image source defined in word 52 of the directory block, each line in an image has the same prefix length. Word 15 of the directory block contains the length of the line prefix, in bytes. If no line prefix exists, word 15 is zero.
The line prefix may contain any region shown in the diagram below and described in the following table; the regions' lengths are multiples of four bytes.
validity code documentation calibration band list
|______________|_______________|_____________|___________|
0 byte numbers increase >>
Word 34 of the directory block contains the byte offset to the start of the data block. Each line in an image is the same length and a multiple of four bytes. To calculate the length of a line prefix, the line data, or the entire data block, use the formulas below.
line prefix length = doc + cal + band + 4 (if valcode is present)
line data length = nbands*nele*nbytes
line length = line prefix length + line data length
data block length = nlines * line length
The parameters used in these formulas are defined in the directory block and provided in the table below.
Parameter | Directory block word | Definition |
---|---|---|
length of the prefix validity code; if nonzero, the length is four bytes; otherwise it is zero |
||
An area file may contain a comment (AUDIT) block containing a variety of textual information such as a list of commands run on the image object to date. Each comment record is 80 ASCII characters. Word 64 of the directory block contains the number of comment records, or cards.
[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]