
332
|
Chapter 6, Mapping on Your Desktop
#69 Find Your Way Around GRASS
HACK
Okay, that’s more like it. Now let’s zoom back in on Western Europe and
redraw our ecology map with the national borders on top:
GRASS:~/gis > d.erase
GRASS:~/gis > g.region Western_Europe
GRASS:~/gis > d.rast eco
GRASS:~/gis > d.vect borders type=boundary color=black
By now, you’ve probably noticed that there’s a scheme
behind the naming of GRASS commands. Commands that
start with
g. are general-purpose, d. commands are display
related,
r. commands work on rasters, v. commands work
on vectors, and so on.
Figure 6-28 shows our revised borders layer drawn in black on top of the eco
layer. You’ll note that the political boundaries and the ecology map don’t
quite match up around the coastlines. Unfortunately, this is simply a side
effect of using very low-resolution sample data—not much we can do about
it here. (Also, you’ll probably notice that these boundaries date to before
1990, but that’s beside the point).
Now that we’ve made this informative and attractive map, what if we want
to get back to it later? Fortunately, GRASS provides the d.save command,
which generates a shell script of the commands used to generate the current
view in our monitor. Run
d.save -c > europe.sh and examine the contents
of europe.sh:
# Shell Script created by d.save Sun Jun 27 18:16:20 2004
d.erase
g.region n=60:04:48N s=36:43:12N e=18:48E w=13:07:12W nsres=0:04:48 ...