4.0 LAS File Structures

4.1 Introduction

LAS creates a whole set of computer files related to the processing of its various components. The types and maintenance of some of the more common files used are described in this section. The types of files that may be found within LAS include:

The different file types are normally identified by the presence of standard filename extensions. This permits using the same base name for a set of related files.

In particular, in the course of processing raster images several types of associated data files are created for each image. When creating these files, the LAS modules use the standard file extensions to implicitly associate these files with the image. Accordingly, LAS considers all files in a directory which have the same filename but different extensions to be asscociated. The existence of separate files for the associated information gives increased flexibility, simplifies the task of accessing the associated information, and allows an image and its associated files to be easily treated as a "data set" for archive and file transfer.

The standard file extensions are listed below. Although files may use any extension, users should avoid using these standard extensions for other types of files.

dltf Display and lookup table file
ddr Data descriptor record (DDR)
gof.pnt Graphics overlay point file
gof.line Graphics overlay line file
gof.poly Graphics overlay polygon file
gof.anot Graphics overlay annotation file
grid Geometric mapping grid
his History
ibis.tab LAMS tabular file*
ibis.graph LAMS graphics file*
lt General purpose labeled table file
img Image data file
mtp Merged tie point file
rwt Resampling weight table file
proj Projection definition file
stat Statistics file
tpl Tie point location file
tps Tie point selection file
txt General purpose ASCII file
* LAMS is not installed at PSU.

The formats for each of these files and a complete list of the types of files found in LAS are described in detail in the LAS Programmer's Guide.

4.2 LAS Image Files

4.2.1 Image Storage

LAS images will always have the following information associated with them:

Each image may also have additional associated files, which may include any of the files listed in Section 4.1.

4.2.2 Multi-band Images and Spatial and Spectral Specifications

An LAS image file may contain one or more bands. For remotely sensed imagery, the multiple bands generally represent data from different parts of the electromagnetic spectrum; for this reason, they are often referred to as spectral bands. However, the bands of an image file may also represent other types of information, such as the same spectral band viewed at different dates, or various types of geographic information (elevation, landcover class, etc.)

LAS applications modules accept both single-band and multi-band images. A multi-band input image may be either a single image containing more than one band or a logical image composed of a set of images each containing one or more bands. In the latter case, the logical image is specified by joining the names of the individual images by the plus sign, "+".

An optional window specification may be used along with each image name to specify spatial and/or spectral windows. The most general form of this specification is

"las-image(spatial-window: spectral-window; spatial-window-type)"
where las-image is the name of LAS image, without the .img extension. Note that the entire image specification should be enclosed in quotation marks if it contains any internal spaces or blanks.

If spatial-window is omitted, all lines and samples of the image are used. If spectral-window is omitted, all bands are used. If the first two specifications are omitted, the entire image is used. If the spatial-window-type is omitted, the spatial window is assumed to be in image (line and sample) coordinates.

For the default (image line and sample) case, the spatial window specification is given as (SL,SS,NL,NS), where the commas may be replaced by spaces, and the values are

SL start line number
SS start sample number
NL number of lines
NS number of samples

Note that LAS numbers lines (rows) from top to bottom, beginning with 1, and samples (columns) from left to right, also beginning with 1.

The spectral window specification is given as a colon followed by integers specifying the bands to be used. This specification may be a list of band numbers separated by commas or blank spaces, or two band numbers separated by a dash, "-", to denote consecutive bands. For example, bands one through four may be specified as ( :1,2,3,4) or ( :1 2 3 4) or ( :1-4).

Section 4.2.2.1 describes the optional spatial-window-type specifier.

Examples:

For a LAS module (such as copy, list, or pixcount) which requires one logical image, specified by parameter IN, as input, the image specification could take any of the following forms:

	IN=IMAGE1
	IN="IMAGE1(1 1 100 100)" 
	IN="IMAGE1(:1 2)" 
	IN="IMAGE1(1 1 100 100:1 2)" 
	IN="IMAGE1+IMAGE2" 
	IN="IMAGE1(1 1 100 100)+IMAGE2(1 1 100 100)" 
	IN="IMAGE1(:1 2)+IMAGE2(:1 2)" 
	IN="IMAGE1(1 1 100 100:1 2)+IMAGE2(1 1 100 100)"
	IN="IMAGE1(200,200,100,100:2-5)+IMAGE2(1,1,100,100:3,5)"

