1.0 LAS Installation Procedures

This discussion of LAS installation covers the following topics:

1.1 Introduction
1.2 Installing the LAS executables from archive files
1.3 Customizing LAS for local environment
1.4 Creating link to run_las command
1.5 Building LAS from source
1.6 Building TAE from source
1.7 Building an individual LAS application module
1.8 Modifying LAS menus

1.1 Introduction

This version of the Land Analysis System (LAS), release 7.4, has been adapted for the needs of users at the Pennsylvania State University (PSU). LAS runs under version 5.3c of the "Classic" (non-Xwindows) subset of the Transportable Applications Environment (TAE), which has also been slightly modified. Relative to the release distributed by the EROS Data Center (EDC), the principal changes are the disabling of the LAS Catalog Manager and replacement of its file-naming syntax by standard Unix file and directory names, removal of the AVHRR Data Acquisition and Processing System (ADAPS) and related modules from the main run-time directories, and addition of a few application modules developed at PSU to support local activities. The modifications to LAS and TAE are described in detail in the files run/las/doc/manager/psu_las74_mods.txt and tae/psu_tae_mods.txt , respectively.

The distribution consists of three tar-format archive files. Only the first two are needed to install LAS Executables which run under Linux. The three tar files are

las74_run.tar Required. Directories run/ and env/, which contain LAS executables, documentation for users and the LAS system manager, and scripts to initialize the LAS environment. Unpacks to 125 Mbyte.
tae53c.tar Required. Directory tae/, containing executables for TAE Classic (also contains libraries and sources for rebuilding TAE). Unpacks to 9 Mbyte.
las74_src.tar Directory src/, which contains source code for LAS applications and library functions, source code and scripts for LAS utilities, and object libraries and header files needed by both. Unpacks to 203 Mbyte.

The files needed to run LAS (the first two tar files) require about 134 Mbyte of disk space. The sources and compiled libraries occupy an additional 206 Mbyte.

Note: LAS uses the Mozilla web browser to display help files, and at least two applications (corrplot and statplot) use the public domain gnuplot software package. These packages are not included in the LAS distribution. The Mozilla browser is available for free download from URL http://www.mozilla.org; gnuplot is available via anonymous ftp from ftp://ftp.dartmouth.edu/pub/gnuplot.

1.2 Installing the LAS Executables from Archive Files

Note: All Unix commands shown below are for the C shell.

Installing the LAS executables and run-time support directories from the archive files requires performing the following steps:

  1. Create a directory for the top of the LAS directory tree
  2. Make this the current working directory
  3. Uncompress and unpack the archive files
  4. Customize the initialization scripts for the local environment
  5. Create a link to the run_las command

If another version of LAS is already on the system, it should either be backed up completely before beginning the LAS 7.4 installation, or a different top directory should be created for LAS 7.4.

The first three steps can then be performed using the following commands:

    mkdir -p  <las-top-directory>
    cd  <las-top-directory>
    gunzip -c las74_run.tar.gz | tar -xf -
    gunzip -c tae53c.tar.gz | tar -xf - 

1.3 Customizing LAS for Local Environment

Six files contain the customization for the PSU run-time environment. Three of these contain scripts which will always be referenced while starting up LAS:
lasinit Sets environment variables for LAS.
laslogon.pdf Displays LAS "welcome" screen.
lasgbls.pdf Sets default values for LAS global variables.

Three additional configuration files will need to be customized only if LAS is to be used to process input or output files on magnetic tape or if disk space is limited:

tape.config Defines tape drives avalable to LAS.
initlbl.config Specifies printer for printing tape labels.
disk.config Sets safety margin for disk space allocation.

1.3.1 Customizing Startup Files

