.TH i.tape.other .nh .SH NAME \fIi.tape.other\fR \- An imagery function that extracts scanned aerial imagery (NHAP, etc.) and satellite imagery (TM, SPOT, etc) from half-inch or 8mm tape. .br \fI(GRASS Image Processing Program)\fR .SH SYNOPSIS .B i.tape.other .SH DESCRIPTION .I i.tape.other is a generic program that extracts imagery from tape using the tape description that is input by the user. This program must be run in a LOCATION_NAME with a x,y coordinate system (i.e., a coordinate system with projection 0). For further information regarding this LOCATION_NAME refer to the manual entry for \fIimagery\fR. The first prompt in \fIi.tape.other\fR asks the user for the tape device name. This is sometimes /dev/rmt0 (for a density of 1600), but this varies with each machine. The next prompt is: .if t \fB .nf Please mount and load tape, then hit RETURN --> .fi \fR .SH IMAGE IDENTIFICATION MENU The first menu in the program asks the user for information about the data. .if t \fB .TS center, tab(|); c s l l. please enter the following information Tape Identification:|_ Image Description:|_ Title for the Extracted Raster (Cell) Files:|_ .T& c s. AFTER COMPLETING ALL ANSWERS, HIT TO CONTINUE (OR TO CANCEL) .TE \fR .SH TAPE LAYOUT MENU The next menu asks for the physical layout of the tape. .if t \fB .ne 16 .TS center, tab(:); c s l l. GENERIC TAPE EXTRACTION: tape layout .T& c l. 0__:number of tape files to be skipped 0__:number of records in the remaining files to be skipped .T& l l. band files .T& c l. 0__:number of bands on the tape .T& l l. data format .T& c l. ___:band sequential (BSQ) | mark one with an x ___:band interleaved (BIL) | 0__:if you select BSQ format and all the bands are in a single file, :enter the total number of records in the file. Otherwise enter 0 0__:length (in bytes) of the longest record on the tape 1__:blocking factor of data in the file .T& c s. AFTER COMPLETING ALL ANSWERS, HIT TO CONTINUE (OR TO CANCEL) .TE \fR .IP "\fInumber of tape files to be skipped\fR" If there are files at the beginning of the tape which are not image data, they can be skipped. Sometimes information that comes with a tape will indicate the number of header files or records on the tape. The GRASS utility \fIm.examine.tape\fR will also provide this information. The \fIrecord length\fR is the number of columns in the image, while the \fInumber of records\fR is the number of rows in the image (not always correct, see \fIblocking factor of data in the file\fR below). NHAP imagery and usually most scanned aerial imagery do not have tape header files, but this should be checked. TM imagery has one header file that contains imagery format of data files and parameters of data aquisition. SPOT imagery has two files that should be skipped on the first tape, and one file to be skipped on the second tape (of a two-tape set). .IP "\fInumber of records in the remaining files to be skipped\fR" If the files which contain the image begin with non-image data, these records can also be skipped. This is usually 0 for most data types. SPOT imagery stored in 1600bpi has one header record in the image file on each tape that should be skipped. .IP "\fInumber of bands on the tape\fR" Most aerial imagery have 3 bands, but satellite simulator data may have more. TM data has seven bands and SPOT has three bands as a standard, respectively. The total number of bands on the tape should be specified here, not just the number that will be extracted. .IP "\fIdata format\fR" The two formats that imagery data are most commonly stored in are called \fIband interleaved\fR format (BIL) and \fIband sequential\fR format (BSQ). In BIL format, each record on the tape contains one line for one band of data. If the data contains three bands, then the first five records will look like this: .nf .ce 5 band 1, line 1 band 2, line 1 band 3, line 1 band 1, line 2 band 2, line 2 .fi In BSQ format, all lines of one band are stored together on a tape, followed by all lines of another band, followed by all lines of the next band, etc. These data are stored as if they were in a one band BIL format: .nf 12 .ce 12 band 1, line 1 band 1, line 2 band 1, line 3 . . . band 2, line 1 band 2, line 2 . . band 2, line 156 band 2, line 157 .fi Each pixel contains one byte and there is one line per record. BSQ format is the format that is usually created by optical scanning devices when they scan photographs, but not all digitized aerial imagery are stored in this format. The format of the data is usually written on the exterior of the tape; this should be checked. .IP "\fIlength (in bytes) of the longest record on the tape\fR" This must be set to the number of bytes in the longest data record. It is used to determine how large a buffer to use for reading the tape. This value can be obtained using .I m.examine.tape. .IP "\fIblocking factor of data in the file\fR" This is the number of lines combining into one physical record on tape. It is usually one for most of imageries, i.e., one line per physical record. However, considering on data compressing and tape memory saving, sometimes more than one lines are combined into one physical record on the tape. This number may be written on the exterior of the tape, otherwise the user need to experiment on this number by running of \fIi.tape.other\fR. .SH BAND EXTRACTION MENU The user is then asked to mark an \fIx\fR beside the bands to be extracted. See the subheading in this entry entitled ROW AND COLUMN EXTRACTION. .if t \fB .ce 1 please mark an x by the bands you want extracted .nf .ce 4 _____1 _____2 _____3 _____4 .fi .ce 2 AFTER COMPLETING ALL ANSWERS, HIT TO CONTINUE (OR TO CANCEL)\fR .SH PREFIX/GROUP NAME The user is asked to enter the prefix/group for the (raster) band files to be created. This name will precede each band file extracted into GRASS. For example, if three bands are extracted the following three band files will result: .ce 3 .I prefixname.1 .br .I prefixname.2 .br .I prefixname.3 The specified \fIprefixname\fR will also automatically become the name for the imagery group file being created. Each image (i.e., each run of \fIi.tape.other)\fR should be given a unique prefix/group name. .SH ROW AND COLUMN MENU Finally, the starting row, ending row, starting column and ending column are required. This allows the user to extract any subset of the image from the tape. .if t \fB .ce 2 EXTRACT please select desired tape window (geographic region definition) to extract .nf .ce 2 start row:_0_ end row:_0_ .fi .nf .ce 2 start col:_0_ end col:_0_ .fi .ce 2 AFTER COMPLETING ALL ANSWERS, HIT TO CONTINUE (OR TO CANCEL)\fR The extraction process will begin by first skipping the number of specified files, advancing to the starting row, and then reading the tape. The percent completion of the extraction is displayed on the screen. Following the extraction, the extracted band files will be listed as raster map layers available in the current MAPSET. These raster map layers may be displayed individually using the GRASS commands \fId.display\fR, \fId.rast\fR or \fIi.points\fR. .SH NOTES This program can be used for extraction of TM, SPOT and other types of data from tape; however, the user must supply information to the program on how the image data is laid out on the tape. For example, the image data may be padded with surrounding extra rows and/or columns; the user may wish to skip over these rows and columns and extract only the actual image data from the tape. \fIi.tape.other\fR does not know where image data actually begins on the tape; the user must tell the program what portion of the tape data to extract. Often, information on the orientation and layout of the image data on tape will be included on a printout accompanying any tape data received by the user; however, this may not always be the case. The user may need to experiment with various runs of \fIi.tape.other\fR before extracting the portions of an image actually desired. .LP After extracting an image from tape, the geographic region in the x,y coordinate LOCATION_NAME will be set, based upon the extracted rows and columns from the tape. The relationship between the image rows and columns and the coordiates bounding the geographic region is discussed in the \fIimagery\fR manual entry. .LP This program is interactive and requires no command line arguments. .SH ROW AND COLUMN EXTRACTION The display options in GRASS allow the user to locate rows and columns on the digital image. If enough disk space is available, one band of an entire image, or one band of a portion of an image known to contain the area of interest, can be extracted and displayed. The .I measurements option in \fId.display\fR, or \fId.where\fR (following a run of \fId.rast\fR) will echo x and y coordinates to the screen. (These coordinates will display negative numbers in the north-south direction but ignoring the negative sign will yield the row number. See the \fIimagery\fR manual entry for further explanation.) If a photograph of the digital image is available, the rows and columns to be extracted can be determined from it by associating inches with the total number of known rows and columns in the scene. For example, if the total length of the photograph is 12 inches, the total number of rows on the tape is 2000, and the northwest corner of the area of interest begins 2 inches from the top of the photo, then: .ce 2 12" / 2000 rows \*= 2" / x rows x \*= 333.333 The northwest corner of the area of interest starts at row 333. The starting row, ending row, starting column, and ending column can be calculated in this manner. .SH SEE ALSO \fIGRASS Tutorial: Image Processing\fR .LP .I d.display, .I d.rast, .I d.where, .I i.group, .I i.points, .I i.tape.mss, .I i.tape.mss.h, .I i.tape.tm, .I i.tape.tm.fast, .I imagery, .I m.examine.tape .SH AUTHOR Michael Shapiro, U.S. Army Construction Engineering Research Laboratory .br Tao Wen, University of Illinois at Urbana-Champaign, Illinois