The first case uses all lines and samples (rows and columns) of all bands of IMAGE1. The other cases specify various spatial and/or spectral subsets of one or two images. In particular, in the last case, IMAGE1 and IMAGE2 are both multi-band images. The window 200,200,100,100 will be applied to bands 2,3,4, and 5 from IMAGE1 and the window 1,1,100,100 to bands 3 and 5 from IMAGE2. The LAS module will process these six bands as if they all belonged to a single image with 100 lines of 100 samples each.

If the command is entered at the LAS command prompt, the complete command line for copying two bands from each of two different input images into a four-band output image might take the form

	COPY  IN="IMAGE1(:1 2)+IMAGE2(:2 3)"  OUT=IMAGE3
For modules that allow or expect multiple logical images -- such as math, composit, and diff -- IN will be a multidimensioned parameter which could take any of the following forms:

	IN=(IMAGE1,IMAGE2)
	IN=("IMAGE1(1, 1, 100, 100)","IMAGE2(1, 1, 100, 100)")
	IN=("IMAGE1(:1 2)","IMAGE2(:1 2)")
	IN=("IMAGE1(1 1 100 100:1,2)","IMAGE2(1 1 100 100:1,2)")
	IN=("IMAGE1+IMAGE2","IMAGE3+IMAGE4")
	IN=("IMAGE1(:1 2)+IMAGE2(:1 2)","IMAGE3(:1 2)+IMAGE4(:1 2)")
	IN=("IMAGE1(1 1 100 100)+IMAGE2(1 1 100 100)", +
	    "IMAGE3(1 1 100 100)+IMAGE4(1 1 100 100)")
	IN=("IMAGE1(1 1 100 100:1 2)+IMAGE2(1 1 100 100:1 2)", +
	    "IMAGE3(1 1 100 100:1 2)+IMAGE4(1 1 100 100:1 2)")
The comma between logical images may be replaced with a blank. Note that the "+" at the end of the first line for each of the last two examples is the TAE continuation character; in any other position, it would imply joining the images into a single logical image. Also, when a multi-valued parameter is being entered in tutor mode, the parentheses around the set of values may be omitted, and the separate elements may be entered individually as in the following examples:

	IN="IMAGE1(:1 2)"  "IMAGE2(:1 2)"

	IN(1)=IMAGE1
	IN(2)=IMAGE2

	IN(1)="IMAGE1(1 1 100 100:1 2)+IMAGE2(1 1 100 100:1 2)"
	IN(2)="IMAGE3(1 1 100 100:1 2)+IMAGE4(1 1 100 100:1 2)"
As an example of a complete LAS command which treats the input images as two separate logical images, the command line for adding band 1 of image1 to band 2 of image2, and band 2 of image1 to band 3 of image2 to create the two-band image image3, is as follows:

	MATH-ADD  IN=("IMAGE1(:1 2)", "IMAGE2(:2 3)")  OUT="IMAGE3"

Restrictions and notes:

  1. Image names may include Unix environment variables.

  2. Many LAS modules limit the name of an image or the list of names in a logical image to 100 characters. Since window specifications can become long, it may in some cases be necessary to use the LAS copy module to first copy the desired window of each image in a logical image set into a new image which can then be referenced without any window specifiers.

  3. Most LAS modules require that window sizes be the same for all input images. An exception is concat.

  4. At most one window is allowed for a single image. The module will abort with an error message if more than one window is specified.

  5. No window is allowed for nonimage files. The module will abort with an error message.

  6. Band selection is allowed only for multi-band images.

  7. LAS supports four image data types: 8-bit unsigned integers (data type code BYTE), 16-bit signed integers (I*2), 32-bit signed integers (I*4), and 32-bit floating point (R*4). All LAS modules will handle these four data types unless otherwise specified.

  8. Some LAS modules require that all the individual images in a logical image have the same data types. This may not be explicitly documented, but the module will abort with an error message if the input data types are not acceptable.

