User's Guide

LTWGIN

Reads LTWG full-scene formatted tapes.

Function:

Reads LTWG (Landsat Technical Working Group) full scene images from tape, CD or disk and creates LAS images. All of the bands are written to one image or each band may be written to its own image. The existing image may be windowed or subbanded when copied. Ancillary files may also be written to disk.

Parameters:

COMMENT(-- )
Description of tape(s). A text string sent to the operator's terminal describing the tape(s) to be mounted. COMMENT should contain the tape library identification number and a short description of the tape. This will allow the operator to ensure the correct tape is mounted. See User Notes 2 and 3.

INFILE(-- )
Location of disk image. If a value is specified for this parameter, it is assumed that the image is located on disk, and not on tape, and any values for COMMENT will be ignored. Depending on the ground station and/or image format, this may be either a directory or a root filename.

OUT
Output image(s). OUT defines up to seven LAS images. The number of images specified in OUT must either be one or equal to the number of bands specified in BANDS. If only one output image is specified, all of the bands will be written to that image. The size of the output image(s) is determined by information from the leader file on tape or the values specified in WINDOW and BANDS. The output data type is BYTE.

WINDOW(--)
Window specification. Specifies the starting line, starting sample, number of lines, and number of samples to be processed. The default indicates that the entire image will be processed.

BANDS(--)
Band number(s). The image bands on tape to be processed. The default indicates that all bands present on tape or disk are processed. See User Note 4.

WRTDSK(LEAD)
Write to disk. Specifies which associated files/or records are to be copied from tape. These files are associated with the output image with the specified extensions. Any combination of these files may be specified.

  = VDF:  Volume Directory file.  The volume directory file is 
          written to "<xxxxx>;vdf". 
  = LEAD: Leader file.  The leader file is written to 
          "<xxxxx>;lead".
  = TRAI: Trailer file.  The trailer file is written to 
          "<xxxxx>;trai".  See User Note 3.
  = SUPP: Supplemental file. The supplemental file is written 
          to "<xxxxx>;supp".  See User Note 3.
  = IDR:  Image Data Records.  The image file descriptor record 
          and the prefix and suffix data from each image line are 
          written to "<xxxxx>;idr".

Example:

  1. LAS> ltwgin comment=("bb0707","bb0705") out="tai.image" window=(100,100,1024,1024) bands=(2 4)

    The tape bb0707 is mounted on a drive. The user has specified that a 1024x1024 window be copied from tape starting at line 100, sample 100. Only bands 2 and 4 will be copied to TAI.IMAGE. By default, the leader file will be copied to the disk. Because the trailer and supplemental files are not being copied, only those tapes that contain bands 2 and 4 (bb0707 and bb0705) need to be specified.

  2. LAS> ltwgin infile="[sg2@cd1.scene11]" out="mada" wrtdsk=(lead trai vdf supp)

    LTWGIN reads image data from the directory /sg2@cd1/scene11 and creates a LAS image in the current directory. Since no window or band specifications are provided, the entire image will be copied. LTWGIN will also copy the image leader, trailer, supplemental, and volume directory files.

  3. LAS> ltwgin comment=("119567") out=("band1","band3") bands=(1,3)

    The tape 119567 is mounted on a drive. Band 1 will be copied to band1 and band 3 will be copied to band3. Since no window or band specifications are provided, the entire image will be copied. By default, the leader file will be copied to the disk. leader fil

Description/Algorithm:

LTWGIN begins by opening the tape drive unit if the image is to be ingested from tape. If the image data is in a CD or standard disk directory, the filenames in that directory are scanned so that LTWGIN can determine which file naming convention is being used. The volume directory file (VDF) and the leader file are read to obtain necessary processing information, i.e., band format, record size, etc.. These files are written to disk if requested, will be associated with the first output LAS image, and will have the extensions ";VDF" and ";LEAD".

The image file descriptor record is then read to obtain image size, band count, data type, blocking factor, and the number of prefix and suffix bytes within each image line. This record is written to disk if requested, will be associated with the first output LAS image, and have the extension ";IDR".

The output LAS image(s) are created and opened for writing. For each line and band to be read, the image data is extracted from the physical tape record or CD/disk file and written to disk. If specified, the image data suffix and prefix data for each image line is written to disk in the ";IDR" file.

Once all the requested image data is read, the trailer and supplemental files are copied to disk if they were requested. These files will be associated with the first output LAS image and will have the extensions ";TRAI" and ";SUPP". If the image is being read from tape, the third tape is mounted if necessary to read these files.

