NAME
i.tape.other - An
imagery function that extracts
scanned aerial imagery (NHAP, etc.) and satellite imagery
(TM, SPOT, etc) from half-inch or 8mm tape.
(GRASS Image Processing Program)
SYNOPSIS
i.tape.other
DESCRIPTION
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
imagery.
The first prompt in i.tape.other 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:
Please mount and load tape, then hit RETURN -->
IMAGE IDENTIFICATION MENU
The first menu in the program asks the user for information about the data.
please enter the following information
Tape Identification: __
Image Description: __
Title for the Extracted Raster (Cell) Files: __
AFTER COMPLETING ALL ANSWERS, HIT TO CONTINUE
(OR TO CANCEL)
TAPE LAYOUT MENU
The next menu asks for the physical layout of the tape.
GENERIC TAPE EXTRACTION
tape layout
0__ number of tape files to be skipped
0__ number of records in the remaining files to
be skipped
band files
0__ number of bands on the tape
data format
___ 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
AFTER COMPLETING ALL ANSWERS, HIT TO CONTINUE
(OR TO CANCEL)
- number of tape files to be skipped
- 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
m.examine.tape will also
provide this information. The record length is
the number of columns in the image, while the number of
records is the number of rows in the image (not always
correct, see blocking factor of data in the file
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).
- number of records in the remaining files to be skipped
- 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.
- number of bands on the tape
- 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.
- data format
- The two formats that imagery data are most commonly
stored in are called band interleaved format (BIL)
and band sequential 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:
band 1, line 1
band 2, line 1
band 3, line 1
band 1, line 2
band 2, line 2
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:
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
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.
- length (in bytes) of the longest record on the tape
- 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
m.examine.tape.
- blocking factor of data in the file
- 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 i.tape.other.
BAND EXTRACTION MENU
The user is then asked to mark an x beside the bands to be
extracted. See the subheading in this entry entitled
ROW AND COLUMN EXTRACTION.
please mark an x by the bands you want extracted
_____1
_____2
_____3
_____4
AFTER COMPLETING ALL ANSWERS, HIT TO CONTINUE
(OR TO CANCEL)
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:
prefixname.1
prefixname.2
prefixname.3
The specified prefixname will also automatically
become the name for the imagery
group file being created. Each image (i.e., each run of
i.tape.other) should be given a unique
prefix/group name.
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.
EXTRACT
please select desired tape window (geographic region
definition) to extract
start row:_0_
end row:_0_
start col:_0_
end col:_0_
AFTER COMPLETING ALL ANSWERS, HIT TO CONTINUE
(OR TO CANCEL)
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
d.display,
d.rast or
i.points.
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.
i.tape.other 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 i.tape.other before extracting the
portions of an image actually desired.
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 imagery manual
entry.
This program is interactive and requires no command line arguments.
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 measurements
option in
d.display, or
d.where
(following a run of
d.rast)
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
imagery 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:
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.
SEE ALSO
GRASS Tutorial: Image Processing
d.display
d.rast
d.where
i.group
i.points
i.tape.mss
i.tape.mss.h
i.tape.tm
i.tape.tm.fast
imagery
m.examine.tape
AUTHORS
Michael Shapiro, U.S.Army Construction Engineering
Research Laboratory
Tao Wen, University of Illinois at Urbana-Champaign,
Illinois