4.2.2.1 Spatial Window Type

For the most general form of the image window specifier,

"las-image(spatial-window: spectral-window; spatial-window-type)"
the optional spatial-window-type field contains a keyword to specify how the spatial-window values are to be interpreted. The four spatial-windowvalues have three possible meanings:
Method 1 (default):
SL, SS, NL, NS

Method 2:
MAX_LAT, MIN_LON, MIN_LAT, MAX_LON
MAX_LAT = Maximum latitude
MIN_LON = Minimum longitude
MIN_LAT = Minimum latitude
MAX_LON = Maximum longitude

Method 3:
UL_Y, UL_X, LR_Y, LR_X
UL_Y = Map projection Y coordinate at upper-left corner
UL_X = Map projection X coordinate at upper-left corner
LR_Y = Map projection Y coordinate at lower-right corner
LR_X = Map projection X coordinate at lower-right corner

The spatial-window-type keyword defines which method should be used to interpret the window components and, for Method 2, the units and formats. Its possible values are:
(not specified) (default)
"LS" = Line/Sample (default)
"DEG" = Decimal degrees (Method 2)
"DMS" = DDDMMMSSS.SSSS (Method 2)
"PRO" = Projection (Method 3)

Method 1 (default)

If spatial-window-type corresponds to the default method, then the window will be processed using the standard method described in Section 4.2.2.

Method 2

If spatial-window-type corresponds to Method 2, then:

  1. The latitudes and longitudes are specified either as degrees and (optional) decimal fraction ("DEG") or in a packed degree/minute/second format ("DMS") where each component is allocated 3 positions, with unused positions filled by zeros.

  2. Latitudes south of the Equator and longitudes west of Greenwich are entered with a leading minus sign.

  3. The input image DDR must contain valid projection information and corner values.

  4. The window is transformed to the image projection using the projection information in the image DDR and the General Cartographic Transformation Package, as follows:

