[GRASSLIST:8284] Re: Making road maps

Hamish hamish_nospam at yahoo.com
Wed Sep 14 20:20:37 EDT 2005


> > 1. Is there any way to make vector lines wider when displaying them?
> >  I would like to make different size vector lines for different
> >  types of  roads.
>

It's a bit of a hack, but for the normal display monitor you could use
'v.extract where=' + v.buffer + d.vect for each kind of road.

> Use ps.map to make pretty maps.

Yes, e.g.

vlines mapname
 where road_type = 'big'
 width 3
 end
vlines mapname
 where road_type = 'small'
 width 1
 end

also you could try loading GRASS vector maps into QGIS.


> However, after a lot of errors and searching, the "vector" command is
> no longer applicable in GRASS  6.1-cvs.  You need to use the "vlines",
> "vpoints", and "vareas".

Look at "CHANGES BETWEEN VERSION 5.0.x/5.4.x and 6.0" at the start of
the ps.map help page..


> > 2. Is it possible to rotate the names/labels for my north/south
> > streets 90 degrees from the east/west streets?

'd.vect display=attr' will not rotate, but will display.


Paint Labels: (improved version in grass 6.1-cvs, not in 6.0.1)

v.label -a
ps.map, labels instruction

will align names along vector lines. Fine tune by editing the offsets in
the $MAPSET/paint/labels/$LABELS_FILE in a text editor. This should work
really well.

For the normal display monitor, d.paint.labels doesn't respect the
rotatation setting that v.label figures out & so it just draws the
labels horizontally*, but you could write a shell script that could do
it by parsing the labels file & feeding into 
'd.text.freetype text= rotation=' for each feature in a loop. 
This would be a really great script to have available on the GRASS Wiki
add-ons page.... fame and fortune could be yours.

[*] I have just found that we have R_text_rotation() in the raster
library.. perhaps d.paint.labels could be adapted! I will give it a try.
I am not sure if d.font.freetype would still work to make pretty fonts,
but I hope so.


good luck,
Hamish




More information about the grass-user mailing list