The startup file may require the following changes:
lasinit The LAS Xwindows Image Display module ( xid ) uses the Unix environment variable LAS_RGBDATA to specify the directory containing the file rgb.txt, which defines standard names for colors. This directory may be different on different systems. If neither of the options in the PSU version of lasinit is correct, lasinit should be modified to specify the correct directory in both the "if" command and the "setenv" command which follows it.
laslogon.pdf This should be changed to provide welcome text appropriate to the local site.
lasgbls.pdf The default text for report headers, defined by LAS global variables $FNAME and $FADDR, should be changed to give the name and address of the local site. Default values for other variables may also be modified if desired.
The run-time versions of these files reside in the directories env/las/assign and run/las/base; when LAS is built from source, these files are copied from the source directories into their run-time locations. If the LAS source directories are not installed, the modifications should be made to the versions in the run-time directories; otherwise, the modifications should be made in the source directories and copied from there using the Unix "make" command. The required commands for the two cases are given below. Note that the setup_las script is invoked first to define environment variables which simplify directory access.

Source Directories Not Installed

When the LAS source directories are not installed, customizing the standard initialization files which are executed at LAS startup requires the following commands:

    source <las-top-directory>/run/bin/setup_las
    cd $LASASSIGN
    cp -p lasinit lasinit_orig
    (edit lasinit to make desired changes)
    cd $LASBASE
    cp -p laslogon.pdf laslogon.pdf_orig
    (edit laslogon.pdf to make desired changes)
    cp -p lasgbls.pdf lasgbls.pdf_orig
    (edit lasgbls.pdf to make desired changes)

Source Directories Installed

When the source directories are installed, the standard initialization files should be modified using the following commands:

    source <las-top-directory>/bin/setup_las/setup_las
    cd $LASROOT/las/env/assign
    cp -p lasinit lasinit_orig
    (edit lasinit to make desired changes)
    make DSTDIR=$LASASSIGN las
    cd $LASROOT/las/base/app/laslogon
    cp -p laslogon.pdf laslogon.pdf_orig
    (edit laslogon.pdf to make desired changes)
    make DSTDIR=$LASBASE las
    cd ../lasgbls
    cp -p lasgbls.pdf lasgbls.pdf_orig
    (edit lasgbls.pdf to make desired changes)
    make DSTDIR=$LASBASE las
    make DSTDIR=$LASDOC/user doc

1.3.2 Customizing Tape and Disk Configuration Tables

As noted above, there are three additional files which define tape and disk resources which may need to be customized for the local environment. The changes which may need to be made are:
tape.config Before LAS can be used to read or write tapes, this file must be edited to specify the tape drives available at the local site. The tape-related entries in lasgbls.pdf may also need to be edited.
initlbl.config If LAS is to be used to produce output tapes in production mode, this file should be edited to specify where tape labels are to be printed.
disk.config This file specifies the minimum amount of free space which must be left on a disk drive after LAS creates output and temporary files. It needs to be edited only if the default value of 5 Mbyte is not satisfactory.

The run-time versions of the tape and disk configuration tables reside in the directory env/las/tables; when LAS is built from source, these files are copied from the source directory into their run-time location. If the LAS source directories are not installed, the modifications should be made to the versions in the run-time directories; otherwise, the modifications should be made in the source directories and copied from there using the Unix "make" command. The required commands for the two cases are given below.

Source Directories Not Installed

The tape and disk configuration files in the run-time directories can be modified using the following commands:

    source <las-top-directory>/run/bin/setup_las
    cd $LASBASE
    cp -p tape.config tape.config_orig
    (edit tape.config to make desired changes)
    cp -p initlbl.config initlbl.config_orig
    (edit initlbl.config to make desired changes)
    cp -p disk.config disk.config_orig
    (edit disk.config to make desired changes)
Source Directories Installed

The following commands can be used to modify the tape and disk configuration files in the source directory and move them to the run-time directory:

    source <las-top-directory>/bin/setup_las/setup_las
    cd $LASROOT/las/env/tables
    cp -p tape.config tape.config_orig
    (edit tape.config to make desired changes)
    cp -p initlbl.config initlbl.config_orig
    (edit initlbl.config to make desired changes)
    cp -p disk.config disk.config_orig
    (edit disk.config to make desired changes)
    make DSTDIR=$LASTABLES

