#1474: random color -c flag broken in d.vect
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Vector | Version: unspecified
Keywords: d.vect | Platform: Unspecified
Cpu: Unspecified |
-------------------------+--------------------------------------------------
d.vect -c no longer colors vector areas in random colors. I just tried it
on the geology map from the spm07 demo set (after rebuilding the map for
GRASS 7). All areas remain displayed as grey. I tried it from the wxGUI
and from the command line using d.mon. There were no errors It just didn't
work.
#1474: random color -c flag broken in d.vect
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Vector | Version: unspecified
Keywords: d.vect | Platform: Unspecified
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Comment(by cmbarton):
This is caused by setting the layer default to -1 instead of 1. Setting
this default to -1 causes other problems with querying and labeling. IMHO,
the default should be 1, which is the case for most vectors and would
avoid bogus errors like this one.
#1474: random color -c flag broken in d.vect
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Vector | Version: svn-trunk
Keywords: d.vect | Platform: Unspecified
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Changes (by neteler):
* version: unspecified => svn-trunk
Comment:
Replying to [comment:2 cmbarton]:
> This is caused by setting the layer default to -1 instead of 1. Setting
this default to -1 causes other problems with querying and labeling. IMHO,
the default should be 1, which is the case for most vectors and would
avoid bogus errors like this one.
I wonder where the new -1 default in GRASS 7 is documented. Not in
#1474: random color -c flag broken in d.vect
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Vector | Version: svn-trunk
Keywords: d.vect | Platform: Unspecified
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Comment(by cmbarton):
This seems to be a global default chosen throughout all vector modules
that have the option of choosing layers. Where is it set for all of GRASS
7 vectors?
#1474: random color -c flag broken in d.vect
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Vector | Version: svn-trunk
Keywords: d.vect | Platform: Unspecified
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Comment(by martinl):
Replying to [comment:4 cmbarton]:
> This seems to be a global default chosen throughout all vector modules
that have the option of choosing layers. Where is it set for all of GRASS
7 vectors?
it's G_OPT_V_FIELD_ALL defined in gislib
source:grass/trunk/lib/gis/parser_standard_options.c#L468
Regarding `d.vect` we could use for `layer` option G_OPT_V_FIELD which
defines default answer as 1. Then layers different from '1' will be not
rendered by default. Or we could just fix `d.vect` to colorize vector
features based on layer '1' when `layer=-1` is entered.
#1474: random color -c flag broken in d.vect
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Vector | Version: svn-trunk
Keywords: d.vect | Platform: Unspecified
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Comment(by cmbarton):
It also affects querying and labels for d.vect. Additionally, it looks
like -1 is the default layer selected for all other v.* modules. This may
or may not cause problems. I understand your point.
But the most common case for vectors is to have one layer. Someone who
wants to display more than one layer can switch to -1 for display as
easily as someone who wants to use layer 1 instead of -1. But it seems we
should default to the most common case rather than less common ones.