[GRASS5] [bug #920] (grass) d.vect.line does not draw lines
Eric G. Miller
egm2 at jps.net
Fri Feb 15 21:52:06 EST 2002
On Fri, Feb 15, 2002 at 04:25:25PM +0000, M Lennert wrote:
> So when I just want to draw the boundaries of areas without filling
> them, I have to use either d.vect or d.vect.area with
> fillcolor=backgroundcolor (which is slow since it "fills" the areas
> even though they are the same color as the background) ?
This is a shortcoming of the current modules. Originally, I was
planning on having four, possibly five, vector drawing modules.
d.vect -- Just draws all the line work in some color
d.vect.area.fill -- Just draws area fill
d.vect.area.lines -- Just draws area boundaries
d.vect.lines -- Just draws labelled lines
d.vect.points ? -- Just draws vector points (like d.sites)
Then comes the idea to make d.vect.area more like d.area and
also to make d.vect do more than it formerly did (i.e. consolidate
everything into d.vect). It wouldn't be too hard to consolidate
all of the functionality into d.vect, but would require some
slight changes to the interface, and either a more general
"legend" file concept or scrapping that.
One way to extend the d.vect to meet most of those needs would
be via a couple extra flags and one parameter. Currently there's
an 'f' flag for filling areas. If we add an 'a' flag for area
lines, an 'l' flag for labelled lines, and a "fillcolor" argument,
then it would work something like:
If "fillcolor" Then
If Exists 'f', 'a', or 'l' Then
If "catnum" Then
Setup category filter
If 'f' and "fillcolor" Then
Fill labelled areas with "fillcolor" (filter by cats?)
Else If 'f' Then
Fill labelled areas with "color" (filter by cats?)
If 'a' Then
Draw labelled area boundaries using "color" (filter by cats?)
If 'l' Then
Draw labelled lines using "color" (filter by cats?)
If "catnum" Then
Warn "Need to specify one or more of 'f', 'a', 'l'"
Draw all lines using "color"
It'd be on the user to understand that the same category number
can mean different things (area, line, point), so mixing 'f' or
'a' with 'l', might not make sense.
Also: Currently, d.vect falls back to just drawing lines if
level 2 support is not present. I'm thinking it should
just exit with an error message ("Run v.support!").
$ d.vect help
Draws vector maps
d.vect -aflv map=name [color=name] [fillcolor=name] [catnum=value[,value,...]]
-a Draw area boundaries with "color"
-f Fill areas with "fillcolor" (falls back to "color")
-l Draw labelled lines with "color"
-v Be verbose
map Name of existing vector map to display
color Color to draw with
fillcolor Draw filled areas with this color (implies -f)
catnum List of category number(s) to be displayed
I would still like to preserve some kind of "legend" file capability.
But, to have it be more generic, it'll need some extra sections or
ways be more specific about what is being specified:
defaults ::= line_color_spec?, area_color_spec?
line_color_spec ::= color_spec
area_color_spec ::= color_spec?, line_color_spec?
color_spec ::= named_color | rgb_triplet
rgb_triplet ::= "<red>:<green>:<blue>" (0-255)
named_color ::= Standard GRASS colors
area_spec ::= categories, area_color_spec
line_spec ::= categories, line_color_spec
categories ::= single_category | category_range | category_list
single_category ::= Integer > 0
category_range ::= "single_category1-single_category2",
single_category2 > single_category1
category_list ::= "single_category1,single_category2,...,single_categoryN"
Sorry for the Backus-Naur DTD mishmash ;-)
Eric G. Miller <egm2 at jps.net>
More information about the grass-dev