[GRASS-user] Problem with wxGUI.Nviz extension and wxGUI.Vector_Digitizing_Tool

Hi.
I am having problem with wxGUI.Nviz extension when I trying to change 2D
view in GRASS Map display (for example raster digital elevation model)
in 3D view (with wxGUI.Nviz extension), not working change into 3D view
"Please wait, loading data..." and this module not responding.
-----------------------------------------------------------------
wxGUI.Nviz extension command output :

Traceback (most recent call last):
  File "/home/tomas/Build/grass/pkg/opt/grass-6.4.0svn/etc/w
xpython/gui_modules/toolbars.py", line 265, in OnSelectTool

self.mapdisplay.AddToolbar("nviz")
  File "/home/tomas/Build/grass/pkg/opt/grass-6.4.0svn/etc/w
xpython/gui_modules/mapdisp.py", line 2868, in AddToolbar

Map=self.Map, tree=self.tree, gismgr=self.gismanager)
  File "/home/tomas/Build/grass/pkg/opt/grass-6.4.0svn/etc/w
xpython/gui_modules/nviz_mapdisp.py", line 114, in __init__

self.nvizClass.SetDisplay(self)
  File "/home/tomas/Build/grass/pkg/opt//grass-6.4.0svn/etc/
wxpython/nviz/grass6_wxnviz.py", line 256, in SetDisplay

def SetDisplay(self, *args): return
_grass6_wxnviz.Nviz_SetDisplay(self, *args)
TypeError
:
in method 'Nviz_SetDisplay', argument 2 of type 'void *
-----------------------------------------------------------------

Other problem I having with wxGUI.Vector_Digitizing_Tool when I am
changing to digitizig mod ("Digitize" with
wxGUI.Vector_Digitizing_Tool) in GRASS Map Display, I am creating new
vector map (for example contour) and I am trying open "Setting" which
not responding and when I am start digitizing for example line, I am
receiving Error message: "Not vector map selected for editing" , but I
am selecting correct map for start editing (for example contour).

----------------------------------------------------------------
wxGUI.Vector_Digitizing_Tool command output :

Traceback (most recent call last):
  File "/home/tomas/Build/grass/pkg/opt/grass-6.4.0svn/etc/w
xpython/gui_modules/toolbars.py", line 1071, in OnSelectMap

self.StartEditing(self.layers[selection])
  File "/home/tomas/Build/grass/pkg/opt/grass-6.4.0svn/etc/w
xpython/gui_modules/toolbars.py", line 1103, in StartEditing

self.parent.digit = Digit(mapwindow=self.parent.MapWindow)
  File "/home/tomas/Build/grass/pkg/opt/grass-6.4.0svn/etc/w
xpython/gui_modules/vdigit.py", line 685, in __init__

VDigit.__init__(self, mapwindow)
  File "/home/tomas/Build/grass/pkg/opt/grass-6.4.0svn/etc/w
xpython/gui_modules/vdigit.py", line 223, in __init__

mapwindow)
  File "/home/tomas/Build/grass/pkg/opt//grass-6.4.0svn/etc/
wxpython/vdigit/grass6_wxvdigit.py", line 333, in __init__

this = _grass6_wxvdigit.new_Digit(*args)
TypeError
:
in method 'new_Digit', argument 2 of type 'wxWindow *'
-----------------------------------------------------------

Platform: GNU/Linux (distribution: Archlinux)
Cpu: i686, x86-64
GRASS version: grass-6.4.svn_src_snapshot_2009_07_04, 6.4.0RC5
(compiled from source, compilation log: No errors detected)

C++ Compiler vers.: gcc-4.4.0-4
Python vers.: python 2.6.2-3
WxPython vers.: wxpython-2.8.10.1-1
Swig vers.: swig 1.3.39-1
NumPy vers.: python-numpy 1.3.0-2

Best regards
Tomas Zigo

Hi,

2009/7/10 Tomáš Zigo <tomas.zigo@slovanet.sk>:

[...]

Swig vers.: swig 1.3.39-1

yes, this know issue. The bug is related to the recent swig version.
Here on Debian GNU/Linux with swig 1.3.36 it works.

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa

Hi,

2009/7/10 Tomáš Zigo <tomas.zigo@slovanet.sk>:

> Swig vers.: swig 1.3.39-1

yes, this know issue. The bug is related to the recent swig version.
Here on Debian GNU/Linux with swig 1.3.36 it works.