Examples of Method 2:

    IN="IMAGE1 (20.3  -120.5  18.6  -118.2 :1  2;DEG)"
    IN="IMAGE1 (020018000  -120030000  018048000  -118012000:1  2;DMS)"
    IN=("IMAGE1 (20.3  -120.5  18.6  118.2:1  2;DEG), +
      IMAGE2 (020018000 -120030000  018048000  118012000:1  2;DMS)")

Method 3

If spatial-window-type corresponds to method 3, then:

  1. The specified coordinates are assumed to be in the same projection as the image as specified by its DDR.

  2. The input image DDR must have a valid pixel size.

  3. The line/sample window is calculated using the window corner coordinates and pixel size specified by the DDR.

Examples of Method 3:

    IN="IMAGE1 (103400  234560  98650  239640:2  3;PRO)"
    IN="IMAGE1 (207300  125430  187520  145360;PRO"

4.2.3 Associated Files

4.2.3.1 Image History

Image history information is stored in an associated history file. The image history lists the modules used in the creation of the image. For each LAS module executed, the history includes the date and time at which it was run, the name of the user, the name of the module, and the values of the parameters used.

The history of a LAS image file may be displayed on the terminal by running the module dsphistry. Any computer system utility which will display an ASCII file may also be used, but the displayed information for each module will contain some extraneous record-control information preceding the date field; this should be ingnored. A sample history file is shown below.

Fri Sep  1 16:55:23 1989
UNIX
quirk
GEOM1P
IN="nhap.raw.map"
INGRID="nhap.grid"
OUT="nhap.reg"
WINDOPT="OUT"
WINDOW=--
RESAMP="CC"
INRWT=--
PCCALPHA=-0.5
BACKGRND=0.0
INTLIM=--
ODTYPE="SAME"

Tue Sep 5 08:37:23 1989 UNIX quirk copy IN="nhap.reg(2232,2943,2100,2709)" OUT="nhap.reg.sub" ODTYPE="SAME" ROUNDOPT="TRUNC"

Thu Sep 7 00:36:01 1989 UNIX quirk ISOCLASS IN="nhap.reg.sub" OUT="nhap.reg.iso" OUTSTAT="nhap.stats" STATSRC="NONE"INSTAT=--MAXNUMIT=10CLUSDIST=3.2MAXCLSTD=4.5 SSEPVAL=0.0PRINTIT=11VIEWIT=21MINNUM=30MAXCLUST=24CHNTHR=3.2 PRINT="LP" PRTFILE="ISOCLASS_112544.pr"

4.2.3.2 Data Descriptor Record

Every image has an associated data descriptor record (DDR) file. The DDR file contains five basic types of information. Each time a module is executed, each of the fields is updated. The rules governing how each field is updated is outlined in the LAS Programmer's Guide. The DDR can be displayed using the LAS module dspddr, or each of the fields can be edited by using the LAS module editddr. The five types of information in the DDR are:

  1. Required information about the image -- number of lines, number of samples, number of bands, data type, and the system on which the image was created

    Most modules only require valid entries for these items; they will execute successfully even if some or all or the other entries are invalid. There are some modules, however, which require other fields to be valid. For example, concat-auto requires the corner coordinates and related projection information to be valid.

  2. Corner coordinates of the image and the related projection information

    These coordinates are useful in the mosaicking of images and/or retrieval of the projection coordinates of any pixel in the image. For a more detailed description of these fields and how they can be used, refer to the Geometric Registration Overview document.

  3. The minimum and maximum values for each band of the image

    This is calculated by any module that creates an output image unless the TAE global variable $MINMAX is set to "no."

  4. Information describing how and when each band of the image was acquired

    These fields are used to keep track of acquisition date and time of each band of the image and how it was acquired.

  5. Miscellaneous information

    This information includes the last date and time an image was modified and the master line and sample of an image. The last access date and time are useful in deciding which images should be archived. The master line and sample keep track of where pixel (1,1) of the image is relative to an original image from which it may have been extracted as a subset.

Typical output from dspddr for a Landsat image is as follows:


IMAGE NAME:landsat_sample
          NL:512           NS:512            NB:3          DTYPE:BYTE
   LAST USED:            DATE:26Jan89     TIME:1451:03   SYSTEM:gouldutx
  PROJ. CODE:(1)UTM                                        Valid:VALID
   ZONE CODE:11                                            Valid:VALID
  DATUM CODE:0                                             Valid:VALID
  PROJ. PARM:                                              Valid:VALID
  A:   0.00000000000000E+00   0.00000000000000E+00   0.00000000000000E+00
  B:   0.00000000000000E+00   0.00000000000000E+00   0.00000000000000E+00
  C:   0.00000000000000E+00   0.00000000000000E+00   0.00000000000000E+00
  D:   0.00000000000000E+00   0.00000000000000E+00   0.00000000000000E+00
  E:   0.00000000000000E+00   0.00000000000000E+00   0.00000000000000E+00
 CORNER CORR:                                              Valid:VALID
    ULcorner:3.65777500000000E+06   4.99200000000000E+05
    URcorner:3.65777500000000E+06   5.11975000000000E+05
    LLcorner:3.64500000000000E+06   4.99200000000000E+05
    LRcorner:3.64500000000000E+06   5.11975000000000E+05
  PROJ. DIST:2.50000000000000E+01   2.50000000000000E+01   Valid:VALID
 PROJ. UNITS:meters                                        Valid:VALID
   INCREMENT:0.00000000000000E+00   0.00000000000000E+00   Valid:INVALID
 MASTER CORR:0       0

IMAGE NAME:landsat_sample
BAND NO:1

        MINIMUM:0.00000000000000E+00                       Valid:VALID
        MAXIMUM:1.95000000000000E+02                       Valid:VALID

DATA SOURCE:landsat4
SENSOR TYPE:mss
CAPT. DIRECTION:ascending
DATE:23apr86
TIME:1305:55

IMAGE NAME:landsat_sample
BAND NO:2

        MINIMUM:0.00000000000000E+00                       Valid:VALID
        MAXIMUM:2.33000000000000E+02                       Valid:VALID

DATA SOURCE:landsat4
SENSOR TYPE:mss
CAPT. DIRECTION:ascending
DATE:23apr86
TIME:1305:55
IMAGE NAME:landsat_sample

BAND NO:3

        MINIMUM:0.00000000000000E+00                       Valid:VALID
        MAXIMUM:1.64000000000000E+02                       Valid:VALID

DATA SOURCE:landsat4
SENSOR TYPE:mss
CAPT. DIRECTION:ascending
DATE:23apr86
TIME:1305:55

4.3 Statistics Files

In the process of interpretation and image analysis, some LAS modules use or generate statistics files. These files may or may not be associated with a specific LAS image. LAS statistics files are tree-structured files that contain statistical information derived from the associated images. The types of information contained in statistics files are mean and covariances matrices, correlation data, histograms, and polygon vertices.

When training sites are defined by the mensuration modules, the site polygon vertices are based on entire image coordinates even if the image needed to be subsampled to be displayed. For example, if polygons are selected from a 512 by 512 subsection, starting at image coordinates (1001,2001), the coordinates of any site polygon within that subsection will be in the range (1001,2001) to (1512,2512). This is important to users who wish to edit their polygon vertices.

4.3.1 Nodal Structure

The data in a statistics file is stored in a data tree structure. The tree structure consists of three levels. The three levels are:

Level 0 contains only one node which is the root of the data tree. The nodes that belong to the Level 1 category are immediate successors of the root node. The nodes that belong to the Level 2 category are immediate successors of the nodes in Level 1.

Statistics files are generated by the clustering/classification modules such as isoclass or by the training site definition module put-poly. Note that the statistics files generated by the clustering/classification modules may not have any "sites" for Level 2; they may only have class information at Level 1.

4.4 Display and Lookup Tables

Display and lookup tables files (DLTF) are used within LAS to store lookup tables that are utilized by both the LAS display module (xid) and enhancement modules such as map. A DLTF is a file that defines a sample intensity mapping to be applied to an image. The sample value in an input image is the index to the DLTF, and the contents of the index is the sample value of the output image that would result if the DLTF was applied to the input image. A DLTF can be used with either black and white or color images.

4.5 Geometric Transformation Files

Several types of files are used in performing geometric transformation of image data in LAS. Not all geometric corrections will use all of the file types listed as described in the following list, although some of them will. Additional information may be referenced in the Geometric Registration Overview. The types of files used in geometric registration are:

4.6 TAE Files

The "Classic" (non-Xwindows) subset of the Transportable Applications Environment (TAE) also creates and updates a set of files on the computer system. These include parameter files, session histories, PDFs, script files, and the results of batch processing. These files are described in detail in the TAE Command Language (TCL) User's Manual, but several are included in the following list. These files will be created within the user's current working directory during an LAS/TAE session unless the user has explicitly specified another directory (e.g., in a save command during a tutor session).

pixcount.par
A parameter file that the user saved from the pixcount module. These parameter files may be saved from the tutor screen for any LAS module with the default name being the module name. They are binary files.

last.par
The file where containing the parameters for the last module run from tutor or menu mode. This allows the user to use the restore last capability in TAE.

session.tsl
This file contains all information from a particular session if enable-log has been set.

taescreen.txt
File created by typing screenon followed by screenoff. It stores all the tutor screens displayed between these two commands in this file. This ASCII file may be viewed and/or printed.

ulogon.pdf, ulogoff.pdf
Files created by the user and executed when the user starts or ends a LAS session. These files allow a user to customize his/her LAS session.

procname.job
File created when procedure procname is to be run in batch mode.

procname.log
Log file of the batch job for procedure procname.

name.src
Script file captured using the scripton and scriptoff sequence of commands.

name.pdf
TAE procedure that can be setup by the user to run interactively or in batch mode.


Last change: 1998 Oct 16, R. A. White / raw@essc.psu.edu