[GRASSLIST:8259] Making road maps

Hello,

I was wondering two things when making road maps using vector data:

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.

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

FYI, I'm using GRASS 6.1-cvs.

Thanks!
-Mike Dvorak

To answer my own question partially:

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.

Use ps.map to make pretty maps. 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".

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

Still not sure about this one...

Thanks,
-Mike
--

{><}{><}{><}{><}{><}{><}
Mike Dvorak
Chicago, IL USA
{><}{><}{><}{><}{><}{><}

"If anyone walking along the sidewalk were to make
deafening noises, spew poisonous gas into innocent
faces, and threaten people with a deadly weapon,
they would be arrested. Yet a few feet away, on
the public roadway, it is considered normal
behavior." --Steve Stollman

> 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

The new version of d.vect now in the cvs can produce lines of varying
widths.

D.text.freetype can produce rotated text of any size placed by geographic
coordinates, display coordinates (pixels or percent), and a mouse. [though
d.text.freetype apparently is having trouble on a Mac with OSX 10.4].

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: Hamish <hamish_nospam@yahoo.com>
Date: Thu, 15 Sep 2005 12:20:37 +1200
To: Mike Dvorak <mike@mikemath.net>
Cc: <grasslist@baylor.edu>
Subject: [GRASSLIST:8284] Re: Making road maps

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