Nonfatal Error Messages:

  1. [ltwgin-band] Band <x> does not exist on tape

    The band entered in BANDS does not exist on tape. Processing will continue with the remaining bands being copied from tape.

  2. [ltwgin-corn] Corner coordinates will be approximate

    The image did not contain map projection information. The corners of the image will be approximated. See User Note 5.

  3. [ltwgin-nonfatal] Nonfatal error encountered

    A nonfatal error was encountered during processing. The error message displayed immediately preceding this message is the specific error encountered. Processing continues.

  4. [ltwgin-proj] Unable to determine projection information

    The tape did not contain projection information or the projection is not currently handled by LTWGIN. The image will be created with an invalid DDR. Contact the LAS system administrator.

  5. [ltwgin-supp] No supplemental file

    The specified tape did not contain a supplemental file and WRTDSK specified that one should be written to disk. Processing continues.

  6. [ltwgin-window] Specified window is too large

    The specified window is larger than the image data on tape or disk. The window has been reset to be the intersection of the window specification and the actual image.

  7. [ltwgin-station] Station unrecognized - assuming CANADA

    The Station ID was not recognized, CANADA was assumed.

Fatal Error Messages:

  1. [ltwgin-alloc] Error allocating dynamic memory

    An error occurred allocating memory. Re-run, and if the error persists, contact the LAS system administrator.

  2. [ltwgin-count] Invalid number of tapes specified

    The next tape in the volume is needed to continue processing. Enter all the tape IDs of the tape set in COMMENT and re-run.

  3. [ltwgin-diskread] Error reading from disk

    An error was encountered reading from disk, either while trying to open an expected input file or while reading data from one of those files. Verify that the disk or CD is good and conforms to one of the supported directory formats.

  4. [ltwgin-dtype] Data type not handled

    The data type of the image data on tape or disk is not currently handled by LTWGIN. Only BYTE is currently handled. Contact the LAS system administrator.

  5. [ltwgin-fatal] Fatal error encountered

    A fatal error was encountered during processing. Processing is terminated. The error message displayed preceding this message is the specific error encountered.

  6. [ltwgin-read] Error reading from tape

    An error was encountered reading from tape. Verify that the tape is good and conforms to the LTWG tape format.

  7. [ltwgin-skip] Error skipping records

    An error was encountered skipping to the correct location on the tape. Verify that the tape is good and conforms to the LTWG tape format or re-run and do specify a window.

  8. [ltwgin-zero] Zero total bands specified

    No bands specified in BANDS were available on the input tapes. Respecify BANDS and re-run.

  9. [ltwgin-bndcnt] Number of output images must equal number of bands

    If more than one output image is specified, the number of output images must equal the number of bands specified. Respecify OUT and/or BANDS so that the number of output images is equal to the number of bands specified if one band per image is desired, otherwise specify only one OUT image.

User Notes:

  1. For further information on the LTWGIN format, consult:

    Documents of the LANDSAT-D CCT Standards Committee Presented to the LANDSAT Ground Station Operators Working Group, Draft, August 15, 1978.

    LANDSAT Technical Working Group, Format for the Thematic Mapper CCT, EOSAT, January 1, 1990.

    SPOT Image Corporation, Abbreviated CCT Document, February 9, 1990.

  2. For BSQ tapes, only the tapes with the desired bands need to be mounted unless an image file spans two tapes. For BIL tapes, the first tape in the set must be specified to obtain needed processing information.

  3. If either the trailer or supplemental file are requested, LTWGIN requires that all tapes in the tape set be specified because it retrieves these files from the last tape in the set. If problems are encountered when these files are requested, it is recommend that no subbanding or windowing be specified to allow for a successful run of the different variations of LTWG tapes.

  4. SPOT data, level 1A and 1B, both panchromatic (PAN) and multispectral (XS) can be ingested with this routine.

  5. In some instances, the corner information that is stored in the DDR file is only an approximation. The accuracy of the corner coordinates is unknown. Even though the accuracy is unknown, the corner information is placed in the DDR file because it can be used to provide a rough location of the image. The projection information of the image on tape is unknown. The projection information is provided in the DDR to approximate geographic information of other pixels.

  6. The maximum number of image bands on tape that can be handled by LTWGIN is seven.

  7. A related function is DSPASSOC.

  8. LTWGIN may experience some difficulty ingesting image data from foreign recieving stations, as said data may contain slight deviations from the standard LTWG format. LTWGIN will identify and adjust for some of these discrepancies.