McIDAS Programmer's Manual
Version 2006

[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]


AREAnnnn

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.

Directory block

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

1

relative position of the image object in the ADDE dataset

2

image type (currently=4)

3

SSEC sensor source number; see the Appendices

4

nominal year and Julian day of the image, yyyddd

5

nominal time of the image, hhmmss

6

upper-left image line coordinate

7

upper-left image element coordinate

8

reserved

9

number of lines in the image

10

number of data points per line

11

number of bytes per data point

12

line resolution

13

element resolution

14

number of spectral bands

15

length of the line prefix

16

SSEC project number used when creating the file

17

year and Julian day the file was created, yyyddd

18

file creation time, hhmmss

19

spectral band map, bands 1-32

20

spectral band map, bands 33-64

21 - 24

reserved for sensor-specific data

25 - 32

memo field; 32 ASCII characters

33

reserved

34

byte offset to the start of the data block

35

byte offset to the start of the navigation block

36

validity code

37 - 44

PDL (Program Data Load); used for pre-GOES-8 satellites

45

source of band 8; used for GOES AA processing

46

actual image start year and Julian day, yyyddd

47

actual image start time, hhmmss; in milliseconds for POES data

48

actual image start scan

49

length of the prefix documentation

50

length of the prefix calibration

51

length of the prefix band list

52

source type; satellite-specific (ASCII)

53

calibration type; satellite-specific (ASCII)

54 - 56

reserved

57

original source type

58

units

59

scaling

60

byte offset to the supplemental block

61

number of entries in the supplemental block

62

reserved

63

byte offset to the start of the calibration block

64

number of comment cards

 

 

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.

Navigation block

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.

Calibration block

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.

Supplemental (or auxiliary) block

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.

Data block

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 >>

Region Description

validity code

Verifies the existence of the data portion of the image line. It is a constant value within each image and is stored in word 36 of the directory block. Comparing the value in the directory with the value of the validity code determines if data exists for an image line. If a line of data is missing, the corresponding place in the data file is either filled with zeros or flagged using non-matching validity codes.

documentation

Holds the documentation specific to each satellite. Word 49 of the directory block defines the length of the prefix documentation.

calibration

Holds the calibration coefficients for the data; needed when coefficients vary between image lines. Word 50 of the directory block defines the length of the prefix calibration.

band list

Contains an ordered list of the spectral bands comprising the data portion of the image line. Word 51 of the directory block defines the length of the prefix band list. Each band number is stored in a byte; thus, the range is 1 to 255.

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

valcode

36

length of the prefix validity code; if nonzero, the length is four bytes; otherwise it is zero

doc

49

length of the prefix documentation

cal

50

length of the prefix calibration

band

51

length of the prefix band list

nbands

14

number of bands per line

nele

10

number of data points per line

nbytes

11

number of bytes per band

nlines

9

number of lines in the image

Comment block

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]