[GRASS-dev] vectors invisible if has layer2 but no layer1

Hi,

I have noticed that if I have a vector that has categories in layer 2
and no cats in layer 1, d.vect by default doesn't display any of the
features, unless I specify layer=2 explicitely.

Try this - create a vector 'map' without categories in any layer.
Display it - you see it, OK. Now add categories into layer 2 only:

v.category in=map out=map_addcat_l2 option=add layer=2
d.erase
d.vect map_addcat_l2

You see nothing. No good. Could that be fixed?

Maciek

Maciej Sieczka wrote:

I have noticed that if I have a vector that has categories in layer 2
and no cats in layer 1, d.vect by default doesn't display any of the
features, unless I specify layer=2 explicitely.

Try this - create a vector 'map' without categories in any layer.
Display it - you see it, OK. Now add categories into layer 2 only:

v.category in=map out=map_addcat_l2 option=add layer=2
d.erase
d.vect map_addcat_l2

You see nothing. No good. Could that be fixed?

I'm not sure it is a bug,

d.vect --help
...
Parameters:
...
        layer Layer number. If -1, all layers are displayed.
               default: 1

seems clear to me.

are you asking that "-1" be the default?

Hamish

Hamish wrote:

Maciej Sieczka wrote:

I have noticed that if I have a vector that has categories in layer 2
and no cats in layer 1, d.vect by default doesn't display any of the
features, unless I specify layer=2 explicitely.

Try this - create a vector 'map' without categories in any layer.
Display it - you see it, OK. Now add categories into layer 2 only:

v.category in=map out=map_addcat_l2 option=add layer=2
d.erase
d.vect map_addcat_l2

You see nothing. No good. Could that be fixed?

I'm not sure it is a bug,

d.vect --help
..
Parameters:
..
        layer Layer number. If -1, all layers are displayed.
               default: 1

seems clear to me.

are you asking that "-1" be the default?

Hmm, would make sense. Why should layer 1 be prefered? "All layers are
equal, but some are more equal than the other" ;)?

Maciek

Maciej Sieczka wrote:

Hamish wrote:

Maciej Sieczka wrote:

I have noticed that if I have a vector that has categories in layer 2
and no cats in layer 1, d.vect by default doesn't display any of the
features, unless I specify layer=2 explicitely.

Try this - create a vector 'map' without categories in any layer.
Display it - you see it, OK. Now add categories into layer 2 only:

v.category in=map out=map_addcat_l2 option=add layer=2
d.erase
d.vect map_addcat_l2

You see nothing. No good. Could that be fixed?

I'm not sure it is a bug,

d.vect --help
..
Parameters:
..
        layer Layer number. If -1, all layers are displayed.
               default: 1

seems clear to me.

are you asking that "-1" be the default?

I would vote against that: I think that layers are already complicated to understand, and are mostly used by power users who can use layer=-1 when they know what they are doing. Making this the default would be the road to even more potential confusion IMHO.

Moritz