
358
|
Chapter 6, Mapping on Your Desktop
#74 Plot Wireless Network Viewsheds with GRASS
HACK
Next, we can display these points, and then label them, with the following
commands:
GRASS:~/hacks/viewshed > d.vect nodes display=shape \
icon=basic/box color=blue
GRASS:~/hacks/viewshed > d.vect nodes display=attr attrcol=str_1 \
lcolor=blue bgcolor=white xref=left yref=bottom
The display=attr option to d.vect instructs it to display shape attributes,
rather than the shapes themselves. In GRASS 5.7, every shape in a vector
layer is potentially associated with a row of attributes—labels, statistics, and
so on—stored in data tables inside GRASS. We don’t really have the space
to get into why v.in.ascii put the labels into an attribute column with the
unimaginative title of
str_1, but if you’re interested, try running v.info -c
nodes
, and possibly echo "select * from nodes" | db.select (really!) to see
how this sort of thing works under the hood.
In versions prior to GRASS 5.7, point data was stored in sep-
arate site layers, rather than as vector layers containing
points. If you’re running an older version of GRASS, you’ll
need to use the following commands instead:
GRASS:~/hacks/viewshed > s.in.ascii sites=nodes \
in=sites_utm.txt
GRASS:~/hacks/viewshed > d.sites nodes color=blue \
type=box
GRASS:~/hacks/viewshed > d.site.labels nodes \
color=blue back=white xref=left yref=bottom
Consult the manpages for each of