1.4 Creating Link to run_las Command

The PSU version of LAS includes a script, run/bin/run_las, which permits executing LAS commands either from within an interactive LAS session or from the Unix command line. This script automatically defines all required LAS environment variables.

If the local Unix system administrator creates a symbolic link to this script from a directory that is included in the default PATH for all users, individual users can invoke LAS simply by typing las, and do not need to modify their .cshrc or .profile files. For example,

    ln -s <las-top-directory>/run/bin/run_las \
    /opt/local/bin/las
will create a link from /opt/local/bin.

1.5 Building LAS from Source

Note: The scripts and makefiles for building LAS assume that the GNU C compiler, gcc, and an interpreter for Perl scripts are available. These may be downloaded from http://www.gnu.org/ and http://www.perl.com/, respectively. Because of the complex operating system interfaces involved, the two Xwindows modules, xid and tiepts, are built using the Sun SUNWspro cc compiler. See also the note about Netscape and gnuplot at the end of Section 1.1.

Building or rebuilding the LAS executables and run-time support directories from source requires performing the following steps:

  1. Create a new LAS directory tree from archive files
  2. Customize the build environment
  3. Finish customizing LAS for the local environment
  4. Build the support directories and executables
  5. Build additional version(s) of xid and tiepts
  6. Create a link to the "run_las" command

1.5.1 Creating New LAS Directory Tree from Archive Files

The first step follows the same basic procedures as described above for building the directory tree for executables and support libraries only, except that las74_src.tar must also be unpacked, and las74_run.tar is optional. If any of the modules from the EDC distribution which are not supported at PSU are wanted, then the las74_edc.tar archive will also need to be unpacked.

Before beginning, the directory which will serve as the top (root) of the LAS directory tree must be determined. If another version of LAS already exists under this LAS top directory, the entire directory tree should be backed up before starting the installation, since all files will be overwritten during the build.

The archive files can then be unpacked under the LAS top directory using the commands:

    mkdir -p  <las-top-directory>
    cd  <las-top-directory>
    gunzip -c las74_src.tar.gz | tar -xf -
    gunzip -c tae53c.tar.gz | tar -xf -
    gunzip -c las74_run.tar.gz | tar -xf - (optional)
    gunzip -c las74-edc.tar.gz | tar -xf - (optional)

1.5.2 Customizing the Build Environment

The build environment is set up by the lasinit script and the three scripts it calls, usrassign, pgmassign , and tae/bin/csh/setup_tae, which define additional directories and environment variables required during the build. Only the scripts lasinit itself and pgmassign normally need to be checked for compatability with the local environment. The possible changes are

lasinit The LAS Xwindows Image Display module ( xid ) uses the Unix environment variable LAS_RGBDATA to specify the directory containing the file rgb.txt, which defines standard names for colors. This directory may be different on different systems. If neither of the options in the PSU version of lasinit is correct, lasinit should be modified to specify the correct directory in both the "if" command and the "setenv" command which follows it.
pgmassign The Motif include and library directories needed to build the Xwindows applications also seem to be located in different places on different systems. The pgmassign script specifies their locations by defining the environment variables LAS_XMLIB and LAS_XMINC; the script may need to be edited to set these variables correctly.
The PSU versions of the usrassign and pgmassign scripts have commented out all references to ADAPS and other parts of the EDC distribution not supported at PSU; if desired, these references could be restored. Also, Unix filename syntax is the default; to make Catalog Manger syntax the default, change the definition of CFLAGS in pgmassign to "-O -D__DEFAULT_CM".

The required changes to lasinit and pgmassign can be made using the following commands:

    cd <las-top-directory>/las/env/assign
    cp -p lasinit lasinit_orig
    (edit lasinit to make desired changes)
    cp -p pgmassign pgmassign_orig
    (edit pgmassign to make desired changes)

1.5.3 Finish Customizing LAS for Local Environment

