% This file was created by the WP2LaTeX program version: 2.105 
\documentclass[11pt]{article}
\usepackage{wp2latex}


\begin{document}
\headtext{\allpages}{
%
\begin{center}
{\sc grass beginner's manual}
\end{center}
}
\pagenumpos{\pnbc}\begin{minipage}{\textwidth}
1INTRODUCTION
\end{minipage}
%
\begin{center}
{\Large {\bf 1.1  What's GRASS?}}
\end{center}

\bigskip
{\bf Definition / Development Policy / Data \& Capabilities}

GRASS is the Geographical Resources Analysis Support System. It is a public domain raster geographical
information system (GIS), vector GIS, image processing system, and graphics production system. It consists of some
250 separate programs (more than 300,000 lines of code).

The software for GRASS is free. The GRASS source code is provided to users, who may make changes to it.
GRASS is ready-made for interfacing with RIM (an RDBMS), MAPGEN (a cartographic output generator for
plotters), GCTP (a co-ordinate translation package), pbmplus (an image manipulation package), and xgen (a language
for generating X-windows interfaces). GRASS comes free with three sample data bases: {\it Spearfish, Imagery\/} (currently
not available), and {\it Global\/}.

\bigskip
\nwln
\begin{center}
{\bf {\Large 1.2  Documentation}}
\end{center}

\bigskip
{\bf Grass Command Descriptions}

Explanations of all the commands used in GRASS (which will be called 'tools' in the remainder of this text) are
provided by the user manual named {\it GRASS 4.0 Command Descriptions\/}. This consists of three volumes and is
thematically organised; for example, all raster tools are put together. The type of a tool is indicated by its first letter,
e.g. {\it r\/} for raster tools. 

Within each theme the tools are discussed in alphabetical order. For each tool a short description of its purpose, a
synopsis of its parameters, a description of its use, notes explaining some of the background, and a reference to
related tools are provided. You will save yourself and your System Administrator a lot of time if you start out by
reading through all command descriptions once before you use them.

For an extended discussion of tools, see sections 4.3, 6.1 - 6.5, 7.1 and 7.2.

\bigskip
{\bf Grass Tutorials}\\
 For many of the more involved GRASS procedures separate tutorials have been written. Tutorials are available for
the following subjects: Image Processing, Map Digitizing, Map Calculations, Inference Engine, Boolean Operations,
Tool Access, Weighting, Watershed Analysis and Data Extraction for DLG-3, DTED/DEM and TIGER formats. If
you plan to use a procedure for which a tutorial exists, you are strongly recommended to read it carefully first. 

This manual will refer you to the tutorials where appropriate.

\bigskip
{\bf Grass Training Source Materials}

If you're put off by all of the above learning materials, try the {\it Grass Training Source Materials\/} folder written by
Fred Limp. This provides the training materials for a 5-day intensive hands-on course, using the {\it spearfish\/} dataset.
Although it's geared to Grass 3.0 most of the stuff can still be used in Grass 4.0. The source materials are presented
in small chunks so as to fit on an overhead sheet.

\bigskip
{\bf [}
\testlastline

\begin{indenting}{1.27cm}
{\bf Grass Mailing List / Grass Clippings / Grass Programmers' Manual}
\end{indenting}


\zerotestlastline
\begin{indenting}{1.27cm}
The Systems Manager may help you contact the GRASS Mailing List, a public mailing list that you can
use to ask or answer questions and to find out if other GRASS users have already solved your problems.
Note that traffic on this list can be high (up to 15 messages a day), so your mailbox may become clogged
if you take out a regular subscription but do not regularly read your mail.
\end{indenting}


\zerotestlastline
\begin{indenting}{1.27cm}
The address to subscribe yourself to is {\bf grassu-request@moon.cecer.army.mil}. You should send them a
mail with the subject "subscription" and the text "subscribe yourname". For "yourname" you can use either
your username or some other name of your own choice, since the address the mail is sent from will be used
as the mailing address for all GRASS-mail.
\end{indenting}


\zerotestlastline
\begin{indenting}{1.27cm}
The quarterly {\it GRASS Clippings\/} keep you informed of current developments, new releases, past and future
research, etc. You can often find useful hints and scripts in it. Some of the scripts are reproduced in section
6.7 of this manual, and there's an index on the Clippings in Appendix B.
\end{indenting}


\zerotestlastline
\begin{indenting}{1.27cm}
For those who seriously intend to use Grass for their research and are not afraid of programming a {\it Grass
Programmers' Manual\/} is available. This is particularly useful where the Command Descriptions do not
provide enough information to solve a problem.\hfill {\bf ]}
\end{indenting}

\bigskip
\nwln
\begin{center}
{\bf {\Large 1.3  About This Manual}}
\end{center}

\bigskip
The user is urged to start his/her project by reading as much documentation as possible. This will save your own
time and that of the system manager or staff member assigned to assist you. This manual aims to provide information
that is not readily available from the other documentation mentioned in the previous section, or which is particular
to the configuration of hard- and software that is used at the Faculty of Environmental Sciences of the University
of Amsterdam. 

A set of {\it GRASS Beginner's Manuals\/} is provided with every terminal. 
\newpage
\begin{minipage}{\textwidth}
2CONFIGURATION
\end{minipage}
%
\begin{center}
{\bf {\Large 2.1  Configuration}}
\end{center}

\bigskip
{\bf Hardware configuration}

The complete hardware configuration is shown in the diagram below. At the moment of writing this, GRASS has
been installed both on the PS4 and RS(adam) machines and on the mainframe called {\it diamond\/}, which is located at
SARA. This in itself is not important for most users, since GRASS can be accessed over the network from all other
terminals. However, in some cases the user may wish to login twice to GRASS - something that cannot be done
within one version. Depending on the terminal that you are using, you may then have to tell the computer where to
get the data and/or where to write or display the results to.

{\bf [HARDWARE DIAGRAM]}

\bigskip
{\bf Software configuration}

GRASS is installed under AIX, the IBM version of the Unix Operating System, and its graphics are handled through
X-windows. Both Unix and X-windows are standard university environments for the workstation level. Network
software has been installed to connect the filesystems on various computers together, creating in effect one large
filesystem. This means that some problems may occur that have nothing to do with GRASS itself - and these can
generally be solved by knowing something about AIX and X-windows (manuals for both are available). 

Furthermore, since your data are likely to travel a lot over the local, university and national networks, it is well to
know something about this too. For networking the TCP-IP network protocol is used. This provides facilities for
remote login ('telnet') and file transfer ('ftp'). It is also possible to 'mount' part of one system's directory structure
onto another system's directory structure; it can then be used as if it were an integral part of the second system.

\bigskip
\nwln
\begin{center}
{\bf {\Large 2.2  Operating System Software}}
\end{center}

\bigskip
{\bf The Unix Operating System}

Unix is the most widely used OS on university level sites. Here at the GIS Group an IBM version of Unix, called
AIX, is used. In many ways Unix resembles DOS, IBM's PC-OS; you will recognise many of the commands,
although they may have other names. You will almost certainly need to work with some 10 to 20 very important
Unix commands. Moreover, you will have to teach yourself the use of Unix's standard file editor, called "vi" (for
"very incomprehensible").

To find out what you can do with Unix, the best thing is to simply browse through the Reference Manuals, of which
there are two large volumes (for the PS), or using the CD-Rom (for the RS) which contains {\it Info Explorer\/}, a
hypertext-like interactive manual. 

\bigskip
{\bf Network Facilities}

First of all, there is the 'remote login', which allows you to connect your terminal directly to some other computer.
All the work is done on that computer, but the input and output come from and go to your terminal. This procedure
is performed with the command {\bf telnet} or {\bf tn}.

Secondly, you may want to process your data using the processing power of a more powerful computer (the RS or
even the mainframe). This can be done by 'mounting' your part of the directory-tree over a directory on this more
\begin{tabbing}
\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=%
\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=%
\hspace{1.27cm}\=\hspace{1.27cm}\=\kill
powerful computer\footnote{\> Since the mounting procedure will temporarily make whatever was in that directory unavailable the command can only be initiated by the Systems Manager.}, or by executing a command in a so-called 'shell' on another computer. 
\end{tabbing}

 \bigskip
Thirdly, you may want to physically transport a file from one computer to another. Instead of copying onto a floppy
disc and recopying onto the new hard disk, you can use the {\bf file transfer program }or {\bf ftp}.

Fourthly, facilities for the sending and receiving of mail are provided. All Unix-computers provide the mailing
software {\bf mail}, and other mail handling software is generally available on most sites.

\bigskip
{\bf Help}

You can get general help concerning the operating system by issueing the command {\bf help}, or help concerning a
particular operating system command by typing {\bf man command}. Similar commands will provide help with ftp.

\bigskip
\nwln
\begin{center}
{\bf {\Large 2.3  Unix Startup}}
\end{center}

\bigskip
{\bf Preparing the Text Screen}

Most workplaces consist of two terminals, a small one for alphanumerical output (text) and a large one mainly for
graphical output (pictures). After you have been assigned a user name, number, and directory by the Systems
Manager, you can log in on your text terminal using your own name if you plan to use the 'local' machine, and as
'guest' on any other machine. In the latter case you have to do a remote login ('tn') to reach the machine that you
are a user on. 

 {\bf Preparing the Graphics Screen}

Before you start (and if nobody worked on it before you) you must prepare the graphics terminal. You must open
a 'shell', start X-windows, and decide what kind of monitor you want to use.

If the graphics terminal has not been used yet, it displays the 'login' screen. In that case you log in as 'guest'
(password 'gisguest'). Now, to be polite to other users who may wish to temporarily use your graphics terminal, you
must provide them with a way to temporarily override your display. This is done by opening a new command shell
with the command {\bf open sh}. You will see the screen 'jump' and a new 'guest' prompt appear.

Since GRASS's graphics output is handled by X-windows the next thing to do is to start X-windows with the
\begin{tabbing}
\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=%
\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=%
\hspace{1.27cm}\=\hspace{1.27cm}\=\kill
command {\bf xinit}\footnote{\> Except in the case of the 'xstat' monitor. There, X-windows is started as soon as the computer is turned on.}. Now X-Windows can be run with or without something called a 'Motif Window Manager'. The
\end{tabbing}
command 'xinit' will automatically start this window manager, which you will recognise by the blue-grey 'worktable'
\begin{tabbing}
\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=%
\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=%
\hspace{1.27cm}\=\hspace{1.27cm}\=\kill
edges that appear around the display windows\footnote{\> Except for the {\it xstat\/} terminal; here you have to issue a separate command to start the Motif window manager.}. You can stop these edges from appearing by pressing the left-hand
\end{tabbing}
mouse-button somewhere in the grey area, and choosing 'Quit MWM' from the menu that appears. What's the use
of all this? You will find out in section 3.1.

\bigskip
\bigskip
{\bf Changing shells}

You can see the effect of having opened a shell if you press the key combination {\bf [Alt]-[Ctrl]}. You will change over
from one 'shell', displaying the X-windows screen, to another, displaying the Unix prompt. Repeat the command
to return to your own shell.

\bigskip
{\bf Using the Motif Window Manager (mwm)}

If you have more than one Motif windows on your screen, note that at any one time only one of these is active, i.e.
can be written in. You can see which window is active because that window will have brighter edges than the others.
By clicking in a window you activate it.

The Motif edge around each window can be used to move, rescale, iconify or kill the window. By holding down the
left mouse button in the upper middle (name) bar, and dragging it to another spot, you can move the window around.
By dragging the sides, top, or bottom, you can change the size of the window in one direction; by dragging one of
the four corners of the window, you can change its size in two directions. To the left and right of the upper bar are
three special buttons. To the left is the dot button, which hides a menu from which you can make a choice. This is
mainly used to kill or hide the window. To the right there are the minus and square buttons. The minus button, when
clicked into, will iconify (minimize) the window and transport it to the lower left corner of the screen. You can
restore it by clicking into the icon and using the menu that appears. The square button is used to enlarge the window
until it fills the entire screen. 

 \nwln
\begin{center}
{\bf {\Large 2.4  Exiting Unix}}
\end{center}

\bigskip
{\bf Exiting X-Windows}

To stop the window manager (undo the Xinit command), type {\bf [Ctrl]-D} using the keyboard belonging with the
graphics terminal. This kills the current shell and returns you to the other shell.

\bigskip
{\bf Exiting Unix}

Both terminals now show the 'local' prompt for the machine(s) that you've logged in on. Logout is done by repeating
the command {\bf exit}, which will eventually return you to the startup 'login' screens on both terminals.

\newpage
\begin{minipage}{\textwidth}
3ACCESSING GRASS
\end{minipage}
%
\begin{center}
{\bf {\Large 3.1  Starting GRASS}}
\end{center}

\bigskip
{\bf Login, .Profile}

Directly after login you start GRASS by typing {\bf grass4.0}. If the operating system cannot find GRASS and returns
an error message, ask teh Systems Manager to add the path to the Grass program to your {\it .profile\/}. In the meantime,
you can always start GRASS on the PS with the extended command {\bf /u/bin/grass4.0}, and on the RS with
{\bf /usr/local/bin/grass4.0}.

The file called {\it .profile\/}, which lives in your home-directory, contains special settings for each user. Make things easy
\begin{tabbing}
\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=%
\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=%
\hspace{1.27cm}\=\hspace{1.27cm}\=\kill
for yourself and have your profile take care of all kinds of chores!\footnote{\> The \$GISDBASE, for instance, should not be equal to \$HOME, but should be set to \$HOME/data to avoid clogging up your \$HOME-directory with all sorts of files and directories.}
\end{tabbing}

\bigskip
{\bf Location, Mapset, Datapath}

Once in GRASS, you are invited to define three things; the Location, Mapset, and Database. All three are in fact
directories in Unix, and together they organise your data. 

The Location is the overall name for all the work you are going to do in GRASS within one specific geographic area.
This often coincides with the subject of your project, e.g. 'BELGIUM' or 'INNERCITY', and besides being the
directory that contains all the files of that project, the location also stores the map coordinate system and the
minimum and maximum map co-ordinates that you are going to use. All database queries and modifications are made
to the chosen location only; it is not possible to access multiple locations.

Within the location you must define at least one Mapset. This is the name of a subdirectory, in which you will store
all the files relating to one subject, e.g. within the location BELGIUM you may want to define a Mapset 'OECO'
for all maps with an oecological subject, and a Mapset 'INFRA' for all maps with an infrastructural subject. GRASS
always defines a mapset 'PERMANENT' which you are supposed to use as a kind of archive; you will work in a
mapset defined by yourself while making use, when necessary, of base maps stored in PERMANENT. The mapsets
are transparent to reading operations, but if you want to write, rename or delete maps in another mapset, you must
exit GRASS first and re-enter into the correct mapset.\\
 In order to enable GRASS to find your data, you must define a Database. This is the directory that will be used to
create the Location and Mapset(s) in. You are not free in the choice of datapath: you must use your HOME-directory
(assigned to you by the staff). If you do not know which directory that is, leave GRASS and type the commands
{\bf cd} (change directory) and {\bf pwd} (print which directory). Most likely the result will be something like
'/u/username/data'; this is what you fill in, when asked for the database.

Once you have defined all three and confirmed the definitions when GRASS askes for it, you arrive at the GRASS
starting screen. This displays a statement of ownership (not important) and a prompt: GRASS-GRID$>$. You are now
at liberty to enter either Unix or GRASS commands.

\bigskip
{\bf Starting a Monitor}

To make available (part of) the graphics screen to GRASS, you must use the command {\bf d.mon
start=$<$monitorname$>$}. For $<$monitorname$>$ you fill in whatever is the name of your monitor (a list of these can
be got by entering just {\bf d.mon -L} and following directions). A succesfully started monitor appears as a small black
window on the screen. If MWM was running when you started the monitor, it can be enlarged and moved with the
mouse. If MWM was not running, you're stuck with what you've got.

Note that there are multiple monitornames available. So which one do we choose? Generally, the important difference
is that between the monitors that have an 'x' in them, and the others. Normally, you will choose the monitor that
is named after your terminal. If you want more than one monitor at the same time, you may use one of the 'x'
monitors. 

\bigskip
\nwln
\begin{center}
{\bf {\Large 3.2  Logging Off}}
\end{center}

\bigskip
{\bf Exiting Grass}

Before exiting GRASS, you must stop the monitor(s) that you have used. This is done with the command {\bf d.mon
stop=$<$monitorname$>$}. If you don't remember the name of your monitor, remember to look at the top bar of the
monitor, which displays its name.

Exiting GRASS is easy; you just type {\bf exit} after the GRASS prompt and presto. Except that there are a few questions
to be answered: Do you want to save all of the maps (and mess) you just made? Are you sure? Things are organised
in such a way here that you can simply give two {\bf [Enter]}s and you've left GRASS for good.

\bigskip
\nwln
\begin{center}
{\bf {\Large 3.3  Grass Tool Access}}
\end{center}

\bigskip
{\bf Access Levels
}
As with most other software, GRASS offers various ways of accessing its tools. For beginners the easiest method
is typing just the tool name; you are then prompted for any other information GRASS may need to begin executing
that command. More advanced users may prefer typing the complete command-line (tool plus arguments) in one go.
The ultimate is of course to put these command lines together with UNIX commands into a shell-script so that you
only have to type in the script name. 

\bigskip
{\bf Important Keys}

Much-used keys in GRASS are the {\bf [Esc]} key, which is used for confirmation, and the {\bf [Ctrl]-C }key combination,
which is used to cancel commands. {\bf [Enter]} is used to move through menus.

\bigskip
{\bf Tutorial}

For extended guidance on tool access within GRASS, read the tutorial on this subject and see the general tools
section of this manual (6.1).

\bigskip
\nwln
\begin{center}
{\bf {\Large 3.4  The Grass Directory Tree}}
\end{center}

\bigskip
{\bf Directory Tree}

Let's have an excursion through your branch of the directory tree once you have made your first maps. We'll use
Unix as our vehicle, and start by finding out where we are with the command {\bf pwd} (print working directory). If you
have not changed directories since entering GRASS, Unix will display the name of your home directory (you
automatically go there everytime you log in). You can check where your HOME is with the command {\bf echo
\$HOME}; if you're not 'home, use {\bf cd} to get there.

Now, to find out which files and directories your HOME contains, type {\bf ls -l} (long listing). The result resembles that
of the 'dir'-command in DOS. You can travel down your tree with {\bf cd $<$directoryname$>$}, just as in DOS. You'll find
out that your tree looks essentially like this (but upside-down):
\nwln
\begin{center}
{\Large /}\\
(Root-directory; this is the base of the tree)
\end{center}
\nwln
\begin{center}
{\Large adam}\\
(Machine directory; this indicates the file system)
\end{center}
\nwln
\begin{center}
{\Large /u}\\
(Users-directory; this contains separate directories for all users)
\end{center}
\nwln
\begin{center}
{\Large /$<$name$>$}\\
(Your Home-directory; it is named after you)
\end{center}
\nwln
\begin{center}
{\Large /$<$locations$>$}\\
(One or more locations defined by you)
\end{center}

\begin{center}
{\Large /$<$mapsets$>$}\\
(One or more mapsets defined by you, plus the mapset PERMANENT,\\
which is created automatically by GRASS)
\end{center}
\nwln
\begin{center}
{\Large /cell  /dig  /site\_lists  etc}\\
(All maps of the same type - for instance, all binary vector maps - are put\\
together in a number of directories created automatically by GRASS - see below)
\end{center}
\nwln
\begin{center}
{\Large /$<$maps$>$}\\
(Here, at last, are your maps)
\end{center}

 \bigskip
The mapset level is the most important one in the tree. There, file access rules are applied. There, the maps you
create are automatically stored in the various subdirectories. The structure of a mapset is explored in the next section.
To return from wherever you may be in the tree to your HOME-directory, type {\bf cd}.

\bigskip
{\bf Mapset directory structure}

It will often be useful to know the directory structure created by GRASS in each mapset, not only to understand
more fully what the GIS does to your data, but also if you want to meddle with files using UNIX. Here a synopsis
of the structure of the standard mapset-subdirectories is given.

Some general information is stored in directories with capital letters: the default region is stored in
{\it DEFAULT\_WIND\/}, the current imagery group is {\it GROUP\/}, the current region in {\it WIND\/}, the search path used for
finding files is stored in {\it SEARCH\_PATH\/}, {\it MYNAME\/} stores a one line description for the location. Other directories
have lower-case names, such as {\it windows\/} and {\it 3d.view\/}, which contain unused region definitions and 3d view
parameters, respectively.

Some GRASS tools will, when used for the first time, create their own directory structure below the mapset level.
These directories are {\it COMBINE\/} (created by the r.combine tool), {\it WEIGHT\/} (the r.weight tool), {\it WATERSHED\/} (the
r.watershed tool), {\it group\/} (the i.group tool), {\it icons\/} (the p.icons tool), and {\it paint\/} (the p.label and p.map tools). Their
structure is discussed in the next section under the header {\bf Tool directories}.

The main body of GRASS data consists of site, vector, and cell map layers. Each of these is stored in a number of
directories:\nwln
\begin{tabbing}
\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=%
\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=%
\hspace{1.27cm}\=\hspace{1.27cm}\=\kill
$\bullet$\> Information about the creation history for each data layer is contained in the directory {\it hist\/}.
\end{tabbing}
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
Site files are stored in the directory {\it site\_lists\/}.
\end{indenting}
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
Vector maps are stored in the directories {\it dig, dig\_ascii, dig\_att, dig\_cats, and dig\_plus\/}.
\end{indenting}

\zerotestlastline
\begin{indenting}{1.27cm}
The dig\_ascii directory is used for the storing of ASCII-type vector files during import and export
procedures. GRASS's own (binary) vector files are stored in the dig directory; however, these files contain
'bare' vectors and need to be supported by other files in the dig\_att (attributes), dig\_cats (categories), and
dig\_plus (topology support) directories. 
\end{indenting}
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
Cell maps are stored in the directories {\it cell, cell\_misc, and cellhd\/}. The cell directory stores the main part
of the maps (the cell values); these files are supported by the corresponding files in the cell\_misc
(histogram, range) and cellhd (header) directories. (The cell\_misc directory in fact contains a subdirectory
for each map, containing a file 'range'.) Each cell map has a color table assigned to it in the directory {\it colr\/},
with an optional secondary color table in {\it colr2\/}.
\end{indenting}

 \bigskip
{\bf Tool Directories}

Tool directories are created by some GRASS tools under the current mapset. \nwln
\begin{tabbing}
\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=%
\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=%
\hspace{1.27cm}\=\hspace{1.27cm}\=\kill
$\bullet$\> The COMBINE directory contains scripts to produce one or more r.combine results.\\
$\bullet$\> The WATERSHED directory contains scripts to produce one or more r.watershed results.\\
$\bullet$\> The WEIGHT directory contains scripts to produce one or more r.weight results.
\end{tabbing}
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
The group directory contains definitions of groups of imagery files belonging together (e.g. the bands of
a satellite image), as produced with the i.group command.
\end{indenting}
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
The icons directory contains the icons created by you with the p.icons command and used by the d.icons
and p.map commands.
\end{indenting}
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
The paint directory contains labels and comments files used by the p.map command.
\end{indenting}

 \bigskip
This is a practice worth copying if you are working with scripts for some special purpose. Create a directory
PURPOSE and store all scripts for that purpose there.

\bigskip
\nwln
\begin{center}
{\bf {\Large 3.5  Practice Data: Spearfish}}
\end{center}

\bigskip
{\bf Tutorial}

Practice data are provided with GRASS. They are located in the directories /ps4/u4/grass4data and
/adam/rsprogs/grass4.0/data. The database '{\bf spearfish}' contains numerous maps for the spearfish area (Black
Mountains, USA); the database '{\bf imagery}' contains several raw satellite images of the same area (currently not
available). The database '{\bf global}' contains a number of lat-lon maps.

Practice data are accessed by linking the practice mapsets to a practice location under your HOME-directory. You
can then use the data without damaging them. The process of linking is done as follows:

{\bf cd \$HOME} [Go to your Home-directory]\\
{\bf mkdir spearfish} (or {\bf global}) [Create a Location to receive the practice data]\\
{\bf ln -s /ps4/u4/grass4data/spearfish }(or {\bf global}) {\bf /PERMANENT .} or\\
{\bf ln -s /adam/rsprogs/grass4.0/data/spearfish} (or {\bf global}) {\bf /PERMANENT .} [Create a symbolic link between the
directories]

Now you can start GRASS and fill in the starting screen as follows:

Location: {\bf spearfish} (or {\bf global})\\
Mapset:   {\bf practice} (or any other name but PERMANENT)\\
Database: {\bf the.path.to.your.home.directory}

\bigskip
\nwln
\begin{center}
{\bf {\Large 3.6  Problems \& Solutions}}
\end{center}

\bigskip
\bigskip
{\bf Documentation}\\
 If you're too lazy to consult the manuals, or somebody pinched them, there's an on-line help facility in GRASS. This
means that, without leaving GRASS, you can consult a file that contains the very same text as the {\it GRASS Command
Descriptions\/} do. It even does the searching for you! Of course you do have the disadvantage of seeing only one
screen (half a page) of text at a time...

To ask for help, type {\bf g.help}. GRASS will ask you what subject you are interested in, and will display a list of
possible subjects. By following GRASS's directions you will obtain information about the tools and options that are
available, and a little background. 

\bigskip
{\bf Login}

You may not be known as a user to the machine. Reasons: you have not been added as a user by the system
manager; or you have not logged in on a machine where you are known as a user. Solution: first, logoff, read the
manual and try again; second, ask the Systems Manager to help you.

\bigskip
{\bf Access}

If your machine cannot find {\bf grass4.0}, try {\bf /u/bin/grass4.0} and {\bf /usr/local/grass4.0/bin}. If these don't work you
probably forgot to do a 'remote login' or 'mount' (whichever is applicable); or the Systems Manager that gave you
a user ID forgot to adjust your .profile; get him to do it for you. Another access problem may occur if you try to
login when you are already in GRASS; in this case you should get a straight refusal-with-message from GRASS.

If, after having entered a Database, GRASS can't find any of your data, don't panic. You probably did one of two
things wrong: either you want to work with data that are not on the local machine and you have forgotten to do a
'remote login' or 'mount', or you made a mistake entering the Datapath. Go back and make repairs. If it still doesn't
work, get the Systems Manager to help.

\bigskip
{\bf Monitor}

As explained above, a GRASS monitor can only be started if the graphics display is properly prepared. If there's
something wrong here, take note of GRASS's error message: \\
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
If it says something about a 'Graph\_set' you simply have to tell GRASS again where the monitor is. This
is done with the command {\bf DISPLAY=$<$terminal$>$:0.0 ; export DISPLAY}, where you fill in the name of
your own terminal. Repeat the d.mon start=$<$monitorname$>$ command and this problem should be solved.
\end{indenting}
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
If GRASS complains that "the monitor is not running" and tries again, the problem is slightly more
complicated. The monitor has been maltreated and must be reset. The Systems Manager knows how to solve
this one quickly.
\end{indenting}
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
A third kind of monitor problem may occur when the monitor you wish to start is already running, or is
in use by someone else. If it's already running, use {\bf d.mon select=$<$monitorname$>$}. If it's in use, start
another. This kind of problem can be avoided by always stopping the monitor ({\bf d.mon
stop=$<$monitorname$>$}) before you exit GRASS.
\end{indenting}
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
Problem four occurs when the monitor you've called up appears on somebody else's screen. This is a nasty
one, because he/she will probably think that the fault is local, and will start messing up things even more.
So if this happens, stop the monitor at once. Read this manual carefully to find out what you've done wrong
and/or call the Systems Manager.
\end{indenting}

 \bigskip
A problem for which there is no message occurs when, while displaying a cell file, the monitor displays only part
of the columns, leaving the rest black. It is not known how this problem is caused, but it can be solved by stopping
and re-starting the monitor. For any other problems with the monitor, contact the Systems Manager (boy, is he going
to be busy...).

\bigskip
{\bf System speed}

Network problems will occur when there are many users at the same time. Processes will slow down, and eventually
the total amount of data transport over the net is so great that the special programs handling these data streams (NFS
servers) stop working. You won't normally loose any data if this happens. There is only one thing you can do and
that is to wait until the servers have regained their breath (or try to get other users to log off). 

Sometimes users create a lot of data in a short time, which may fill up the available disk space and lead to a general
halt of all processes. It may then be necessary for the whole system to shutdown and reboot; if this occurs you will
be warned beforehand. 

While it is possible to login from a computer outside the GIS rooms, this is not actually allowed, because the
Systems Manager cannot keep track of these outside users.

\bigskip
{\bf Logoff}

There are two things you should keep in mind when logging off: first, you must always {\bf stop }your monitor before
exiting GRASS, and second, you must {\bf exit }from all levels that you opened during login. So don't leave your terminal
as long as the "login:" prompt isn't displayed on both screens! 

\newpage
\begin{minipage}{\textwidth}
4DATA INPUT
\end{minipage}
%
\begin{center}
{\bf {\Large 4.1  Digitizing}}
\end{center}

\bigskip
{\bf Tutorial}

If you have digitised maps in other software and are now starting to digitize in Grass, you will have a distinct
advantage over those who come unprepared. Still, digitizing procedures differ for different software. Although the
basic steps (registration, vector digitizing, node snapping, topology building, labelling) are the same in most software,
the methodology, nomenclature, and menu interfaces may be very different. To learn to digitize in GRASS the
tutorial {\it v.digit\/} is available. 

Digitizing is done with the help of digitizing tables, the settings of which have to be adjusted to GRASS beforehand;
the Systems Manager will do this for you upon request.

\bigskip
\nwln
\begin{center}
{\bf {\Large 4.2  Importing Maps}}
\end{center}

\bigskip
{\bf Vector maps from Genamap}

If you want to import vector maps made in Genamap in GRASS, the first thing you have to do is prepare the proper
Genamap-output (the procedure is described in the {\it Genamap 5.1 Beginner's Manual\/}, section 15.1). When you are
finished with that, log in to GRASS and use the File Transfer Program to enter your directory on the RT ({\bf ftp rt}).
After you logged in on the RT, you travel to the 'ZF25' directory that exists under your work area. Transport the
ASCII export file (ending in .EE) with {\bf get $<$filename$>$}, and leave FTP with {\bf quit}. The export file will end up in your
HOME-directory. 

Conversion to a GRASS vectorfile proceeds in three steps:\\
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
from Genamap ASCII format to GRASS ASCII format, with the command {\bf v.in.genamap}. GRASS will ask
you for the name of the .EE file and will offer to save points, lines and areas in separate maps (each of
which has to be named by you). The resulting maps are saved in the Grass directory called 'dig\_ascii'.
\end{indenting}
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
from GRASS ASCII format to GRASS binary format, with the command {\bf v.in.ascii}. Again you get the
opportunity to change the name of the map; the result is written to the directory 'dig'.
\end{indenting}
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
from an unsupported binary vectorfile to a supported binary vector file, with the command {\bf v.support}.
'Supporting' a vectorfile entails two things. First, topology is generated. Since GRASS is more precise with
this than Genamap, you may find that some areas cannot be closed and their tags are rejected. Refer to the
GRASS-tutorial 'v.digit' for directions on solving this. Second, category support is created. This entails the
assignment of an integer value to every different tag encountered in the map. This information is written
to the directories 'dig\_cats' and 'dig\_att'.
\end{indenting}
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
clean up the files that you do not need anymore, using the unix command {\bf rm} for the files in '/arc' and the
Grass tool {\bf g.remove} for the ascii files.
\end{indenting}

 \bigskip
If all went well, you can now call up your GRASS vector map with the command {\bf d.vect} (- but remember first to
adjust the region to your new map).

\bigskip
{\bf Vector maps from ROOTS}

For maps digitised in ROOTS the following procedure should be followed:\\
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
export your map in ARC/INFO format. Export both 'chains' and 'labels', using extensions {\bf lin}, {\bf lab} and {\bf txt}.
\end{indenting}

\zerotestlastline
\begin{indenting}{1.27cm}
{\bf NB:} since the 'labels' are to become categories in Grass, you should only use numerical labels in ROOTS.
\end{indenting}
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
move the files by ftp or diskette to your Grass-directory. They should end up in a directory
{\it \$LOCATION/arc\/} (if this doesn't yet exist you should make it). If you are using a diskette, import the files
with the command {\bf dosread -a filename.old filename.new}. If you are importing the file over the network
you can simply {\bf get filename.old}, and convert it afterwards with {\bf dos2aix filename.old filename.new}.
\end{indenting}
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
use {\bf v.in.roots linesfile labelco-ordinatefile label-txtfile grass-filename} to convert the import files to a
Grass ASCII-file. {\bf NB:} a bug in this step creates a pair of 0's at the end of the dig\_ascii file in Grass; these
must be removed (using the file editor {\it vi\/}) before you go on with the next step.
\end{indenting}
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
convert the Grass ASCII-file to binary format with {\bf v.in.ascii}.
\end{indenting}
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
assign topology to the new map with {\bf v.support}.
\end{indenting}
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
clean up the files you don't need, using the unix command {\bf rm} for the files in '/arc' and the Grass tool
{\bf g.remove} for the ascii files.
\end{indenting}

\bigskip
{\bf Vector maps from Autocad/SDR3}

Acquiring data prepared in packages that are used in the field is done through conversion and import of DXF
(Drawing Interchange Format) formatted files. In particular, vector files from Autocad and SDR33 will be imported
using this format. Use the following procedure: \\
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
export the map from Autocad or SDR3 in {\it DXF format\/}.
\end{indenting}
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
use {\bf v.in.dxf} to convert the dxf files to Grass binary vector format
\end{indenting}
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
use {\bf v.support} to create topology
\end{indenting}
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
clean up the mess
\end{indenting}

\bigskip
{\bf Cell maps from IDRISI}

To import cell maps from IDRISI, use the following procedure:\\
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
export a binary cell file and a cellheader file from IDRISI
\end{indenting}
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
transport the files to Unix, using diskettes or ftp
\end{indenting}
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
convert the files to a Grass cell file with {\bf r.in.idrisi old.name new.name}.
\end{indenting}
$\bullet$
\testlastline

\begin{indenting}{1.27cm}
clean up the mess.
\end{indenting}

\nwln
\begin{center}
 {\bf {\Large 4.3  Reading In Tapes}}
\end{center}

\bigskip
{\bf Reading In Tapes}

Tapes containing satellite images have to be read in through SARA. This is done with the following procedure: first
(1) you should prepare a suitable Location and Mapset in GRASS, then (2) you contact SARA to have the tape
mounted onto the reading device, next (3) you read in the files using GRASS tools, and (4) you clean up the mess.
\nwln
\begin{tabbing}
\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=%
\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=%
\hspace{1.27cm}\=\hspace{1.27cm}\=\kill
1)\> GRASS must be run on SARA to be able to read in tapes. You establish contact with SARA by using the
\end{tabbing}
command {\bf tn diamond} and logging in as user {\bf a907tape} (the Systems Manager will tell you what the password is).
Then start GRASS creating a new Location and Mapset. The Location should be defined as having x/y coordinates,
the default region should be defined as minimum values (0, 0), maximum values (3500, 3500), resolution 1 x 1. The
choice of Mapset name is free.
\nwln
\begin{tabbing}
\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=%
\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=%
\hspace{1.27cm}\=\hspace{1.27cm}\=\kill
2)\> The tape will be mounted by SARA if you type the UNIX command {\bf rlvmount $<$tapenumber$>$}. The tape
\end{tabbing}
number has earlier been provided by SARA, when you handed them the tape. It always starts with the code S0,
followed by three numbers and one capital letter. Until the tape has been mounted you will see the message
"Awaiting mount ..." on screen. If the tape has not been mounted after 15 minutes, you should contact the SARA
information desk (tel. 5928016). The tape has been mounted when the message "Tape mount complete" appears.
\nwln
\begin{tabbing}
\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=%
\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=%
\hspace{1.27cm}\=\hspace{1.27cm}\=\kill
3)\> After the tape has been mounted you type {\bf i.tape.other} (for SPOT imagery) or {\bf i.tape.mss / i.tape.tm} (for
\end{tabbing}
Landsat imagery) to enter a menu in which you must specify tape parameters.

\zerotestlastline
\begin{indenting}{1.27cm}
{\it Enter device name:\/} {\bf /dev/rmt0}
\end{indenting}

\zerotestlastline
\begin{indenting}{1.27cm}
{\it Please mount and load tape\/} $<$enter$>$ 
\end{indenting}

\zerotestlastline
\begin{indenting}{1.27cm}
{\it Enter tape identification:\/} {\bf $<$tape id as provided by SPOT or Landsat$>$}
\end{indenting}

\zerotestlastline
\begin{indenting}{1.27cm}
{\it Enter image description:\/} {\bf (fill in your own description of the image)}
\end{indenting}

\zerotestlastline
\begin{indenting}{1.27cm}
{\it Enter title:\/} {\bf (ditto)}
\end{indenting}
Only the device name is compulsory; you may run through the other prompts with $<$enter$>$.
\nwln
\begin{center}
Generic Tape Extraction
\end{center}
Tape Layout

\zerotestlastline
\begin{indenting}{1.27cm}
{\it Number of files to be skipped:\/} {\bf 2} (to avoid reading headers and trailers)
\end{indenting}

\zerotestlastline
\begin{indenting}{1.27cm}
{\it Number of records in the remaining files to be skipped:\/} {\bf 0} (to avoid reading useless lines)
\end{indenting}
Band Files

\zerotestlastline
\begin{indenting}{1.27cm}
{\it Number of bands on the tape:\/} {\bf 3} (for SPOT; 7 for Landsat)
\end{indenting}
Data Format

\zerotestlastline
\begin{indenting}{1.27cm}
- {\it BSQ\/} (Band Sequential, for Landsat imagery)
\end{indenting}

\zerotestlastline
\begin{indenting}{1.27cm}
- {\it BIL\/} (Band Interleaved by Line, for SPOT imagery)
\end{indenting}
Enter an {\bf x} before the option of your choice.

\zerotestlastline
\begin{indenting}{1.27cm}
{\it Length of the longest record on the tape:\/} {\bf 5500} (for SPOT imagery)
\end{indenting}

\zerotestlastline
\begin{indenting}{1.27cm}
{\it Extract which bands:\/}
\end{indenting}

\zerotestlastline
\begin{indenting}{1.27cm}
- {\it Band 1\/}
\end{indenting}

\zerotestlastline
\begin{indenting}{1.27cm}
- {\it Band 2\/}
\end{indenting}

\zerotestlastline
\begin{indenting}{1.27cm}
- {\it Band 3\/} (depends on the number you entered earlier)
\end{indenting}
Extract all three bands.

\zerotestlastline
\begin{indenting}{1.27cm}
{\it Enter prefix name for bands to be extracted:\/} {\bf (all image bands will get this name in addition to a
numerical suffix corresponding to the band number)}
\end{indenting}

\zerotestlastline
\begin{indenting}{1.27cm}
{\it Start row:\/} {\bf 1}
\end{indenting}

\zerotestlastline
\begin{indenting}{1.27cm}
{\it End row:\/} (mentioned in your image documentation under: "Number of multispectral lines")
\end{indenting}

\zerotestlastline
\begin{indenting}{1.27cm}
{\it Start col:\/} {\bf 1}
\end{indenting}

\zerotestlastline
\begin{indenting}{1.27cm}
{\it End col:\/} (mentioned in your image documentation under: "Number of pixels per monospectral line")
\end{indenting}
Now, at last, the images are going to be read in. This will take about 5 minutes per band. Display all bands
separately on the screen with the {\bf d.rast} command for a final checkup.

{\bf NB:} Sometimes image band 2 (in SPOT images) is not read in correctly the first time around. You must remove it
(with the {\bf g.remove} command and re-execute the {\bf i.tape.other} command, selecting just Band 2 the second time
around. Note that, when describing the tape layout, you should still enter 3 as the number of bands on the tape.
\nwln
\begin{tabbing}
\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=%
\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=\hspace{1.27cm}\=%
\hspace{1.27cm}\=\hspace{1.27cm}\=\kill
4)\> Tell SARA to dismount the tape by issueing the command {\bf rlvunmount}. If you want to use the imagery
\end{tabbing}
locally instead of on diamond, you must transport the files by FTP to the right spot in your own directory tree. Don't
forget to remove the files on diamond after you checked that they were transported correctly, and note that satellite
imagery usually needs large files ($>$ 10Mb) so you can't simply transport and use them on our computers (ulimit too
low, disk space too low).

\bigskip
\nwln
\begin{center}
{\bf {\Large 4.4  Data Manipulation Tools}}
\end{center}

\bigskip
{\bf Tutorials}

Tutorials are available on TIGER in GRASS, DLG-3 data extraction, and DTED and DEM data extraction. The
currently available commands are listed below. 

\bigskip
{\bf Tools}

GRASS tools starting with 'm.' are used in the manipulation of external data. During the process of importing data
into GRASS it is often necessary to resample data in various ways. You should be aware that this always results in
a certain loss of data. When information about the tool is found lacking in the command description manuals,
remarks are added here.

{\it m.datum.shift\/}
\testlastline

\begin{indenting}{3.81cm}
returns geographic coordinates based on different spheroid (and datum) than the
one used to obtain the original coordinates.
\end{indenting}
{\it m.dem.examine\/} 
\testlastline

\begin{indenting}{3.81cm}
provides a terse description of USGS Digital Elevation Model (DEM) data files
stored on 1/2 inch magnetic tape.
\end{indenting}
{\it m.dem.extract\/} 
\testlastline

\begin{indenting}{3.81cm}
extracts USGS DEM data from 1/2 inch magnetic tape.
\end{indenting}
{\it m.dmaUSGSread\/} 
\testlastline

\begin{indenting}{3.81cm}
extracts DEM data produced by the DEfense Mapping Agency (DMA) but
supplied by the USGS (in a different tape format) on 1/2 inch magnetic tape.
\end{indenting}
{\it m.dted.examine\/} 
\testlastline

\begin{indenting}{3.81cm}
provides a terse desciption of level 1 and 2 digital terrain elevation data (DTED)
files produced by the DMA on 1/2 inch magnetic tapes.
\end{indenting}
{\it m.dted.extract\/} 
\testlastline

\begin{indenting}{3.81cm}
extracts DTED level 1 and 2 data produced and supplied by the DMA on 1/2
inch magnetic tape.
\end{indenting}
{\it m.examine.tape\/} 
\testlastline

\begin{indenting}{3.81cm}
provides a description of the files on a 1/2 inch magnetic tape.
\end{indenting}
{\it m.eigensystem\/} 
\testlastline

\begin{indenting}{3.81cm}
computes eigen values and eigen vectors for square matrices.
\end{indenting}
{\it m.gc2ll\/} 
\testlastline

\begin{indenting}{3.81cm}
converts geocentric to geographic coordinates.
\end{indenting}
{\it m.ll2gc\/} 
\testlastline

\begin{indenting}{3.81cm}
converts geographic to geocentric coordinates.
\end{indenting}
{\it m.ll2u\/} 
\testlastline

\begin{indenting}{3.81cm}
converts geographic coordinates to Universal Transverse Mercator (UTM)
coordinates.
\end{indenting}
{\it m.lulc.USGS\/} 
\testlastline

\begin{indenting}{3.81cm}
creates raster map layers from a Composite Theme Grid (CTG) file created by
{\it m.lulc.read\/}.
\end{indenting}
{\it m.lulc.read\/} 
\testlastline

\begin{indenting}{3.81cm}
extracts Landuse/Landcover data in the ASCII CTG data format distributed by
the USGS into a working file for {\it m.lulc.USGS\/}.
\end{indenting}
{\it m.region.ll\/} 
\testlastline

\begin{indenting}{3.81cm}
converts UTM coordinates falling within the current geographic region to
geographic coordinates.
\end{indenting}
{\it m.rot90\/} 
\testlastline

\begin{indenting}{3.81cm}
rotates elevation data extracted by either {\it m.dted.extract\/} or {\it m.dmaUSGSread\/}.
\end{indenting}
{\it m.u2ll\/} 
\testlastline

\begin{indenting}{3.81cm}
converts UTM coordinates to geographic coordinates.
\end{indenting}
\newpage
\begin{minipage}{\textwidth}
5DATA OUTPUT
\end{minipage}
%
\begin{center}
{\bf {\Large 5.1  Display Tools}}
\end{center}

\bigskip
{\bf Tools}

GRASS tools starting with 'd.' are used for the display of graphics on the monitor and for the
management of the monitor itself. Display abilities include 2-D display, 3-D display, profiles,
histograms, pie charts, graphs and screen dumps to hardcopy devices. The currently available commands
are listed below. When information about the tool is found lacking in the command description manuals,
remarks are added here.

{\it d.3d\/}
\testlastline

\begin{indenting}{3.81cm}
displays three-dimensional images based on raster map layers.
\end{indenting}
{\it d.ask\/}
\testlastline

\begin{indenting}{3.81cm}
prompts the user to select a GRASS data base file from among files displayed
in a menu on the graphics monitor.
\end{indenting}
{\it d.colormode\/}
\testlastline

\begin{indenting}{3.81cm}
allows the user to establish whether a map will be displayed using its own color
table or the fixed color table of teh graphics monitor.
\end{indenting}
{\it d.colors\/}
\testlastline

\begin{indenting}{3.81cm}
allows the user to interactively change the color table of a raster map layer
displayed on the graphics monitor.
\end{indenting}
{\it d.colortable\/}
\testlastline

\begin{indenting}{3.81cm}
displays the color table associated with a raster map layer.
\end{indenting}
{\it d.display\/}
\testlastline

\begin{indenting}{3.81cm}
a menu-driven, highly interactive display program for viewing maps and
producing final map products.
\end{indenting}
{\it d.erase\/}
\testlastline

\begin{indenting}{3.81cm}
erases the contents of the active display frame on the user's graphics monitor.
\end{indenting}
{\it d.font\/}
\testlastline

\begin{indenting}{3.81cm}
selects the font in which text will be displayed on the user's graphics monitor.
{\bf NB: }Some fonts cannot be used although they are displayed with {\bf show.fonts.sh}.
\end{indenting}
{\it d.frame\/}
\testlastline

\begin{indenting}{3.81cm}
manages display frames on the user's graphics monitor.
\end{indenting}
{\it d.geodesic\/}
\testlastline

\begin{indenting}{3.81cm}
displays a geodesic line, tracing the shortest distance between two geographic
points along a great circle, in a longitude/latitude data set.
\end{indenting}
{\it d.graph\/}
\testlastline

\begin{indenting}{3.81cm}
generates and displays simple graphics on the graphics display monitor.
\end{indenting}
{\it d.grid\/}
\testlastline

\begin{indenting}{3.81cm}
overlays a user-specified grid in the active display frame on the graphics
monitor.
\end{indenting}
{\it d.his\/}
\testlastline

\begin{indenting}{3.81cm}
produces and displays a raster map layer combining hue, intensity, and
saturation (his) values from user-specified input raster map layers.
\end{indenting}
{\it d.histogram\/}
\testlastline

\begin{indenting}{3.81cm}
displays a histogram in the form of a pie or bar chart for a user-specified raster
file.
\end{indenting}
{\it d.icons\/}
\testlastline

\begin{indenting}{3.81cm}
displays points, as icons, at user-defined locations in the active display frame on
the graphics monitor.
\end{indenting}
{\it d.labels\/}
\testlastline

\begin{indenting}{3.81cm}
creates and displays text labels in the active display frame on the graphics
monitor.
\end{indenting}
{\it d.legend\/}
\testlastline

\begin{indenting}{3.81cm}
displays a legend for a raster map layer in the active frame on the graphics
monitor.
\end{indenting}
{\it d.mapgraph\/}
\testlastline

\begin{indenting}{3.81cm}
generates and displays simple graphics on map layers drawn in the active
graphics monitor display frame.
\end{indenting}
{\it d.measure\/}
\testlastline

\begin{indenting}{3.81cm}
measures the lengths and areas of features drawn by the user in the active
display frame on the graphics monitor.
\end{indenting}
{\it d.menu\/}
\testlastline

\begin{indenting}{3.81cm}
creates and displays a menu within the active frame on the graphics monitor.
\end{indenting}
{\it d.mon\/}
\testlastline

\begin{indenting}{3.81cm}
to establish and control use of a graphics display monitor.
\end{indenting}
{\it d.paint.labels\/}
\testlastline

\begin{indenting}{3.81cm}
displays text labels formatted for use with GRASS paint ({\it p.labels, p.map\/}) output
to the active frame on the graphics monitor.
\end{indenting}
{\it d.points\/}
\testlastline

\begin{indenting}{3.81cm}
displays point graphics in the active display frame on the graphics display
monitor.
\end{indenting}
{\it d.profile\/}
\testlastline

\begin{indenting}{3.81cm}
displays profiles of a user-specified raster map layer.
\end{indenting}
{\it d.rast\/}
\testlastline

\begin{indenting}{3.81cm}
displays and overlays raster map layers in the active display frame on the
graphics monitor.
\end{indenting}
{\it d.rgb\/}
\testlastline

\begin{indenting}{3.81cm}
displays three user-specified raster map layers as red, green, and blue overlays
inthe active graphics display frame.
\end{indenting}
{\it d.rhumbline\/}
\testlastline

\begin{indenting}{3.81cm}
displays the rhumbline joining two user-specified points, in the active frame on
the user's graphics monitor.
\end{indenting}
[{\it d.savescreen\/}
\testlastline

\begin{indenting}{3.81cm}
screen capture utility for some MASSCOMP graphics monitors.]
\end{indenting}
{\it d.scale\/}
\testlastline

\begin{indenting}{3.81cm}
overlays a bar scale and north arrow for the current geographic region at a user-defined location in the active display frame.
\end{indenting}
{\it d.sites\/}
\testlastline

\begin{indenting}{3.81cm}
displays site markers in the active display frame on the graphics monitor.
\end{indenting}
{\it d.text\/}
\testlastline

\begin{indenting}{3.81cm}
draws text in the active display frame on the graphics monitor.
\end{indenting}
{\it d.title\/}
\testlastline

\begin{indenting}{3.81cm}
outputs a title for a raster map layer in a form suitable for display by {\it d.text\/}.
\end{indenting}
{\it d.vect\/}
\testlastline

\begin{indenting}{3.81cm}
displays GRASS vector data in the active frame on the graphics monitor.
\end{indenting}
{\it d.vect.dlg\/}
\testlastline

\begin{indenting}{3.81cm}
displays a USGS Digital Line Graph (DLG-3) binary vector file in the active
frame on the user's graphics monitor.
\end{indenting}
{\it d.what.rast\/}
\testlastline

\begin{indenting}{3.81cm}
allows the user to interactively query the category contents of multiple raster
map layers at user-specified locations within the current geographic region.
\end{indenting}
{\it d.what.vect\/}
\testlastline

\begin{indenting}{3.81cm}
allows the user to interactively query the category contents of a binary vector
map layer at user-selected locations within the current geographic region.
\end{indenting}
{\it d.where\/}
\testlastline

\begin{indenting}{3.81cm}
identifies the geographic coordinates associated with point locations in the active
frame on the graphics monitor.
\end{indenting}
{\it d.zoom\/}
\testlastline

\begin{indenting}{3.81cm}
allows the user to change the current geographic region settings interactively,
with a mouse.
\end{indenting}

\bigskip
\nwln
\begin{center}
{\bf {\Large 5.2  Paint Tools}}
\end{center}

\bigskip
{\bf Tools}

GRASS commands starting with 'p.' are used for the painting of graphics on paper. During the
composition phase of a paint-image, the screen is selected as output device with the command {\bf p.select
preview}. Hardcopy output on the Tektronix color printer consists of either paper sheets or transparencies
for overhead projection, both A4-sized (8 x 11 inches). The currently available commands are listed
below. When information about the tool is found lacking in the command description manuals, remarks
are added here.

{\it p.chart\/}
\testlastline

\begin{indenting}{3.81cm}
prints the color chart of the currently selected printer.
\end{indenting}

\zerotestlastline
\begin{indenting}{3.81cm}
{\bf NB:} this tool doesn't work.
\end{indenting}
{\it p.colors\/}
\testlastline

\begin{indenting}{3.81cm}
allows the user to develop a color table that associates map categories with user-specified printer colors.
\end{indenting}
{\it p.icons\/}
\testlastline

\begin{indenting}{3.81cm}
creates and modifies icons for map display and output.
\end{indenting}
{\it p.labels\/}
\testlastline

\begin{indenting}{3.81cm}
creates labels for hardcopy maps.
\end{indenting}
{\it p.map\/}
\testlastline

\begin{indenting}{3.81cm}
hardcopy color map output utility. 
\end{indenting}

\zerotestlastline
\begin{indenting}{3.81cm}
{\bf NB:} the 'comments' and 'colortable' options do not work.
\end{indenting}
{\it p.ppm\/}
\testlastline

\begin{indenting}{3.81cm}
reads portable pixmap (ppm) files created by PPM utilities.
\end{indenting}
[{\it p.screen\/}
\testlastline

\begin{indenting}{3.81cm}
prints a graphics monitor display image file that has been saved by {\it d.savescreen\/}.
{\bf NB:} this tool is not available for RS6000.]
\end{indenting}
{\it p.select\/}
\testlastline

\begin{indenting}{3.81cm}
selects a device (printer) for GRASS hardcopy output.
\end{indenting}

\zerotestlastline
\begin{indenting}{3.81cm}
{\bf NB:} if an error message appears when you try to change over from one device
to another, it can temporarily be solved by editing the file {\bf .grassrc} in your
home-directory, deleting the line 'PAINTER=....'
\end{indenting}

\bigskip
\nwln
\begin{center}
{\bf {\Large 5.3  Silicon Graphics 3d}}
\end{center}

\bigskip
One of the GIS displays (Meteoor) is powerful enough to allow the running of a special 3-d GRASS
tool, SG3d, which has a graphics user interface and produces shaded 3d graphics of cell, vector, and
sites maps. An SG3d manual is available.

\bigskip
\nwln
\begin{center}
{\bf {\Large 5.4  Hardcopy Maps and Images}}
\end{center}

\bigskip
{\bf Tektronix Color Wax Printer}

To send maps or images to the color printer, you have a choice between using the p.map tool or making
a screendump. 

For hardcopy output from p.map, you should run the p.select command and set PAINTER to "ppm".
P.map will then produce a file called paint.ppm. This file must be converted to PostScript format with
the command {\bf pnmtops $<$ppmfile$>$ $>$ $<$psfile$>$}, and sent to the printqueue by {\bf lpr -h -Pps $<$psfile$>$ \&}. 

If you want to make a screendump, you can use the {\bf dumpscreen} script, which will prompt you to
indicate which window must be dumped and will send the result to the printer.

 
{\bf IBM Page Printer / Digital Printserver}

You can also send images to the black-and-white printers in the GIS room or at the uvabalie (Building
B, room C 217). Prepare the images as black-and-white PostScript files and print them on the Page
Printer with {\bf lprint $<$filename$>$ \&}, on the Printserver with {\bf lpr -Psaruvalps2 -Cuva/13 -J$<$yourname$>$
$<$filename$>$ \&}. 

You can also send black\&white screendumps to these printers.

\bigskip
\nwln
\begin{center}
{\bf {\Large 5.5  Hardcopy Texts}}
\end{center}

\bigskip
{\bf IBM Page Printer / Digital Printserver}

Texts can be sent to the Page Printer using the {\bf lpr -h $<$filename$>$} command, and to the Printserver with
the {\bf lpr -Psaraps $<$filename$>$} command (if they are in PS format).
\newpage
\begin{minipage}{\textwidth}
6DATABASE: RIM
\end{minipage}
%
\begin{center}
{\bf {\Large 6.1  Creating a database in RIM}}
\end{center}

\bigskip
{\bf RIM User's Manual}

The RIM Users Manual provides extensive discussion of all RIM capabilities, and can be consulted in
the GIS-rooms. Sections 3.3 to 3.5 discuss the creation and accessing of a database and the loading of
data into that database.

\bigskip
{\bf Importing a Database}

It is best to prepare your database as a fixed-format ASCII file. This can be read without problems by
RIM; it is also a standard export format for most database programs (e.g. dBase).

\bigskip
\nwln
\begin{center}
{\bf {\Large 6.2  Using RIM with GRASS}}
\end{center}

\bigskip
{\bf Tools
}
Three tools are used in the handling of database information from GRASS: s.db.rim to select sites from
the database, and s.menu for further processing of the selected sites, and v.db.rim for the creation and
management of RIM vector databases.

\newpage
\begin{minipage}{\textwidth}
7GRASS TOOLS
\end{minipage}
%
\begin{center}
{\bf {\Large 7.1  General Tools}}
\end{center}

\bigskip
{\bf Tools}

GRASS commands starting with 'g.' are general data (file) management commands. The currently
available commands are listed below. When information about the tool is found lacking in the command
descriptio manuals, remarks are added here.

{\it g.access\/}
\testlastline

\begin{indenting}{3.81cm}
controls user access to the current GRASS mapset.
\end{indenting}
{\it g.ask\/}
\testlastline

\begin{indenting}{3.81cm}
prompts the user for the names of GRASS data base files.
\end{indenting}
{\it g.copy\/}
\testlastline

\begin{indenting}{3.81cm}
copies available data files in the user's current mapset search path and location
to the appropriate element directories under the user's current mapset.
\end{indenting}
{\it g.filename\/}
\testlastline

\begin{indenting}{3.81cm}
prints GRASS data base file names.
\end{indenting}
{\it g.findfile\/}
\testlastline

\begin{indenting}{3.81cm}
searches for GRASS data base files and sets variables for the shell.
\end{indenting}
{\it g.gisenv\/}
\testlastline

\begin{indenting}{3.81cm}
outputs the user's current GRASS variable settings.
\end{indenting}
{\it g.help\/}
\testlastline

\begin{indenting}{3.81cm}
GRASS help facility.
\end{indenting}
{\it g.list\/}
\testlastline

\begin{indenting}{3.81cm}
lists available GRASS data base files of the user-specified type to standard
output.
\end{indenting}
{\it g.manual\/}
\testlastline

\begin{indenting}{3.81cm}
accesses GRASS User's Reference Manual entries.
\end{indenting}
{\it g.mapsets\/}
\testlastline

\begin{indenting}{3.81cm}
modifies the user's current mapset search path, affecting the user's access to
data existing under the other GRASS mapsets in the current location.
\end{indenting}
{\it g.region\/}
\testlastline

\begin{indenting}{3.81cm}
program to manage the boundary definitions for the geographic region.
\end{indenting}
{\it g.remove\/}
\testlastline

\begin{indenting}{3.81cm}
removes data base element files from the user's current mapset.
\end{indenting}
{\it g.rename\/}
\testlastline

\begin{indenting}{3.81cm}
renames data base element files in the user's current mapset.
\end{indenting}
{\it g.tempfile\/}
\testlastline

\begin{indenting}{3.81cm}
creates a temporary file and prints the file name.
\end{indenting}
{\it g.version\/}
\testlastline

\begin{indenting}{3.81cm}
outputs the GRASS version number and date.
\end{indenting}

\bigskip
\nwln
\begin{center}
{\bf {\Large 7.2  Point Tools}}
\end{center}

 {\bf Tools}

GRASS commands starting with 's.' are used for the manipulation and analysis of site data. Sites
abilities include surface generation (interpolation), statistical operations, reclassification, transformation
to raster and vector, coordinate registration, database searches and retrievals, proximity analysis, and
import/export to the S statistical package. The currently available commands are listed below. When
information about the tool is found lacking in the command descriptio manuals, remarks are added here.

{\it s.db.rim\/}
\testlastline

\begin{indenting}{3.81cm}
RIM data base management/query interface for GRASS.
\end{indenting}
{\it s.in.ascii\/}
\testlastline

\begin{indenting}{3.81cm}
converts an ASCII site-list file in GRASS to binary format.
\end{indenting}
{\it s.menu\/}
\testlastline

\begin{indenting}{3.81cm}
accesses and manipulates GRASS sites data.
\end{indenting}
{\it s.out.ascii\/}
\testlastline

\begin{indenting}{3.81cm}
converts a binary site-list file in GRASS to ASCII format.
\end{indenting}
{\it s.surf.idw\/}
\testlastline

\begin{indenting}{3.81cm}
generates a surface from sites data.
\end{indenting}

\bigskip
\nwln
\begin{center}
{\Large {\bf 7.3  Vector Tools}}
\end{center}

\bigskip
{\bf Tutorial}

A tutorial is available on the v.digit tool. 

\bigskip
{\bf Tools}

GRASS commands starting with 'v.' are used for the manipulation and analysis of vector data. Vector
abilities include digitizing, editing, labeling, measurements, import/export, full topological linking,
display, patching, transformation to raster, grid generation, and contour labeling. The currently available
commands are listed below. When information about the tool is found lacking in the command
description manuals, remarks are added here.

{\it v.area\/}
\testlastline

\begin{indenting}{3.81cm}
displays GRASS area and perimeter information for GRASS vector map.
\end{indenting}
{\it v.cadlabel\/}
\testlastline

\begin{indenting}{3.81cm}
attaches labels to (binary) vector contour lines that have been imported to
GRASS from DXF format.
\end{indenting}
{\it v.clean\/}
\testlastline

\begin{indenting}{3.81cm}
cleans out dead lines in GRASS vector files.
\end{indenting}
{\it v.db.rim\/}
\testlastline

\begin{indenting}{3.81cm}
RIM data base management/query interface for GRASS vector files. {\bf NB:}
running this tool without problems is rather difficult (see section 6.2).
\end{indenting}
{\it v.digit\/}
\testlastline

\begin{indenting}{3.81cm}
a menu-driven, highly interactive map development program used for vector
digitizing, editing, labeling and conversion to raster format.
\end{indenting}
{\it v.import\/}
\testlastline

\begin{indenting}{3.81cm}
converts ASCII Digital Line Graph (DLG) files, binary DLG files, and ASCII
vector files into binary vector files, and creates the needed vector support files.
\end{indenting}
{\it v.in.ascii\/}
\testlastline

\begin{indenting}{3.81cm}
converts ASCII vector map layers into binary vector map layers.
\end{indenting}
{\it v.in.dlg\/}
\testlastline

\begin{indenting}{3.81cm}
converts an ASCII or binary USGS DLG-3 (bdlg) file to a binary GRASS vector
(dig) file.
\end{indenting}
{\it v.in.dxf\/}
\testlastline

\begin{indenting}{3.81cm}
converts files in DXF format to ASCII or binary GRASS vector file format.
\end{indenting}
{\it v.in.genamap\/}
\testlastline

\begin{indenting}{3.81cm}
converts an ASCII Genamap export file into a GRASS ASCII vector file.
\end{indenting}
{\it v.mkgrid\/}
\testlastline

\begin{indenting}{3.81cm}
creates a binary GRASS vector map of a user-defined grid.
\end{indenting}
{\it v.mkquads\/}
\testlastline

\begin{indenting}{3.81cm}
creates a GRASS vector map layer and/or sites list and/or geographic region
definition file for a USGS 7.5 minute quadrangle.
\end{indenting}
{\it v.out.arc\/}
\testlastline

\begin{indenting}{3.81cm}
converts GRASS vector files to ARC/INFO's "Generate" file format.
\end{indenting}
{\it v.out.ascii\/}
\testlastline

\begin{indenting}{3.81cm}
converts a binary GRASS vector map layer to an ASCII GRASS vector map
layer.
\end{indenting}
{\it v.out.dlg\/}
\testlastline

\begin{indenting}{3.81cm}
converts binary GRASS vector data to binary DLG-3 Optional vector data
format.
\end{indenting}
{\it v.out.moss\/}
\testlastline

\begin{indenting}{3.81cm}
converts GRASS site, line or area data into MOSS import format.
\end{indenting}
{\it v.patch\/}
\testlastline

\begin{indenting}{3.81cm}
creates a new binary vector map layer by combining other binary vector map
layers.
\end{indenting}
{\it v.prune\/}
\testlastline

\begin{indenting}{3.81cm}
prunes points from binary GRASS vector data files.
\end{indenting}
{\it v.stats\/}
\testlastline

\begin{indenting}{3.81cm}
prints information about a binary GRASS vector map layer.
\end{indenting}
{\it v.support\/}
\testlastline

\begin{indenting}{3.81cm}
creates GRASS support files for binary GRASS vector data.
\end{indenting}
{\it v.to.rast\/}
\testlastline

\begin{indenting}{3.81cm}
converts a binary GRASS vector map layer into a GRASS raster map layer.
\end{indenting}
{\it v.to.sites\/}
\testlastline

\begin{indenting}{3.81cm}
converts point data in a binary GRASS vector map layer into a GRASS site-list
file.
\end{indenting}
{\it v.transform\/}
\testlastline

\begin{indenting}{3.81cm}
transforms an ASCII vector map layer from one coordinate system into another.
\end{indenting}
{\it v.trim\/}
\testlastline

\begin{indenting}{3.81cm}
trims small spurs, and removes excessive nodes from a binary GRASS vector
file.
\end{indenting}

\bigskip
\nwln
\begin{center}
{\bf {\Large 7.4  Raster Tools}}
\end{center}

\bigskip
{\bf Tutorials}

Tutorials are available for the r.weight, r.combine, r.infer, r.mapcalc and r.watershed tools. 

\bigskip
{\bf Tools}

GRASS commands starting with 'r.' are used for the manipulation and analysis of raster data. Raster
abilities include overlay (boolean, weighed, cellophane or rule based), full mathematical functions, filters,
proximity analysis, measurements (length, area, volume, counts), clustering, import/export, line-of-sight,
cost analysis, transformation to vector, rotation, patching, reclassification, network flow analysis,
thinning, and elevation transformations. The currently available commands are listed below. When
information about the tool is found lacking in the command description manuals, remarks are added here.

{\it r.average\/}
\testlastline

\begin{indenting}{3.81cm}
finds the average of values in a values map within areas assigned the same
category value in a user-specified base map.
\end{indenting}
{\it r.basins.fill\/}
\testlastline

\begin{indenting}{3.81cm}
generates a raster map layer showing watershed subbasins.
\end{indenting}
{\it r.binfer\/}
\testlastline

\begin{indenting}{3.81cm}
Bayesian expert system development program.
\end{indenting}
{\it r.buffer\/}
\testlastline

\begin{indenting}{3.81cm}
creates a raster map layer showing buffer zones surrounding cells that contain
non-zero category values.
\end{indenting}
{\it r.cats\/}
\testlastline

\begin{indenting}{3.81cm}
prints category values and labels associated with user-specified raster map
layers.
\end{indenting}
{\it r.clump\/}
\testlastline

\begin{indenting}{3.81cm}
recategorizes data in a raster map layer by grouping cells that form physically
discrete areas into unique categories.
\end{indenting}
{\it r.coin\/}
\testlastline

\begin{indenting}{3.81cm}
tabulates the mutual occurrence (coincidence) of categories for two raster map
layers.
\end{indenting}
{\it r.colors\/}
\testlastline

\begin{indenting}{3.81cm}
creates/modifies the color table associated with a raster map layer. {\bf NB:} the color
table 'grey.eq' stretches the \uline{color} histogram, not the cell values.
\end{indenting}
{\it r.combine\/}
\testlastline

\begin{indenting}{3.81cm}
allows category values from several raster map layers to be combined.
\end{indenting}
{\it r.compress\/}
\testlastline

\begin{indenting}{3.81cm}
compresses and decompresses raster files.
\end{indenting}
{\it r.cost\/}
\testlastline

\begin{indenting}{3.81cm}
outputs a raster map layershowing the cumulative cost of moving between
different geographic locations on an input raster map layer whose cell category
values represent cost.
\end{indenting}
{\it r.covar\/}
\testlastline

\begin{indenting}{3.81cm}
outputs a covariance/correlation matrix for user-specified raster map layers.
\end{indenting}
{\it r.cross\/}
\testlastline

\begin{indenting}{3.81cm}
creates a cross-product of the category values from multiple raster map layers.
\end{indenting}
{\it r.describe\/}
\testlastline

\begin{indenting}{3.81cm}
prints terse list of category values found in a raster map layer.
\end{indenting}
{\it r.digit\/}
\testlastline

\begin{indenting}{3.81cm}
allows on-screen digitizing of a raster map layer.
\end{indenting}
{\it r.drain\/}
\testlastline

\begin{indenting}{3.81cm}
traces a flow through an elevation model on a raster map layer.
\end{indenting}
{\it r.grow\/}
\testlastline

\begin{indenting}{3.81cm}
generates an output raster map layer with contiguous areas grown by one cell.
\end{indenting}
{\it r.in.ascii\/}
\testlastline

\begin{indenting}{3.81cm}
converts an ASCII raster text file into a binary raster map layer.
\end{indenting}
{\it r.in.ll\/}
\testlastline

\begin{indenting}{3.81cm}
converts raster data referenced using lat-lon coordinates to a UTM-referenced
map layer in GRASS raster format.
\end{indenting}
{\it r.infer\/}
\testlastline

\begin{indenting}{3.81cm}
outputs a raster map layer whose category values represent the application of
user-specified criteria (rules statements) to other raster map layers' category
values.
\end{indenting}
{\it r.info\/}
\testlastline

\begin{indenting}{3.81cm}
outputs basic information about a user-specified raster map layer.
\end{indenting}
{\it r.line\/}
\testlastline

\begin{indenting}{3.81cm}
converts a raster map layer into a vector map layer.
\end{indenting}
{\it r.los\/}
\testlastline

\begin{indenting}{3.81cm}
line-of-sight raster analysis program.
\end{indenting}
{\it r.mapcalc\/}
\testlastline

\begin{indenting}{3.81cm}
raster map layer data calculator.
\end{indenting}
{\it r.mask\/}
\testlastline

\begin{indenting}{3.81cm}
establishes or removes the current working mask.
\end{indenting}
{\it r.mfilter\/}
\testlastline

\begin{indenting}{3.81cm}
raster file matrix filter.
\end{indenting}
{\it r.neighbors\/}
\testlastline

\begin{indenting}{3.81cm}
makes each cell category value a function of the category values assigned to the
cells around it, and stores the new cell values in an output raster map layer.
\end{indenting}
{\it r.out.ascii\/}
\testlastline

\begin{indenting}{3.81cm}
converts a raster map layer into an ASCII text file.
\end{indenting}
{\it r.patch\/}
\testlastline

\begin{indenting}{3.81cm}
creates a composite raster map layer by using known category values from one
or more map layers to fill in areas of "no data" in another map layer.
\end{indenting}
{\it r.poly\/}
\testlastline

\begin{indenting}{3.81cm}
extracts area edges from a raster map layer and converts data to GRASS vector
format.
\end{indenting}
{\it r.profile\/}
\testlastline

\begin{indenting}{3.81cm}
outputs the raster map layer values lying on user-defined lines.
\end{indenting}
{\it r.random\/}
\testlastline

\begin{indenting}{3.81cm}
creates a raster map layer and site list file containing randomly located sites.
\end{indenting}
{\it r.reclass\/}
\testlastline

\begin{indenting}{3.81cm}
creates a new map layer whose category values are based upon the user's
reclassification of categories in an existing raster map layer.
\end{indenting}
{\it r.report\/}
\testlastline

\begin{indenting}{3.81cm}
reports statistics for raster map layers.
\end{indenting}
{\it r.resample\/}
\testlastline

\begin{indenting}{3.81cm}
GRASS raster map layer data resampling capability.
\end{indenting}
{\it r.rescale\/}
\testlastline

\begin{indenting}{3.81cm}
rescales the range of category values in a raster map layer.
\end{indenting}
{\it r.slope.aspect\/}
\testlastline

\begin{indenting}{3.81cm}
generates raster map layers of slope and aspect from a raster map layer of true
elevation values.
\end{indenting}
{\it r.stats\/}
\testlastline

\begin{indenting}{3.81cm}
generates area statistics for raster map layers.
\end{indenting}
{\it r.support\/}
\testlastline

\begin{indenting}{3.81cm}
allows the user to create or modify raster map layer support files.
\end{indenting}
{\it r.surf.contour\/}
\testlastline

\begin{indenting}{3.81cm}
surface generation program.
\end{indenting}
{\it r.surf.idw\/}
\testlastline

\begin{indenting}{3.81cm}
surface interpolation utility for raster map layers.
\end{indenting}
{\it r.surf.idw2\/}
\testlastline

\begin{indenting}{3.81cm}
surface generation program.
\end{indenting}
{\it r.thin\/}
\testlastline

\begin{indenting}{3.81cm}
thins line-like features in raster map layers, to be used as input for {\it r.line\/}.
\end{indenting}
{\it r.transect\/}
\testlastline

\begin{indenting}{3.81cm}
outputs raster map layer values lying along user-defined transect lines.
\end{indenting}
{\it r.volume\/}
\testlastline

\begin{indenting}{3.81cm}
calculates the volume of data "clumps", and (optionally) produces a GRASS
site-list file containing the calculated centroids of these clumps.
\end{indenting}
{\it r.watershed\/}
\testlastline

\begin{indenting}{3.81cm}
watershed basin analysis program.
\end{indenting}
{\it r.weight\/}
\testlastline

\begin{indenting}{3.81cm}
raster map overlay program.
\end{indenting}
{\it r.what\/}
\testlastline

\begin{indenting}{3.81cm}
queries raster map layers on their category values and category labels.
\end{indenting}

\bigskip
\nwln
\begin{center}
{\bf {\Large 7.5  Imagery Tools}}
\end{center}

\bigskip
{\bf Tutorial}

A tutorial is available on image processing, discussing all imagery tools. 

\bigskip
{\bf Tools}

GRASS commands starting with 'i.' are used for the manipulation and analysis of imagery (multi-spectral) data. They allow the user to read remotely sensed images from LANDSAT multi-spectral
scanner (MSS) and thematic mapper (TM) and SPOT, and to read scanned maps or photographs.
Imagery abilities include tape handling for multiple formats, scene and sub-scene extraction, color
enhancements, image registration, terrain correction, automated classification, user directed classification,
filtering, histograms, and full integration with raster operations. The currently available commands are
listed below. When information about the tool is found lacking in the command description manuals,
remarks are added here.

{\it i.cca\/}
\testlastline

\begin{indenting}{3.81cm}
canonical components analysis (CCA) program for image processing.
\end{indenting}
{\it i.class\/}
\testlastline

\begin{indenting}{3.81cm}
generates spectral signatures for an image by allowing the user to outline areas
of interest.
\end{indenting}
{\it i.cluster\/}
\testlastline

\begin{indenting}{3.81cm}
generates spectral signatures for land cover types in an image using a clustering
algorithm.
\end{indenting}
{\it i.colors\/}
\testlastline

\begin{indenting}{3.81cm}
creates colors for imagery groups.
\end{indenting}
{\it i.composite\/}
\testlastline

\begin{indenting}{3.81cm}
creates a color composite image from three imagery band files specified by the
user.
\end{indenting}
{\it i.fft\/}
\testlastline

\begin{indenting}{3.81cm}
fast Fourier Transform (FFT) for image processing.
\end{indenting}
{\it i.grey.scale\/}
\testlastline

\begin{indenting}{3.81cm}
interactively assigns a histogram contrast stretch grey scale color table to a raster
map layer. 
\end{indenting}

\zerotestlastline
\begin{indenting}{3.81cm}
{\bf NB:} this tool does \uline{not} change the cell values, just the color table.
\end{indenting}
{\it i.group\/}
\testlastline

\begin{indenting}{3.81cm}
creates and edits groups and subgroups of raster imagery files.
\end{indenting}
{\it i.his.rgb\/}
\testlastline

\begin{indenting}{3.81cm}
hue-intensity-saturation (his) to red-green-blue (rgb) raster map color
transformation function.
\end{indenting}
{\it i.ifft\/}
\testlastline

\begin{indenting}{3.81cm}
inverse fast Fourier Transform (IFFT) for image processing.
\end{indenting}
{\it i.maxlik\/}
\testlastline

\begin{indenting}{3.81cm}
classifies the cell spectral reflectances in imagery data based on the spectral
signature information generated by {\it i.cluster\/} or {\it i.class\/}.
\end{indenting}
{\it i.median\/}
\testlastline

\begin{indenting}{3.81cm}
interactively creates a raster map layer whose color table is based on the red,
green and blue color values present in existing, user-specified imagery group
files.
\end{indenting}
{\it i.pca\/}
\testlastline

\begin{indenting}{3.81cm}
principal components analysis (PCA) program for image processing.
\end{indenting}
{\it i.points\/}
\testlastline

\begin{indenting}{3.81cm}
enables the user to mark coordinate system points on an image to be rectified
and then input the coordinates of each point for creation of a coordinate
transformation matrix.
\end{indenting}
{\it i.rectify\/}
\testlastline

\begin{indenting}{3.81cm}
rectifies an image by computing a coordinate transformation for each cell (pixel)
in the image using the transformation coefficient matrix created with {\it i.points\/}.
\end{indenting}
{\it i.rgb.his\/}
\testlastline

\begin{indenting}{3.81cm}
red-green-blue (rgb) to hue-intensity-saturation (his) function for image
processing.
\end{indenting}
{\it i.tape.mss\/}
\testlastline

\begin{indenting}{3.81cm}
extracts Multispectral Scanner (MSS) imagery data from half-inch tape.
\end{indenting}
{\it i.tape.mss.h\/}
\testlastline

\begin{indenting}{3.81cm}
extracts header information from LANDSAT MSS imagery data stored on half-inch tape.
\end{indenting}
{\it i.tape.other\/}
\testlastline

\begin{indenting}{3.81cm}
extracts scanned aerial imagery (NHAP, etc.) and SPOT imagery from half-inch
tape.
\end{indenting}
{\it i.tape.tm\/}
\testlastline

\begin{indenting}{3.81cm}
extracts LANDSAT Thematic Mapper (TM) imagery from half-inch tape.
\end{indenting}
{\it i.zc\/}
\testlastline

\begin{indenting}{3.81cm}
zero-crossing "edge detection" raster function for image processing.
\end{indenting}

\bigskip
\nwln
\begin{center}
{\bf {\Large 7.6  Shell-scripting}}
\end{center}

\bigskip
{\bf Make Your Own Tools}

Shell-scripts are little programs that combine GRASS-commands with commands to the AIX Operating
System. Essentially, scripts just contain a list of all the commands that you could have entered on the
keyboard, but which are now executed by the operating system. They can be compared to 'macros' on
the PC.

If you want to do something complicated, or repetitious, or taking a lot of time, the script can do it
faultlessly and it won't get tired. Learning to write scripts is not difficult; just read the {\it UNIX Shell
Programming \/}manual (available in the GIS-rooms). You will have to learn to use the Unix file editor
VI to do the actual writing of the scripts (see section 8.1).

Some example scripts can be found in {\it Grass Clippings\/}, the quarterly newsletter. Scripts contributed by
GRASS-users all over the world can be found in GRASS's ftp directory under "src/related".

\newpage
\begin{minipage}{\textwidth}
8TROUBLESHOOTING
\end{minipage}
%
\begin{center}
{\bf {\Large 8.1  Unix Trouble}}
\end{center}

\bigskip
{\bf Backups}

Weekly backups of all user data are made by the Systems Manager. If you want more frequent backups
or want to transport your data to a sytem that cannot be reached through the networks, contact the
Systems Manager. You will be ask to provide the proper means of storage (diskette, tape or other)
yourself.

\bigskip
{\bf File Size}

There is a limit to the size your files may have in the computer, the so-called {\bf ulimit}. The default ulimit
is about 4.2 Mb. So if you are using maps with a lot of cells you may run into this particular problem,
which causes process interrupts and all kinds of warnings. If you're serious about using large files, ask
the Systems Manager to change your ulimit.

\bigskip
{\bf Compressing}

When you're moving data around over the network, it may be to your advantage to compress your files
first. GRASS files are automatically compressed before they are stored, but other files (e.g. export files)
are not compressed. You can use the {\bf compress} command.

\bigskip
{\bf Background Procedures}

You will find that some procedures in GRASS allow the user to continue working while they are
running. This is called "running in the background". Not all GRASS-tools use it, so if you want to
perform some time-consuming operation and do not want to wait for it to finish, you can run it in the
background by using the UNIX command {\bf \&}. By placing the \& after the command and before the
$<$enter$>$, the command is placed in the background. A process number will be displayed on your screen
and, by giving an $<$enter$>$, you are returned to the GRASS prompt. You will not be warned when the
process is finished.

\bigskip
{\bf VI}

Any file editing in UNIX must be done with the standard editor VI. This is a bit complicated to work
with, so here is some advice on how to use it. You start by creating a file with {\bf vi filename}. Your screen
is then filled with \~{}-signs in the first row. The cursor is on the first line and in so-called {\it command
mode\/}. This means that anything you type will be interpreted as a command by VI. Your first command
must be to change into {\it edit mode\/}, in order to start writing. You do this by typing an {\bf i} (for insert). Now
you can start writing whatever text you have in mind. 

The important thing to remember is, that VI will not do anything for you without receiving a specific
command. For instance, it will not break off a line once it has reached the right side of the screen
(usually at position 80); it will just "wrap around" to the next line. If you want to end a line, you will
have to give an $<$enter$>$. Equally, if you have made a typing error, you will have to change over to
command mode by pressing $<$Esc$>$, then move the cursor with the arrow keys, then delete (with {\bf x}) or
replace (with {\bf r}) the mistake. 

Changing over continually from edit mode to commmand mode will take some time to learn. You had
best start by reading the pages on VI in the AIX Reference Manual (Vol. 2), so that you will have an
idea what VI can and can't do.

\bigskip
\nwln
\begin{center}
{\bf {\Large 8.2  GRASS Trouble}}
\end{center}

\bigskip
Section 3.6 of this manual discusses problems occurring during GRASS startup. This chapter will focus
on problems occurring during the use of GRASS, and includes problems related to dependent hard-and
software. The list will be updated as new problems occur and old ones are solved.

\bigskip
{\bf Reclassified Maps}

Cell maps that are reclassifications (made with the {\it r.reclass \/}tool) of other maps can only be processed
as long as the base map exists. If the base map is deleted or renamed, the reclassification still exists but
can no longer refer to the base map and therefore cannot be processed. Thus it is important to know
which maps are base maps and which are reclassifications. 

\bigskip
{\bf Renaming and Removing Maps}

GRASS provides tools ({\it g.remove \/}and {\it g.rename\/}) for the renaming and removing of map layers together
with all their support files. Do not rename or remove GRASS map layers in UNIX! You are likely to
forget some support file and leave it lying around. However, note that some GRASS files leave you no
choice, since you can only remove them in UNIX. This is the case with imagery group signature files,
for instance.

\newpage
\begin{minipage}{\textwidth}
%
INDEX
\end{minipage}
%
\begin{center}
{\bf {\Large INDEX A: On this manual}}
\end{center}

\bigskip

\newpage
\begin{center}
{\bf {\Large INDEX B: On Grass Clippings}}
\end{center}

\bigskip
The following articles were taken from the copies of GRASS Clippings available on 1-10-92:

{\bf TITLE}
\testlastline

\begin{indenting}{8.89cm}
{\bf AUTHOR}
\end{indenting}
\begin{indenting}{12.70cm}
{\bf WHERE (Volume,
Number, Page)}
\end{indenting}
SG3d Upgrade Provides Easier Positioning, 
\testlastline

\begin{indenting}{8.89cm}
Bill Brown
\end{indenting}
\begin{indenting}{12.70cm}
6,2,1
\end{indenting}

\zerotestlastline
\begin{indenting}{1.27cm}
Lighting
\end{indenting}
Videographic Enhancement of GRASS Images
\testlastline

\begin{indenting}{8.89cm}
Bob Sullivan
\end{indenting}
\begin{indenting}{12.70cm}
6,2,4
\end{indenting}
Jamaica's UWI-MAGIC
\testlastline

\begin{indenting}{8.89cm}
David M. Johnson
\end{indenting}
\begin{indenting}{12.70cm}
6,2,1
\end{indenting}
Image Processing in GRASS
\testlastline

\begin{indenting}{8.89cm}
Hong C. Zhuang
\end{indenting}
\begin{indenting}{12.70cm}
6,2,10
\end{indenting}
New Capabilities for Interpolation and 
\testlastline

\begin{indenting}{8.89cm}
Helena Mitsukova
\end{indenting}
\begin{indenting}{12.70cm}
6,2,13
\end{indenting}

\zerotestlastline
\begin{indenting}{1.27cm}
Topographic Analysis in GRASS
\end{indenting}
Growing GRASS (r.mapcalc)
\testlastline

\begin{indenting}{8.89cm}
Fred Limp
\end{indenting}
\begin{indenting}{12.70cm}
6,2,15
\end{indenting}
Graphic Digitizer Accuracy
\testlastline

\begin{indenting}{8.89cm}
Dominic Giovachino
\end{indenting}
\begin{indenting}{12.70cm}
6,2,19
\end{indenting}
Bar Scales and Histograms
\testlastline

\begin{indenting}{8.89cm}
Melissa Records
\end{indenting}
\begin{indenting}{12.70cm}
6,1,4
\end{indenting}
GRASS / RIM Interface Programs in GRASS 4.0
\testlastline

\begin{indenting}{8.89cm}
David Satnik
\end{indenting}
\begin{indenting}{12.70cm}
6,1,5
\end{indenting}
GRASS / TIGER Tutorial Available with GRASS 
\testlastline

\begin{indenting}{8.89cm}
Jacinda Mountz
\end{indenting}
\begin{indenting}{12.70cm}
6,1,10
\end{indenting}

\zerotestlastline
\begin{indenting}{1.27cm}
4.0
\end{indenting}
GRASS Provides Historical Overview of Fort 
\testlastline

\begin{indenting}{8.89cm}
Teresa Hansen
\end{indenting}
\begin{indenting}{12.70cm}
6,1,7
\end{indenting}

\zerotestlastline
\begin{indenting}{1.27cm}
Lewis
\end{indenting}
Growing GRASS (r.mapcalc, Boundary Determina-
\testlastline

\begin{indenting}{8.89cm}
Fred Limp
\end{indenting}
\begin{indenting}{12.70cm}
6,1,15
\end{indenting}

\zerotestlastline
\begin{indenting}{1.27cm}
tion, Toggling Color Tables, Keen  
\end{indenting}

\zerotestlastline
\begin{indenting}{1.27cm}
Contributed Code, New Hardcopy Output)
\end{indenting}
g.help - An On-Line Help System for GRASS 4.0
\testlastline

\begin{indenting}{8.89cm}
Deb Lister
\end{indenting}
\begin{indenting}{12.70cm}
6,1,14
\end{indenting}
Using Xgen in GRASS 4.0
\testlastline

\begin{indenting}{8.89cm}
Christine Poulsen
\end{indenting}
\begin{indenting}{12.70cm}
6,1,21
\end{indenting}
GRASS-MAPGEN: Expanded Plotting Capabilities
\testlastline

\begin{indenting}{8.89cm}
-
\end{indenting}
\begin{indenting}{12.70cm}
5,1,2
\end{indenting}

\zerotestlastline
\begin{indenting}{1.27cm}
in the GRASS Environment
\end{indenting}
IRDMIS / GRASS / ISM Interface Programs
\testlastline

\begin{indenting}{8.89cm}
-
\end{indenting}
\begin{indenting}{12.70cm}
5,2,1
\end{indenting}
Natural Resources Using GRASS and SEEPPAGE
\testlastline

\begin{indenting}{8.89cm}
-
\end{indenting}
\begin{indenting}{12.70cm}
5,2,1
\end{indenting}
How to make a Legend on a GRASS Display Map
\testlastline

\begin{indenting}{8.89cm}
Melissa Records
\end{indenting}
\begin{indenting}{12.70cm}
5,2,13
\end{indenting}
Growing GRASS (Multi-Colored Icons)
\testlastline

\begin{indenting}{8.89cm}
Fred Limp
\end{indenting}
\begin{indenting}{12.70cm}
5,2,15
\end{indenting}
GRASS For Hydrologic Modeling
\testlastline

\begin{indenting}{8.89cm}
-
\end{indenting}
\begin{indenting}{12.70cm}
4,2,1
\end{indenting}
New GRASS Seeds (GRASS-DBMS Interface, 
\testlastline

\begin{indenting}{8.89cm}
Bill Goran
\end{indenting}
\begin{indenting}{12.70cm}
4,2,7
\end{indenting}

\zerotestlastline
\begin{indenting}{1.27cm}
Seasonal Variations in Land Cover Study 
\end{indenting}

\zerotestlastline
\begin{indenting}{1.27cm}
at Hohenfels, etc.)
\end{indenting}
GRASS Applications For Archaeological Inquiry
\testlastline

\begin{indenting}{8.89cm}
-
\end{indenting}
\begin{indenting}{12.70cm}
4,2,11
\end{indenting}
Growing GRASS (g.report scripts)
\testlastline

\begin{indenting}{8.89cm}
Fred Limp
\end{indenting}
\begin{indenting}{12.70cm}
4,2,15
\end{indenting}
Processing DEM Data
\testlastline

\begin{indenting}{8.89cm}
Susan Stitt
\end{indenting}
\begin{indenting}{12.70cm}
4,1,1
\end{indenting}
Wetlands Data In GRASS Vector Format
\testlastline

\begin{indenting}{8.89cm}
-
\end{indenting}
\begin{indenting}{12.70cm}
4,1,11
\end{indenting}
Growing GRASS (g.average script)
\testlastline

\begin{indenting}{8.89cm}
Fred Limp
\end{indenting}
\begin{indenting}{12.70cm}
4,1,20
\end{indenting}
Stereo Pairs
\testlastline

\begin{indenting}{8.89cm}
-
\end{indenting}
\begin{indenting}{12.70cm}
4,1,24
\end{indenting}
Growing GRASS (scripts for finding locations
\testlastline

\begin{indenting}{8.89cm}
Fred Limp
\end{indenting}
\begin{indenting}{12.70cm}
3,3,10
\end{indenting}

\zerotestlastline
\begin{indenting}{1.27cm}
that represent variability)
\end{indenting}
Interactive Labeling
\testlastline

\begin{indenting}{8.89cm}
-
\end{indenting}
\begin{indenting}{12.70cm}
3,3,11
\end{indenting}
GRASS Used For Forest Management At Fort
\testlastline

\begin{indenting}{8.89cm}
-
\end{indenting}
\begin{indenting}{12.70cm}
3,3,15
\end{indenting}

\zerotestlastline
\begin{indenting}{1.27cm}
Lewis
\end{indenting}
p.map Patterns
\testlastline

\begin{indenting}{8.89cm}
-
\end{indenting}
\begin{indenting}{12.70cm}
3,3,16
\end{indenting}
\end{document}
