Mounts a CD and scans it to locate an image.
Mounts a CD and scans it to locate a Landsat Technial Working Group (LTWG) format image based on its Worldwide Reference System (WRS) path and row entries and its acquisition date. SPOT data is searched for on the basis of its J and K numbers. The image's location is returned in a TAE string variable which can then be passed to LTWGIN.
- COMMENT(--)
- Description of CD. A text string sent to the operator's terminal describing the CD to be mounted. If COMMENT = NULL, the CD is assumed to be in the drive contained in the TAE global variable $TAPEDRV.
- WRSPATHN
- WRS path number. The CD mounted on $TAPEDRV will be searched for images which have a matching path number. This corresponds to the K number for SPOT data.
- WRSROWN
- WRS row number. The CD mounted on $TAPEDRV will be searched for images which have a matching row number. This corresponds to the J number for SPOT data.
- DATE(--)
- Acquisition date. The CD mounted on $TAPEDRV will be searched for images which have a matching acquisition date. This date must be in the format MM/DD/YY. If DATE = NULL, the search is based solely on WRSPATHN and WRSROWN.
- IMGLOC
- Image location. TAE string variable to recieve the location of the desired image on the CD. Depending on the format of the CD, this can be either or a directory name or a directory name and a root filename. LTWGIN will recognize the format of IMGLOC and act accordingly.
The mount request is sent to the operator. After the CD is mounted, the directory structure is scanned to locate the image described by WRSPATHN, WRSROWN, and date. If the image is found, its location is returned in the TAE string variable "location".
The CD mounted on $TAPEDRV is searched for images which have a WRS path number of 158 and a WRS row number of 73. Acquisition date is not used in this search. Note that a CD must have been previously mounted.
If COMMENT = NULL, the application assumes that a CD is already mounted and that its location is stored in the TAE global variable $TAPEDRV. Otherwise, the mount request is sent to the operator and the CD is mounted. Once the CD is mounted, the name of the directory where it has been mounted is determined by using the following method:
o If the CD was cross-mounted (i.e., the drive name is "dg5@cd1"), then that is assumed to be the name of the directory. In this example, the directory would be /dg5@cd1/. o If the CD was mounted locally (there is a drive name but no machine name), LTWGCD determines the name of the host machine and prefixes the returned drive name with it. For example, if the returned drive name was "cd1" and the name of the local host is "sg2", the directory /sg2@cd1/ is assumed.A recursive scan is then begun on the CD's directory structure. All filenames are read and known volume directory file (VDF) naming conventions are searched for. Once a VDF file is found, it is opened and the size of the image's leader file records is extracted. The matching leader file for the VDF is opened and the following information is extracted from it:
o WRS path number (K number for SPOT data) o WRS row number (J number for SPOT data) o Scene center time (acquisition date)This information is compared with WRSPATHN, WRSROWN, and DATE. If they all match, then the proper image has been found. If not, the remaining filenames are checked for known VDF naming conventions.
Once all filenames in the current directory have been exhausted, LTWGCD builds a list of that directory's subdirectories and processes each of them, repeating the previously described process. If the entire directory structure was processed and no image matching WRSPATHN, WRSROWN, and DATE was found, then the image is not on this CD and a fatal error occurs. Otherwise, the directory is returned to the TAE string variable specified by IMGLOC.
An error was encountered while dynamically allocating memory. Re-run, and if the error persists, contact the system administrator.
An error was encountered while reading the file <xxxxx>. Verify that the data on the CD is correct. If it is, the format of the CD is not supported. Contact the system administrator.
A fatal error was encountered during processing. The error message displayed preceding this message is the specific error encountered. Processing is terminated.
The image with the specified path/row and, if given, date, could not be located in the CD's directory structure. Verify that the numbers entered are correct and that the proper CD was mounted. This error may also arise when scanning a CD with an unsupported format.