To finish customizing LAS for the local installation, the LAS startup procedures laslogon.pdf and lasgbls.pdf must be modified. The recommended modifications are:
laslogon.pdf This should be changed to provide welcome text appropriate to the local site.
lasgbls.pdf The default text for report headers, defined by LAS global variables $FNAME and $FADDR, should be changed to give the name and address of the local site. Default values for other variables may also be modified if desired.
The required commands are:

    cd <las-top-directory>/las/base/app/laslogon
    cp -p laslogon.pdf laslogon.pdf_orig
    (edit laslogon.pdf to make desired changes)
    cd ../lasgbls
    cp -p lasgbls.pdf lasgbls.pdf_orig
    (edit lasgbls.pdf to make desired changes)

In addition, if LAS is to be used to process input or output files on magnetic tape or if disk space is limited, the tape and disk configuration files described in Section 1.3.2 may need to be modified:

    cd <las-top-directory>/las/env/tables
    cp -p tape.config tape.config_orig
    (edit tape.config to make desired changes)
    cp -p initlbl.config initlbl.config_orig
    (edit initlbl.config to make desired changes)
    cp -p disk.config disk.config_orig
    (edit disk.config to make desired changes)

1.5.4 Building the Support Directories and Executables

The actual build of the LAS executables and support libraries is achieved using the Build_las script in las/env/install:
    <las-top-directory>/las/env/install/Build_las \
      <las-top-directory> >& build_las.out
The file build_las.out should be checked for compiler warning and error messages. An attempt has been made to eliminate all sources of warning and error messages which indicate substantive problems. As of November, 1998, however, the gcc compiler gives warning messages for one or more source files for baseline applications arc2las, asc2tab, classmap, edipsout, film, tiepts, and xid. Contributed modules gridmodel and segmoff also give warnings. Compilation of three baseline modules has been disabled, hrptcal (requires ADAPS support), menus (superceded by local version), and proclib (does not execute correctly). In each case, Build_las writes an error message indicating that the module was not built.

When a successful build has been achieved, Build_las can also be used to "clean" all the source files by removing object files, temporary libraries, etc.:

    <las-top-directory>/las/env/install/Build_las -clean \
      <las-top-directory> >& clean.out

1.5.5 Building Additional Version(s) of xid and tiepts

The two Xwindows modules, xid and tiepts, may need to be rebuilt for different versions of Solaris. As part of the transition from Solaris 2.5 (SunOS 5.5) to Solaris 2.6 (SunOS 5.6), Sun modified the Xwindows support libraries. If LAS is to be run on workstations which are still running Solaris 2.5, the two LAS Xwindows modules must be rebuilt. LAS distinguishes the different versions of the executables by appending the SunOS revision number to the module name, e.g. xid_5.5, xid_5.6, or xid_5.7, and selects the appropriate version when the user runs xid or tiepts. The 5.6 and 5.7 versions are identical, and only one needs to be present for systems running both Solaris 2.6 and 2.7.

Assuming that the file system containing the LAS directory tree is cross-mounted on all Sun workstations which are to be used for running LAS, the procedure for building alternate versions of xid and tiepts is

    rlogin <system running desired Solaris version>
    source <las-top-directory>/run/bin/setup_las
    setenv DSTDIR $LASBASE
    cd $LASROOT/las/base/app/xid
    rm *.o */*.o
    Build
    cd ../tiepts
    rm *.o */*.o
    Build

Note that the Build script uses Imakefile to create a new version of Makefile each time it is run, which replaces any earlier version.

1.5.6 Creating Link to "run_las" Command

The final step in building LAS is to create a link to the run_las script if this has not been done previously. Instructions for doing so are given in Section 1.4.

1.6 Building TAE from source

The "Classic" subset of the Transportable Applications Environment (TAE), version 5.3c, may be (re)built for the Sun Solaris operating system using the script tae/bldtae. This procedure (re)builds the object libraries in tae/lib and the executables in tae/bin from the source (tae/src) directories, referencing header files in tae/include. The other supporting directories (tae/demo, tae/help, tae/man, tae/pdf and tae/util) are not modified by bldtae. Note that to use this script, the environment variable TAE must be set to point to the tae directory.

