#1605: WXGUI d.vect doesn't offer all vector map layers in a dropdown list
-------------------------+--------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: wxGUI | Version: 6.4.2
Keywords: | Platform: Unspecified
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Steps to reproduce:
* Add a vector map with more than one layer
* Go to properties -> selection
* Layer option has only "-1" and "1" as options, "2" is missing
* Enter "2" manually to ensure that objects are present and are rendered
correctly for layer "2".
Setting priority major as it might lead users to wrong conclusions that
only single layer is present for the vector map.
It might be better to move the functionality (=list all layers of vector
map) in core.utils. Currently there is a function for getting all layers
connected to DB.
Do we need to distinguish in dialogs if we want all layers or only the
ones which are connected to DB?
#1605: WXGUI d.vect doesn't offer all vector map layers in a dropdown list
--------------------------+-------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: wxGUI | Version: 6.4.2
Keywords: vector layer | Platform: Unspecified
Cpu: Unspecified |
--------------------------+-------------------------------------------------
Comment(by mmetz):
Replying to [comment:2 annakrat]:
> Now, layers listed with v.category (and not v.db.connect) are shown.
Not good. This method was used some years ago, but it makes the GUI even
slower than it is already. Therefore v.category was no longer used to get
the vector's layers. v.db.connect is usually very fast, but v.category
takes some time for a larger vector.
#1605: WXGUI d.vect doesn't offer all vector map layers in a dropdown list
--------------------------+-------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: wxGUI | Version: 6.4.2
Keywords: vector layer | Platform: Unspecified
Cpu: Unspecified |
--------------------------+-------------------------------------------------
Comment(by martinl):
Replying to [comment:3 mmetz]:
> Replying to [comment:2 annakrat]:
> > Now, layers listed with v.category (and not v.db.connect) are shown.
>
> Not good. This method was used some years ago, but it makes the GUI even
slower than it is already. Therefore v.category was no longer used to get
the vector's layers. v.db.connect is usually very fast, but v.category
takes some time for a larger vector.
>
> Please revert this change.
any other suggestion? Store number of layers in header file?
#1605: WXGUI d.vect doesn't offer all vector map layers in a dropdown list
--------------------------+-------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: wxGUI | Version: 6.4.2
Keywords: vector layer | Platform: Unspecified
Cpu: Unspecified |
--------------------------+-------------------------------------------------
Comment(by mmetz):
Replying to [comment:4 martinl]:
> Replying to [comment:3 mmetz]:
> > Replying to [comment:2 annakrat]:
> > > Now, layers listed with v.category (and not v.db.connect) are shown.
> >
> > Not good. This method was used some years ago, but it makes the GUI
even slower than it is already. Therefore v.category was no longer used to
get the vector's layers. v.db.connect is usually very fast, but v.category
takes some time for a larger vector.
> >
> > Please revert this change.
>
> any other suggestion? Store number of layers in header file?
Alternatively, v.category could get a new option for option, something
like option=layers which would print out only layer numbers, one per line.
This would be fast if topology is available because in this case the
internal category index can be used and the vector map would need to be
opened with head only. Without topology, option=layers would print
nothing.
#1605: WXGUI d.vect doesn't offer all vector map layers in a dropdown list
--------------------------+-------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: wxGUI | Version: 6.4.2
Keywords: vector layer | Platform: Unspecified
Cpu: Unspecified |
--------------------------+-------------------------------------------------
Comment(by annakrat):
Replying to [comment:5 mmetz]:
> Replying to [comment:4 martinl]:
> > Replying to [comment:3 mmetz]:
> > > Replying to [comment:2 annakrat]:
> > > > Now, layers listed with v.category (and not v.db.connect) are
shown.
> > >
> > > Not good. This method was used some years ago, but it makes the GUI
even slower than it is already. Therefore v.category was no longer used to
get the vector's layers. v.db.connect is usually very fast, but v.category
takes some time for a larger vector.
> > >
> > > Please revert this change.
Reverted.
> >
> > any other suggestion? Store number of layers in header file?
>
> Alternatively, v.category could get a new option for option, something
like option=layers which would print out only layer numbers, one per line.
This would be fast if topology is available because in this case the
internal category index can be used and the vector map would need to be
opened with head only. Without topology, option=layers would print
nothing.
#1605: WXGUI d.vect doesn't offer all vector map layers in a dropdown list
--------------------------+-------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: wxGUI | Version: 6.4.2
Keywords: vector layer | Platform: Unspecified
Cpu: Unspecified |
--------------------------+-------------------------------------------------
Comment(by mmetz):
Replying to [comment:6 annakrat]:
> Replying to [comment:5 mmetz]:
> > Replying to [comment:4 martinl]:
> > >
> > > any other suggestion? Store number of layers in header file?
> >
> > Alternatively, v.category could get a new option for option, something
like option=layers which would print out only layer numbers, one per line.
This would be fast if topology is available because in this case the
internal category index can be used and the vector map would need to be
opened with head only. Without topology, option=layers would print
nothing.
>
> Is this change possible now for grass 64?
In theory yes, we can add new functionality as long as existing
functionality is not changed.
#1605: WXGUI d.vect doesn't offer all vector map layers in a dropdown list
--------------------------+-------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: wxGUI | Version: 6.4.2
Keywords: vector layer | Platform: Unspecified
Cpu: Unspecified |
--------------------------+-------------------------------------------------
Comment(by annakrat):
Replying to [comment:7 mmetz]:
> Replying to [comment:6 annakrat]:
> > Replying to [comment:5 mmetz]:
> > > Replying to [comment:4 martinl]:
> > > >
> > > > any other suggestion? Store number of layers in header file?
> > >
> > > Alternatively, v.category could get a new option for option,
something like option=layers which would print out only layer numbers, one
per line. This would be fast if topology is available because in this case
the internal category index can be used and the vector map would need to
be opened with head only. Without topology, option=layers would print
nothing.
> >
> > Is this change possible now for grass 64?
>
> In theory yes, we can add new functionality as long as existing
functionality is not changed.
>
> Please try trunk r55140.
Thanks, it works, could you backport it (at least the v.category part)?
#1605: WXGUI d.vect doesn't offer all vector map layers in a dropdown list
--------------------------+-------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: wxGUI | Version: 6.4.2
Keywords: vector layer | Platform: Unspecified
Cpu: Unspecified |
--------------------------+-------------------------------------------------
Comment(by mmetz):
Replying to [comment:8 annakrat]:
> Replying to [comment:7 mmetz]:
> > Replying to [comment:6 annakrat]:
> > > Replying to [comment:5 mmetz]:
> > > > Replying to [comment:4 martinl]:
> > > > >
> > > > > any other suggestion? Store number of layers in header file?
> > > >
> > > > Alternatively, v.category could get a new option for option,
something like option=layers which would print out only layer numbers, one
per line. This would be fast if topology is available because in this case
the internal category index can be used and the vector map would need to
be opened with head only. Without topology, option=layers would print
nothing.
> > >
> > > Is this change possible now for grass 64?
> >
> > In theory yes, we can add new functionality as long as existing
functionality is not changed.
> >
> > Please try trunk r55140.
>
> Thanks, it works, could you backport it (at least the v.category part)?
I have backported the v.category part in r55142-3.
#1605: WXGUI d.vect doesn't offer all vector map layers in a dropdown list
--------------------------+-------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: wxGUI | Version: 6.4.2
Keywords: vector layer | Platform: Unspecified
Cpu: Unspecified |
--------------------------+-------------------------------------------------
Comment(by mlennert):
Replying to [comment:10 annakrat]:
> Replying to [comment:9 mmetz]:
> > I have backported the v.category part in r55142-3.
>
> Thanks, the rest is done r55145. Please, could others test?
A quick test here doesn't show any problems. Seems to work for me on
Debian GNU/Linux.
#1605: WXGUI d.vect doesn't offer all vector map layers in a dropdown list
--------------------------+-------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: wxGUI | Version: 6.4.2
Keywords: vector layer | Platform: Unspecified
Cpu: Unspecified |
--------------------------+-------------------------------------------------
Comment(by hamish):
Hi,
sorry I am coming late to this conversation, and I mostly work with
rasters so am a bit thin on the category layer know-how, but to summarize,
the trouble was that you can have multiple layers of categories connected
to topological data features within the same map, and each of those layers
may or may not have a DB connection specified in vector/$MAP/dbln, right?
So using `v.db.connect -g` only listed the layers with DB connections, and
missed the layers that existed as category-only.
But the new v.category option will list all that exist w/ or w/o a DB
connection. (note not used very much, but as in `v.db.connect -g` the
layer number can have a /name alias too. that might only be widely used in
DBs like Oracle, or a "for the future" idea from Radim?)
is that right?
To help me visualize using layers better, could someone suggest a use case
for when you'd use this? (the whole thing is a little mysterious to me)
#1605: WXGUI d.vect doesn't offer all vector map layers in a dropdown list
--------------------------+-------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: wxGUI | Version: 6.4.2
Keywords: vector layer | Platform: Unspecified
Cpu: Unspecified |
--------------------------+-------------------------------------------------
Comment(by marisn):
Replying to [comment:12 hamish]:
> To help me visualize using layers better, could someone suggest a use
case for when you'd use this? (the whole thing is a little mysterious to
me)
#1605: WXGUI d.vect doesn't offer all vector map layers in a dropdown list
--------------------------+-------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: wxGUI | Version: 6.4.2
Keywords: vector layer | Platform: Unspecified
Cpu: Unspecified |
--------------------------+-------------------------------------------------
Comment(by mlennert):
Replying to [comment:12 hamish]:
> To help me visualize using layers better, could someone suggest a use
case for when you'd use this? (the whole thing is a little mysterious to
me)