|

To learn about basic display commands you will need to load a satellite
photograph of the Commonwealth of Virginia.
To convert the TIFF satellite photograph file into a GRASS raster file:
- Type r.in.tiff
input=virginia.tif output=va
- input=name:
the name of the original TIFF image
- output=name:
the name of the new raster map
To open the raster image of the photograph in the monitor:
- Type d.rast
va
- IMPORTANT: This command will be explained
later in the tutorial.
The satellite photograph should now be visible in the monitor and will
look similar to Figure 2.1 below.
|
|
|
Figure 2.1: Satellite photograph
in a monitor
|
Erasing the monitor
The active monitor can be erased. To erase the monitor with magenta:
- Type d.erase
color=magenta
- color=name:
color with which the active monitor will be erased.
- options: red,
orange,
yellow,
green,
blue,
yellow,
indigo,
violet,
black,
white,
gray,
brown, and magenta
The monitor will look similar to Figure 2.2 below.
|
|
|
Figure 2.2: Monitor erased
with magenta
|
Zooming in
GRASS can zoom in within the current monitor. Use d.rast
to reload the satellite photograph. To enter the zoom in menu:
The command line interface will display a menu that will look similar
to Figure 2.3 below.
 |
|
Figure 2.3: Zoom menu
|
- Click the left mouse button to establish the corner of the zoom box
and drag the mouse to create a box.
- Click the middle mouse button to see a print out of the coordinate
the mouse is on.
- Click the right mouse button to accept a region. Another mouse menu
will appear at the bottom left-hand corner of the image that is similar
to Figure 2.4 below.
|
|
|
Figure 2.4: Zoom acceptance
box
|
- Use the mouse and click "YES" to accept the zoom in region
and "NO" to discard it. If you click "YES" the command
line interface will print information similar to that in Figure 2.5
below.
 |
|
Figure 2.5: Zoom completion
|
- As suggested, type d.erase.
Then reload the image using d.rast
The zoomed in photograph will now look similar to Figure 2.6 below (your
screen may look different depending on what location you zoomed in on).
|
|
|
Figure 2.6: Zoom in of satellite
photograph
|
Zooming out
GRASS can zoom out to the original size of the map. To return to the
original size of the map:
- Type g.region
zoom=va
- zoom=name:
set the current region settings to the smallest region encompassing
all non-zero data in the named map
Use d.erase
to remove the old image and and d.rast
to reload the satellite photograph. The satellite photograph will return
to its original size and will look similar to Figure 2.1 above.
Setting the color mode
The color mode of the monitor can be set to establish whether a map will
be displayed using its own color table or the fixed color table of the
graphics monitor. To dynamically update the monitor's color lookup table
when a file is loaded:
- Type d.colormode
mode=float
- mode=name
- options: fixed
- the monitor's color lookup table is loaded with the color
table of the current file and does not change when a new file
is loaded. float
- whenever a new file is loaded its color table is loaded into
the monitor's color lookup table.
Changing the font
The font of the text displayed in the monitor can be set. To set the
font type of the displayed text to be Times New Roman:
- Type d.font
font=romans
- font=name:
the name of the font
- options: cyrilc,
gothgbt,
gothgrt,
gothitt,
greekc,
greekcs,
greekp,
greeks,
italicc,
italiccs,
italict, romanc,
romancs,
romand,
romanp,
romans,
romant,
scriptc,
scripts
Adding a text label
A textual label can be added to the map in the monitor. To add a text
label that has a yellow background with black text that has a font type
of Times New Roman and a font size of 10:
- Type d.label
size=10 backcolor=yellow textcolor=black font=romans
- size=value:
size of the text in the label, value is a percentage of the monitor
height (a size of 10 will make each line of text equal to one-tenth
the height of the monitor)
- backcolor=name:
the background color of the label
- options: red,
orange,
yellow,
green,
blue,
yellow,
indigo,
violet,
black,
white,
gray,
brown, and magenta
- textcolor=name:
the color of the text
- options: red,
orange,
yellow,
green,
blue,
yellow,
indigo,
violet,
black,
white,
gray,
brown, and magenta
- font=name:
the font type of the text
- options: cyrilc,
gothgbt,
gothgrt,
gothitt,
greekc,
greekcs,
greekp,
greeks,
italicc,
italiccs,
italict, romanc,
romancs,
romand,
romanp,
romans,
romant,
scriptc,
scripts
The command line interface will prompt you use the mouse to place the
label. This prompt will look similar to Figure 2.7 below.
 |
|
Figure 2.7: Textual label placement
prompt
|
- Place your mouse pointer over area of the monitor you would like to
place the upper left hand corner of the label.
- Click the left mouse button.
The command line interface will prompt you to type the text to go in
the label. Type the text to be put in the label at the command line. This
prompt and the entered text (what follows the >)
will look similar to Figure 2.8 below.
 |
|
Figure 2.8: Textual label enter
prompt
|
The label will now appear in the monitor as specified. The command line
interface will prompt you to accept the label creation and placement.
This prompt will look similar to Figure 2.9 below.
 |
|
Figure 2.9: Textual label accept
prompt
|
- Typing "y"
will place the label permanently, typing "n"
will delete the label. The command line interface will then print the
menu in Figure 2.6 above.
- Click the right mouse button inside the monitor to exit.
The satellite photograph will now have text label on it, and will look
similar to Figure 2.10 below (your screen may look different depending
on where you placed your label).
|
|
|
Figure 2.10: Textual label
on the satellite photograph
|
Displaying a grid
A grid can be displayed over the map in the monitor. Use d.erase
to remove the old image and and d.rast
to reload the satellite photograph. To overlay a grid on the map that
is gray, is 50 units large and originates at 0,0.
- Type d.grid
size=50 color=gray origin=0,0
- size=value:
size of grid to be drawn in the active display frame, in current
map coordinate system units.
- color=name:
color of grid
- options: white,
red,
orange,
yellow,
green,
blue,
indigo,
violet,
magenta,
brown,
gray, and black
- origin=easting,northing:
Lines of the grid pass through this coordinate.
The satellite photograph will now have a gray grid over it, and will
look similar to Figure 2.11 below.
|
|
|
Figure 2.11: Grid overlay on
the satellite photograph
|
IMPORTANT: A number of display commands
are intended to be used specifically with vector, raster or sites maps.
These display commands are in the tutorial portions for each data type.
Changing the Mapset
Before continuing you will need to change the mapset to the next area
(Shenandoah National Park and George Washington and Jefferson National
Forests):
- Type g.mapsets
mapset=parks
- mapset=name:
name of existing GRASS mapset under the current location
Click the Next
button to learn basic raster manipulations.
|