When I launch vdigit, the Grass GIS display turn right in the vdigit window. But when selecting a vector map, i get the message :
Traceback (most recent call last):
File "/usr/local/grass-6.4.0RC5/etc/wxpython/gui_modules/t
oolbars.py", line 1071, in OnSelectMap
self.StartEditing(self.layers[selection])
File "/usr/local/grass-6.4.0RC5/etc/wxpython/gui_modules/t
oolbars.py", line 1103, in StartEditing
self.parent.digit = Digit(mapwindow=self.parent.MapWindow)
File "/usr/local/grass-6.4.0RC5/etc/wxpython/gui_modules/v
digit.py", line 685, in __init__
VDigit.__init__(self, mapwindow)
File "/usr/local/grass-6.4.0RC5/etc/wxpython/gui_modules/v
digit.py", line 223, in __init__
mapwindow)
File "/usr/local/grass-6.4.0RC5/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 *'
When trying to add, move, … a feature, I get a warning window that say : ‘no map selected for edition’ (but in French)
No more access to the parameters window (same message as above)
When I launch vdigit, the Grass GIS display turn right in the vdigit window. But when selecting a vector map, i get the message :
Traceback (most recent call last):
File "/usr/local/grass-6.4.0RC5/etc/wxpython/gui_modules/t
oolbars.py", line 1071, in OnSelectMap
self.StartEditing(self.layers[selection])
File "/usr/local/grass-6.4.0RC5/etc/wxpython/gui_modules/t
oolbars.py", line 1103, in StartEditing
self.parent.digit = Digit(mapwindow=self.parent.MapWindow)
File "/usr/local/grass-6.4.0RC5/etc/wxpython/gui_modules/v
digit.py", line 685, in __init__
VDigit.__init__(self, mapwindow)
File "/usr/local/grass-6.4.0RC5/etc/wxpython/gui_modules/v
digit.py", line 223, in __init__
mapwindow)
File "/usr/local/grass-6.4.0RC5/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 *'
When trying to add, move, … a feature, I get a warning window that say : ‘no map selected for edition’ (but in French)
It can be caused with the fact that used different Swig version for building vector digitizer extension compared to the version used for building wxPython library…
Thanks for your response. The problem is effectively swig.
I’m using Fedora 11,
wxWidgets (wxGTK) 2.8.10
wxPython 2.8.9.2-2
By default, version of swig is 1.3.39 in FC11. I’ve recompiled the wxWidget and wxPython package from SRPMS, but the problem persists.
Thus, I retrograded to swig 1.3.35 (and, of course, recompilation of wxPython) and everythings is now OK. Vdigit works perfectly.
It seems to be a problem with swig 1.3.39
Benoit.
Le samedi 19 septembre 2009 à 18:29 +0200, Martin Landa a écrit :
When I launch vdigit, the Grass GIS display turn right in the vdigit window. But when selecting a vector map, i get the message :
Traceback (most recent call last):
File "/usr/local/grass-6.4.0RC5/etc/wxpython/gui_modules/t
oolbars.py", line 1071, in OnSelectMap
self.StartEditing(self.layers[selection])
File "/usr/local/grass-6.4.0RC5/etc/wxpython/gui_modules/t
oolbars.py", line 1103, in StartEditing
self.parent.digit = Digit(mapwindow=self.parent.MapWindow)
File "/usr/local/grass-6.4.0RC5/etc/wxpython/gui_modules/v
digit.py", line 685, in __init__
VDigit.__init__(self, mapwindow)
File "/usr/local/grass-6.4.0RC5/etc/wxpython/gui_modules/v
digit.py", line 223, in __init__
mapwindow)
File "/usr/local/grass-6.4.0RC5/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 *'
When trying to add, move, … a feature, I get a warning window that say : ‘no map selected for edition’ (but in French)
It can be caused with the fact that used different Swig version for building vector digitizer extension compared to the version used for building wxPython library…
from a raster map I get vector polygons with r.to.vect.
As I use the -v flag, I get one category-number for each value. This is
what I want.
My problem: v.to.db does not update negative cats! Is there any way to
handle this?
I dont want to loose the identification, nor miss the -v Flag: Having
raster-values in a column "value" is not clean, due to the fact, that I
have eg. to remove small trapped cells, calc center of gravity and more.
from a raster map I get vector polygons with r.to.vect.
As I use the -v flag, I get one category-number for each
value. This is what I want.
My problem: v.to.db does not update negative cats! Is there
any way to handle this?
I dont want to loose the identification, nor miss the -v Flag: Having
raster-values in a column "value" is not clean, due to the fact, that I
have eg. to remove small trapped cells, calc center of gravity and more.
the key column ID is meant to be a positive number. attribute columns can
be whatever you like.
You can keep a form of the number positive with r.mapcalc, e.g.:
Because the database (sqlite) has its own ids, it can handle the grass
internal cats even when they are negative.
Multiplying forward and backward let me identify old numbers.
I was a bit afraid, that the numbers result are to hight, because I used
three different kinds of objects coded as positive, negative and
negative multiplied with 100000.
Achim
Hamish schrieb:
Achim wrote:
from a raster map I get vector polygons with r.to.vect.
As I use the -v flag, I get one category-number for each
value. This is what I want.
My problem: v.to.db does not update negative cats! Is there
any way to handle this?
I dont want to loose the identification, nor miss the -v Flag: Having
raster-values in a column "value" is not clean, due to the fact, that I
have eg. to remove small trapped cells, calc center of gravity and more.
the key column ID is meant to be a positive number. attribute columns can
be whatever you like.
You can keep a form of the number positive with r.mapcalc, e.g.:
I am going to measure the distance from one centroid to another for many
polygons in a layer in order to update the table with the distance.
What would be a way? The only I can imagine so far is:
- collecting coordinates
- building lines from them
- update length of lines
- update old table
Is there another, better and faster way? Shouldn't be measuring of
distances a common tool? Do I just don't find it? Do I understand
v.distance wrong (it just returns the cat of the nearest feature)?
I did it the long-way. Here you are (here I am):
-defining, whats the "next" polygon
-updating table with coordinates of centroids
-and the centroids of the next
-writing these informations and cats number out
-building standard-ascii-lines-import file with a bit of awk
-import that
-building table (with stored category-numbers)
-adding column "length"
-v.to.db option=length
-update original table
Achim
Achim Kisseler schrieb:
Hi grass-users,
I am going to measure the distance from one centroid to another for many
polygons in a layer in order to update the table with the distance.
What would be a way? The only I can imagine so far is:
- collecting coordinates
- building lines from them
- update length of lines
- update old table
Is there another, better and faster way? Shouldn't be measuring of
distances a common tool? Do I just don't find it? Do I understand
v.distance wrong (it just returns the cat of the nearest feature)?
note that the centroids can legally be placed anywhere within the area's
boundary, so measuring distances between them gives a constrained, but
mostly meaningless result.
if you really want to do it, the method I'd have used would be v.type +
v.distance.
shrug,
Hamish
Achim wrote:
I did it the long-way. Here you are (here I am):
-defining, whats the "next" polygon
-updating table with coordinates of centroids
-and the centroids of the next
-writing these informations and cats number out
-building standard-ascii-lines-import file with a bit of awk
-import that
-building table (with stored category-numbers)
-adding column "length"
-v.to.db option=length
-update original table
Achim
Achim Kisseler schrieb:
> Hi grass-users,
>
> I am going to measure the distance from one centroid
to another for many
> polygons in a layer in order to update the table with
the distance.
>
> What would be a way? The only I can imagine so far
is:
> - collecting coordinates
> - building lines from them
> - update length of lines
> - update old table
>
> Is there another, better and faster way? Shouldn't be
measuring of
> distances a common tool? Do I just don't find it? Do I
understand
> v.distance wrong (it just returns the cat of the
nearest feature)?
>
> Achim