In principal, TAE can also be build using the Imakefile, which should also permit porting it to other operating systems as well. However, the configuration files under tae/config may need some modification to work correctly with current versions of the operating systems they purportedly support.

1.7 Building an Individual LAS Application Module

Every LAS application is in a separate directory under las/base/app (or las/contrib/app and las/local/app for contributed and locally developed applications), which contains its own Makefile or, in a few cases, a Build file. To build a single application, make must be invoked twice: once to build and install the executable(s), and once to build and install the user's guide(s). In each case, it is necessary to explicitly specify the destination directory for the executables or HTML files, using the variable DSTDIR. The required commands, for a "local" application, are
    source <las-top-directory>/run/bin/setup_las
    cd $LASROOT/las/local/app/<application-name>
    make DSTDIR=$LASLOCAL las
    make DSTDIR=$LASDOC/user doc 

For baseline or contributed applications, "local" would be replaced by "base" or "contrib", respectively, wherever it occurs.

Note: The Xwindows applications xid and tiepts should not be built using make. Instead, the Build script must be used, as described in Section 1.5.5, , above.

1.8 Modifying LAS Menus

The PSU version of LAS provides two Perl scripts, bldmdf.pl and bldught.pl, to rebuild the LAS menu tree and to create a corresponding index to the HTML LAS user's guides, arranged according to the same functional hierarchy as the menus. The menu hierarchy and the assignment of individual LAS applications to menu categories is specified by two files in las/local/app/menus (the original EDC menus are preserved in las/base/app/menus, but are not installed under the PSU version of LAS). The menu-specification files in las/local/app/menus are:

hierarchy.menus Defines the top two levels of a three-level menu hierarchy. The top level provides for broad categories, such as "Data Input and Output" and "Image Registration and Merging". The second level refines these categories, e.g. "Image Input from Tape" and "Image to Image Registration". Cross references from one top-level category to entries under other top-level categories are also supported via a "see also:" directive. Each second-level category is assigned a unique three-letter key.
alpha.mdl An alphabetical listing of all LAS applications modules, specifying the three-letter key(s) of the second level category or categories under which each module should be listed. This file also includes the descriptive text for each module which is to appear on the LAS menu and in the index to the HTML user's guides.
To insert an additional application module into the existing menu structure, it is only necessary to edit the file alpha.mdl to insert the new module and then run make to rebuild the menu and help structures.

By convention, the descriptive text in for each module should begin with a verb. A code, enclosed in parentheses, is added after the description to indicate the origin of the module; at PSU, the values "B", "P", "B/P", and "C" are used to indicated baseline, PSU-developed (local), baseline with PSU modifications, and contributed modules from outside PSU, respectively. The three-letter key(s) specifying the menu category or categories under which the module should be listed are entered in lowercase.

The following commands can be used to add new applications to the menu and help structures:

    source <las-top-directory>/run/bin/setup_las
    cd $LASROOT/las/local/app/menus
    cp -p alpha.mdl alpha.mdl_old
    (use text editor to add new entries to alpha.mdl)
    make DSTDIR=$LASLOCAL las
    make DSTDIR=$LASDOC/user doc

Modifying the menu hierarchy specified by hierarchy.menus is more complicated. Not only must the hierarchy itself be modified, but the category to which each LAS application module is assigned must be reviewed and, if necessary, modified to match the new menu categories.

To simplify this process somewhat, an additional Perl script, listmdf.pl, is included in the LASTOOLS directory. This script creates a listing, sorted by second-level menu categories, of all application modules assigned to each category. Help on using this script is available by typing $LASTOOLS/listmdf.pl -h. It's output can be reviewed to determine which existing categories overlap with newly defined categories, and which application modules should be assigned to the new categories.


Last change: 2005 Feb. 25, R. A. White / raw@essc.psu.edu