I am downgrading to swig version 1.3.36-1 and recompiling grass
and wxGUI.Nviz extension, wxGUI.Vector_Digitizing_Tool is working
correctly now. Thanks for tip.

OK, anyway wxGUI extensions need to be fixed to work properly also
with thhe newer versions of swig.

But I am having problem with editing vector attribute (for example, when
I am adding (v.db.addcol), renaming (v.db.renamecol), dropping
(v.db.dropcol) column and I am receiving error message (g.gui tcltk):

Do you use wxGUI attribute manager for that or you are calling the
commands for CLI?

In g.gui wxpython error message (wxGUI.Attribute_Table_Manager) (when
I am trying rename column): Execution failed: 'v.db.renamecol
map=Vrstevnice@PERMANENT layer=1 column=level,Nadm_vyska'
Details:
Error: There is no table connected to the input vector map! Cannot
rename any column.

And your current mapset is PERMANENT? Note that you can modify only
data from the current mapset. Probably this should be check and
related widgets disabled in wxGUI Attribute Manager.

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa

Do you use wxGUI attribute manager for that or you are calling the
commands for CLI?

I am having this problem with wxGUI attribute manager (add, drop, rename
column), but also when I am trying this from GRASS GIS Layer Manager
(Database/Manage databases/Add columns...) in wxpython gui and also tcltk gui,
and when I am trying use in cli.

> And your current mapset is PERMANENT? Note that you can modify only

data from the current mapset. Probably this should be check and
related widgets disabled in wxGUI Attribute Manager.

Yes my current mapset is PERNAMENT and vector map which I am editing is in this
mapset.

Zdravim,

2009/7/10 Tomas <tomas.zigo@slovanet.sk>:

I am having this problem with wxGUI attribute manager (add, drop, rename
column), but also when I am trying this from GRASS GIS Layer Manager
(Database/Manage databases/Add columns...) in wxpython gui and also tcltk gui,
and when I am trying use in cli.

well, not sure where can be a problem. Usual workflow.

1) create a new vector map
2) open ATM, go to 'Manage layers"
3) create table
4) add layer (v.db.connect)
5) go to "Manage tables"
6) add new column (v.db.addcol)
...

?

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa

Martin Landa <landa.martin <at> gmail.com> writes:

Zdravim,

well, not sure where can be a problem. Usual workflow.

1) create a new vector map
2) open ATM, go to 'Manage layers"
3) create table
4) add layer (v.db.connect)
5) go to "Manage tables"
6) add new column (v.db.addcol)
...

?

Martin

Zdravim,

1)pass
2)pass
3)pass
4)pass
5)pass
6) Error wxpython window : Error in command execution v.db.addcol: Execution
failed: 'v.db.addcol map=Skuska@PERMANENT layer=1 columns=NADM_VYSKA double
precision'
Details:
Error: There is no table connected to this map! Run v.db.connect or
v.db.addtable first.
7) ?

Tomas

Hi,

2009/7/10 Tomas Zigo <tomas.zigo@slovanet.sk>:

lets check it from CLI

1) create a new vector map
2) open ATM, go to 'Manage layers"
3) create table
4) add layer (v.db.connect)
5) go to "Manage tables"
6) add new column (v.db.addcol)

1)pass
2)pass
3)pass

db.tables -p

?

4)pass

v.db.connect map -g

?

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa

Hi.

Martin Landa <landa.martin <at> gmail.com>

1) v.digit -n map=Skuska1
2) v.db.addtable map=Skuska1 table=Skuska1

Using user specified table name: Skuska1
Creating new DB connection based on default mapset settings...
Creating table with columns (cat integer)
The table <Skuska1> is now part of vector map <Skuska1> and may be deleted
or overwritten by GRASS modules
Select privileges were granted on the table
Reading features...
Updating database...
100%
0 records updated/inserted (layer 1)
Current attribute table links:
Vector map <Skuska1@Polana_a_okolie_1k10000_5m> is connected by:
layer <1> table <Skuska1> in database
</home/tomas/Grass_data/Polana_bakalarska_praca/Polana_a_okolie_1k10000_5m/dbf/>
through driver <dbf> with key <cat>

db.tables -p

Skuska1

3) v.db.connect map=Skuska1 table=Skuska1 -o

v.db.connect Skuska1 -g

