MIEROS -- EROS (Old Format) Tape to Database Transfer

Reads the old EROS LANDSAT format distributed on 9-track tape.

Progress of this program can be monitored. See MONITOR section.

This format was popular in the 70's when the original LANDSAT satellites were active. It is supported because some users have extensive archives of this data, much of it collected 10 to 12 years ago.

For more information on the tape format, see the report `Generation and Physical Characteristics of the LANDSAT 1 and 2 MSS Computer Compatible Tapes', (number X-563-75-223), November 1975, from the Goddard Space Flight Center, Greenbelt, MD, USA.

MIEROS expects only four bands of data. Tapes produced with five bands of data (this is fairly rare) are not supported.

PARAMETERS

MIEROS is controlled by the following global parameters:

Name     Prompt                                  Count     Type
FILE     Database File Name                      1-64      Char
MTIC     Mag Tape Input Channel List             1-4       Int
DBOC     Database Output Channel List            1-4       Int
MTIW     Mag Tape Input Window                   0-4       Int
DBOW     Database Output Window                  0-4       Int
STARTFIL Start File on Tape                      1         Int

FILE

FILE is the filename of the PCIDSK image database to receive output imagery from MIEROS. If no file name is specified, then it is assumed that the user only wishes to have the headers on the tape printed to the terminal.

 EASI>FILE="...filename..."             | output to file requested
 EASI>FILE=                             | only header to terminal

MTIC

Specify the channels to read off tape. There are four channels on each tape.

 EASI>MTIC=i,...,k

DBOC

Specify the output channels on the database file which should receive the data:

 EASI>DBOC=l,...,m

MTIW

MTIW specifies a rectangular subset of the image on tape to be used for input.

 EASI>MTIW=Xoffset,Yoffset,Xsize,Ysize
 EASI>MTIW=                     | defaults to entire image

DBOW

DBOW specifies a rectangular subset of the image channel in the output database to receive imagery.

 EASI>DBOW=Xoffset,Yoffset,Xsize,Ysize
 EASI>DBOW=                     | defaults to entire image

STARTFIL

Specifies the start file (or strip) number on tape from which to start reading header and image data. On 800 BPI tapes, each strip is on a separate tape so STARTFIL would be set to 1 in all cases and the appropriate tape mounted to get the strip required. On 1600 BPI tapes, all four strips are on the same tape and STARTFIL indicates which strip (n) should be accessed within the tape.

 EASI>STARTFIL=1        | for scenes where strips are on separate
                        | tapes (usually 800 BPI)
 EASI>STARTFIL=n        |  for scenes where all strips are on the
                        | same tape (usually 1600 BPI)

DETAILS

Any arbitrary rectangular window on tape (MTIW) can be transferred to any arbitrary rectangular window on the database (DBOW). If no output window is specified, then the window is defaulted to the full size window of the database channel. Shrinking and/or zooming is automatically performed.

Any set of channels on tape (MTIC) can be read and output to any set of channels on the PCIDSK database (DBOC).

A full EROS LANDSAT Scene is typically between 3000 and 3450 pixels wide and exactly 2340 lines long. There are four channels of data.

Originally, this data was written at 800 BPI on tape and a whole scene would not fit on a single tape. Thus, a scene was made up of four tapes, each tape holding a strip of the image about 800 pixels wide and 2340 lines long.

As 1600 BPI (and 6250 BPI) tape drives became available, the strips were all put on the same tape, separated by end-of-file marks.

The access of strips within the same tape is controlled by the STARTFIL parameter. If each strip is on a separate tape, then the STARTFIL parameter must be set at 1 and the appropriate tape mounted.

For user convenience, MIEROS will print out the Scene ID, the sequence number of the strip (i.e., n of 4), the size of the imagery on tape, and the Latitude/Longitude of the scene to the terminal each time it is run. If no file name (FILE) is specified, then it is assumed that only the header information is printed. (NOTE: normally the program MSH is used for this purpose; however, it was not possible to modify MSH due to time constraints.)

 A TAPE MUST BE MOUNTED ON THE TAPE DRIVE BEFORE MIEROS CAN BE
 RUN.  CLEANING THE TAPE HEADS IS RECOMMENDED TO MINIMIZE THE
 CHANCE OF TAPE READ ERRORS.

MONITOR

Program progress can be monitored by printing the percentage of completed processing in odometer fashion. A system parameter, MONITOR, controls this activity:

 EASI>MONITOR="ON"           | turn monitor ON  (default)
 EASI>MONITOR="OFF"          | turn monitor OFF (recommended if
                             | running in batch/background mode)

TAPE LAYOUT

This section gives a rough idea of the layout of the data for a strip of EROS data:

 Record    Length     Description

     1        40      Tape header
     2       624      Annotation
     3      3000+     Image Data  (length can vary)
  ...        ...      
  2342      3000+     Image Data
Each record of image data contains one scan line of imagery. Each scan line of data is made up of four channels. Data is arranged in a variation of pixel interleaving, called interleaving by pixel pair (i.e., 11223344 11223344 ... rather than 1234 1234 1234 ....).

If all the strips are contained within the same tape, then the above structure is repeated three more times, with each structure separated by an end-of-file (EOF) mark.

EXAMPLE (SINGLE TAPE)

An EROS LANDSAT tape containing a scene has been acquired. In this case, the single tape contains all four strips. The following diagram shows how these strips must be combined to create the final full scene and the general size at full resolution (note: on physical tape, the strips follow each other):

        +-----------+-----------+-----------+-----------+   -
        |           |           |           |           |   |
        |           |           |           |           |   |
        |           |           |           |           |   |
        | Strip 1   | Strip 2   | Strip 3   | Strip 4   |   2
        | (File 1)  | (File 2)  | (File 3)  | (File 4)  |   3
        |           |           |           |           |   4 
        |           |           |           |           |   0
        |           |           |           |           |   |
        |           |           |           |           |   |
        |           |           |           |           |   |
        +-----------+-----------+-----------+-----------+   -   
        |<---------------- 3000 to 3450 --------------->|
Each of the strips is 2340 lines long but may be between 750 and 850 pixels wide (816 for example).

To create a full-scene image database at 1-to-1 resolution, a file will have to be created which is big enough to hold all the strips. This will be: (width of strip 1 + strip 2 + strip 3 + strip 4 in pixels) by 2340 lines by four channels.

The first step is to determine the width of each strip, since this can vary from strip to strip. This information is printed out as part of the header information each that time MIEROS is run. Mount the tape on the tape drive, then type the following:

 EASI> FILE =
 EASI> MTIC = 1
 EASI> DBOC = 1
 EASI> MTIW =
 EASI> DBOW =
 EASI> STARTFIL = 1
 EASI> RUN MIEROS
When the header information is printed, write down the width of the first strip in pixels. To get the size of the second strip:

 EASI> STARTFIL = 2
 EASI> RUN MIEROS
The width for the second strip can be written down. It may also be good to check the rest of the header information to ensure that the scene IDs and sequence numbers are proper. The above operation is repeated for the third and fourth strips by using STARTFIL=3 and STARTFIL=4.

Suppose that in our example the strip widths had been:

        Tape 1    816 pixels
        Tape 2    816 pixels
        Tape 3    816 pixels
        Tape 4    816 pixels
The total scene width would be: 816+816+816+816 = 3248 pixels. We thus must create a file 3248 pixels by 2340 lines by at least four channels to hold the data. Since this is LANDSAT MSS data, and it was read at full resolution, we assume the ground pixel size to be 57 by 79 metres.

 EASI> FILE = "EROS.PIX"
 EASI> TEX1 = "EROS composite scene made of four strips"
 EASI> DBSZ = 3264,2340
 EASI> PXSZ = 57,79
 EASI> DBNC = 6
 EASI> RUN CIM
To read the first strip, the following commands are used (remember, each strip has a width of 816 pixels):

 EASI> FILE = "EROS.PIX"
 EASI> MTIC = 1,2,3,4
 EASI> DBOC = 1,2,3,4
 EASI> MTIW = 0,0,816,2340
 EASI> DBOW = 0,0,816,2340
 EASI> STARTFIL = 1
 EASI> RUN MIEROS
When this has completed, the second strip in the scene can be read:

 EASI> MTIW =    0,   0,  816, 2340
 EASI> DBOW =  816,   0,  816, 2340
 EASI> STARTFIL =  2
 EASI> RUN MIEROS
When this has completed, the third strip in the scene can be read:

 EASI> MTIW =    0,   0,  816, 2340
 EASI> DBOW = 1632,   0,  816, 2340
 EASI> STARTFIL =  3
 EASI> RUN MIEROS
When this has completed, the fourth strip in the scene can be read:

 EASI> MTIW =    0,   0,  816, 2340
 EASI> DBOW = 2448,   0,  800, 2340
 EASI> STARTFIL =  4
 EASI> RUN MIEROS
The scene should now have been read in.

EXAMPLE (FOUR TAPE SET)

If the EROS scene is made up of four tapes, then the example for the single tape set can be followed, except that the STARTFIL parameter must be set to 1 ALWAYS (i.e., STARTFIL=1), and that the tapes containing the strips must be mounted and dismounted as needed.


About PCI Help Gateway