[GRASS-user] category number incrementing when digitising

Hi all,

6.4.2RC1 on ubuntu 10.04.3, using wxgui

when digitising new vector, in 'digitisation settings' on 'attributes'
tab, I can play around with settings to add record to table, auto or
manual cat etc.

Noted that when cat mode is 'next to use' clicking the checkbox on/off
for 'add new record into table', the number keeps going up by one for
each click. same happens for the listbox for category mode if i keep
clicking on the 'next to use'

result seems to be some cat numbers get skipped when actually doing
entries.

thought i could work around it by doing manual cat number to bring 'next
number' back to where it should be, which will happen if i go through
digitising a new centroid. If I just change 'manual' and apply, then
continue playing with settings without digitising something, each time I
return to the 'next number' option it remembers the number generated
from the previous bout of clicking the checkbox/listbox as per above.

Anyone else noticed this and/or can repeat this?

Something else in the process:
noticed if i make a centroid and the 'next number' is not what I wanted
as the next number, I can change the cat number of the centroid OK. But
if there's no entry in the table for that cat because it was skipped
earlier in the digitising stage, the attributes tool comes up blank.
kinda makes sense to me but i was hoping the attributes dialog would
still open up showing blank fields for each table column and then I
could add the info. currently have to first add record (or at least a
partial record with relevant cat) to the table (e.g. using PGadmin to
access the postgres table)

also found if I change digitisation settings for attributes, but don't
hit the 'apply' button, the digitiser window still responds to whatever
the earlier settings were.
-could the settings automatically update/apply whenever a change is made
to one of the options in this dialog?

furthermore, it seems that cat increments within the digitising window
don't fully obey the dialog settings e.g. I've used manual cat to do a
centroid #752. back to dialog and set cat to 'next to use' and it shows
#753 (yay). click apply, go to digitise next centroid, dialog to enter
table data pops up but it's for cat #754...?!?
If I hit cancel, delete the cat, and try again, the next dialog comes up
with #755. All the while the settings dialog shows next to use should be
#753 still...??

Should it be reported as a bug or could it be result of my end (have had
other small anomalies that appear to be based in what versions of python
and wx I have)?

regards,
shane

On 16/11/11 07:12, Shane Litherland wrote:

Hi all,

6.4.2RC1 on ubuntu 10.04.3, using wxgui

when digitising new vector, in 'digitisation settings' on 'attributes'
tab, I can play around with settings to add record to table, auto or
manual cat etc.

Noted that when cat mode is 'next to use' clicking the checkbox on/off
for 'add new record into table', the number keeps going up by one for
each click. same happens for the listbox for category mode if i keep
clicking on the 'next to use'

Assigning category numbers to a geometrical object is independent from the fact whether you add a record to a table or not. Category numbers are identifiers you can assign to objects. If you wish you can link a specific layer to a table and then those objects whose category number appears in a specified key column in that table have attribute information in the table, others don't.

So, if you use 'next to use' mode, but check off 'add new record into table', you assign a category value to the objects you will digitize, but no corresponding entry is added to the category table. This can be very useful when all you need is categories and not other attributes (e.g. you use specific integer codes for land use classes and just assign each polygon the relevant land use class code as category value without creating an attribute table).

I'm not sure, but I have the feeling that the above explanation might also respond to all your other issues.

Moritz

Hi Moritz et al,

Thanks for your patient description. I have been using cats and tables
for a while now, and think I understand enough about how they work, your
explanation seems similar to what I'd read in the GRASS docs.

My concern here is not how to use them, but that the check/list boxes in
the dialog appear to increment the cat numbers without them actually
being used. e.g. If I click on 'next to use' in the listbox ten times,
the cat that will be used next goes from 320 to 330, before I have
digitised anything to even give a cat to.

A couple of other odd things like this in wx dialogs/gui seem to have
come down to what version of wx/python/GRASS is being run together, so I
was wondering if anyone else can repeat this event in their dialog, and
if not, why (maybe newer wx/python?)

Too late at night for me to dig up my system specs... tonight got wasted
with other dramas on GRASS and a bunch of lost data... but if you want
them, I can get them

regards,
shane.

On Fri, 2011-11-18 at 11:19 +0100, Moritz Lennert wrote:

On 16/11/11 07:12, Shane Litherland wrote:
> Hi all,
>
> 6.4.2RC1 on ubuntu 10.04.3, using wxgui
>
> when digitising new vector, in 'digitisation settings' on 'attributes'
> tab, I can play around with settings to add record to table, auto or
> manual cat etc.
>
> Noted that when cat mode is 'next to use' clicking the checkbox on/off
> for 'add new record into table', the number keeps going up by one for
> each click. same happens for the listbox for category mode if i keep
> clicking on the 'next to use'

Assigning category numbers to a geometrical object is independent from
the fact whether you add a record to a table or not. Category numbers
are identifiers you can assign to objects. If you wish you can link a
specific layer to a table and then those objects whose category number
appears in a specified key column in that table have attribute
information in the table, others don't.

So, if you use 'next to use' mode, but check off 'add new record into
table', you assign a category value to the objects you will digitize,
but no corresponding entry is added to the category table. This can be
very useful when all you need is categories and not other attributes
(e.g. you use specific integer codes for land use classes and just
assign each polygon the relevant land use class code as category value
without creating an attribute table).

I'm not sure, but I have the feeling that the above explanation might
also respond to all your other issues.

Moritz

On 20/11/11 15:51, Shane Litherland wrote:

My concern here is not how to use them, but that the check/list boxes in
the dialog appear to increment the cat numbers without them actually
being used. e.g. If I click on 'next to use' in the listbox ten times,
the cat that will be used next goes from 320 to 330, before I have
digitised anything to even give a cat to.

>

A couple of other odd things like this in wx dialogs/gui seem to have
come down to what version of wx/python/GRASS is being run together, so I
was wondering if anyone else can repeat this event in their dialog, and
if not, why (maybe newer wx/python?)

Sorry, I skipped over the fact that you were speaking about the wx-digitizer. Yes, I can confirm that problem. Whenever one switches from 'Next to use' (BTW: any reason for the wording change from the old tcl/tk digitizer where it was 'Next not used' ?), to 'Manual entry' and back, the counter increases by 1. At the same time, when you actually digitize in 'Next to use' mode, the counter does not increment visibly in the parameter window. You have to close that window and open it again to make this visible.

Generally, the fact that this parameter (i.e. choice of mode) is hidden in the parameter window, makes it much less convenient to use. In this particular point, the tcl/tk system is easier.

However, in the wx-digitizer, you don't need to go through the boundary without category + centroid with category procedure, as you have the option of digitizing an area.

Too late at night for me to dig up my system specs... tonight got wasted
with other dramas on GRASS and a bunch of lost data... but if you want
them, I can get them

I don't think this is related to system specs. This seems to be within the _setCategoryNextToUse(self) function in gui/wxpython/gui_modules/wxvdigit.py (or within possible library functions used there - don't have the time to dig deeper).

Best you file a bug report on this.

Moritz