Vector map <Skuska1@Polana_a_okolie_1k10000_5m> is connected by:
layer <1> table <Skuska1> in database
</home/tomas/Grass_data/Polana_bakalarska_praca/Polana_a_okolie_1k10000_5m/dbf/>
through driver <dbf> with key <cat>

4) v.db.addcol map=Skuska1@Polana_a_okolie_1k10000_5m columns="NADM_VYSKA double
precision"
ERROR: There is no table connected to this map! Run v.db.connect or
       v.db.addtable first.

Tomas

Hi,

2009/7/11 Tomas Zigo <tomas.zigo@slovanet.sk>:

1) v.digit -n map=Skuska1

note that you can create a new vector map also using v.edit or v.in.ascii, e.g.

v.edit map=Skuska1 tool=create

2) v.db.addtable map=Skuska1 table=Skuska1

Using user specified table name: Skuska1
Creating new DB connection based on default mapset settings...
Creating table with columns (cat integer)
The table <Skuska1> is now part of vector map <Skuska1> and may be deleted
or overwritten by GRASS modules
Select privileges were granted on the table
Reading features...
Updating database...
100%
0 records updated/inserted (layer 1)
Current attribute table links:
Vector map <Skuska1@Polana_a_okolie_1k10000_5m> is connected by:
layer <1> table <Skuska1> in database
</home/tomas/Grass_data/Polana_bakalarska_praca/Polana_a_okolie_1k10000_5m/dbf/>
through driver <dbf> with key <cat>

db.tables -p

Skuska1

3) v.db.connect map=Skuska1 table=Skuska1 -o

This is not needed, v.db.addtable connects newly created table to the
vector map.

4) v.db.addcol map=Skuska1@Polana_a_okolie_1k10000_5m columns="NADM_VYSKA double
precision"
ERROR: There is no table connected to this map! Run v.db.connect or
v.db.addtable first.

Assuming, that 'Polana_a_okolie_1k10000_5m' is your current mapset. It
works for me (6.4.0svn, GNU/Linux).

Your OS?

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa

Martin Landa <landa.martin <at> gmail.com> writes:

Hi,

note that you can create a new vector map also using v.edit or v.in.ascii, e.g.
v.edit map=Skuska1 tool=create

I am using create new vector map with v.digit for this test (It's wrong way?)
but table created with v.db.addtable for this vector map (problem with editing I
had also with editing [add, drop, rename column] exist vector map for example
contour derived from dmt with r.contour), but when I am using v.edit to create
new vector map and create table and I am trying add column is working now
(working add, drop, rename column from wxpython ATM, cli also), but I am
updating my system before.
It is different to creating vector map with v.digit and v.edit for this tests. .

3) v.db.connect map=Skuska1 table=Skuska1 -o

This is not needed, v.db.addtable connects newly created table to the
vector map.

Yes, I know.

Assuming, that 'Polana_a_okolie_1k10000_5m' is your current mapset. It
works for me (6.4.0svn, GNU/Linux).

Yes 'Polana_a_okolie_1k10000_5m' is my current mapset.

My OS is GNU/Linux distributuon: Archlinux
GRASS version: grass-6.4.svn_src_snapshot_2009_07_04
Cpu: i686, x86-64

But now is vector editing work good (updating my system Archlinux on both
computer i686, x86-64), or this problem related with I am using v.digit to
create new vector map instead of v.edit?

Thanks Martin.

Tomas

Hi,

2009/7/11 Tomas Zigo <tomas.zigo@slovanet.sk>:

note that you can create a new vector map also using v.edit or v.in.ascii, e.g.
v.edit map=Skuska1 tool=create

I am using create new vector map with v.digit for this test (It's wrong way?)

No, it's was just a small note. At least in GRASS7 there is no v.digit.

but table created with v.db.addtable for this vector map (problem with editing I
had also with editing [add, drop, rename column] exist vector map for example
contour derived from dmt with r.contour), but when I am using v.edit to create
new vector map and create table and I am trying add column is working now
(working add, drop, rename column from wxpython ATM, cli also), but I am
updating my system before.
It is different to creating vector map with v.digit and v.edit for this tests. .

No, it should be the same.

Assuming, that 'Polana_a_okolie_1k10000_5m' is your current mapset. It
works for me (6.4.0svn, GNU/Linux).

Yes 'Polana_a_okolie_1k10000_5m' is my current mapset.

But now is vector editing work good (updating my system Archlinux on both
computer i686, x86-64), or this problem related with I am using v.digit to
create new vector map instead of v.edit?

I don't think so.

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa