[GRASS-user] wxpython gui: d.vect.thematic raises error

On Feb 25, 2008, at 4:14 AM, grass-user-request@lists.osgeo.org wrote:

Date: Mon, 25 Feb 2008 01:24:39 +0100
From: "G. Allegri" <giohappy@gmail.com>
Subject: [GRASS-user] wxpython gui: d.vect.thematic raises error
To: grassuser <grass-user@lists.osgeo.org>
Message-ID:
  <e12429640802241624i15de3c42u50c6297de6e35212@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Another problem with the python GUI.
I tried to create a thematic layer with the following command:

d.vect.thematic map=topsoil_completo@tesi type=point column=Ece
themetype=graduated_points themecalc=interval colorscheme=blue-red --q

It raises an wxpython error window with this:

"Execution failed: 'd.vect.thematic map=topsoil_completo@tesi
type=point column=Ece themetype=graduated_points themecalc=interval
colorscheme=blue-red --q' "

while in the Grass shell appears the following track:

GRASS_INFO_ERROR(26517,1): *** You must open a display monitor ***

Sometimes this thematic map appears displayed, but not correctly (just
a subset of the points, with the same size), sometimes this exception
appear.

Is it something with my wxpython again?

Again, could you please describe the context in which you are running this?

Are you trying to do this from the command line or adding a layer to the layer manager?

If you are adding this to the layer manager, the display should be handled automatically. However, if you are trying to run this from the command line, you must open an x monitor or specify another display driver yourself.

Also, it would be helpful to know what version you are running, since there have been recent updates to both wxPython GUI and to d.vect.thematic.

Overall, you should normally tell us basic information about your system, GRASS version, and for the GUI, the context you are running a command.

Michael

You're right Michael. Sorry for not being exhaustive.
I'm doing test on Kubuntu 7.10
Grass: 6.3.0 RC5
wxwidgets: 2.8.4.0
python: 2.5.1

TWO ERRORS with vdigit and v.vect.thematic

FIRST ERROR: vdigit

I've loaded (inside the manager) a polygon layer and an empty line
layer to digitize the latter.
Then I've run vdigit from the "tools" menu. I've selected the line
layer as the layer to be digitized.
I get an error window with:

"Unable to initialize display driver, see README file for more information."

Nothing happens... and I loose control on the GUI. I have to kill it
and restart Gra
ss

SECOND ERROR: d.vect.thematic

I create a thematic vector map (from the gui). It's a point layer. I
ask to use graduated_points on a double type attribute.

Execution failed: 'd.vect.thematic map=topsoil_completo@tesi
type=point column=Ece themetype=graduated_points themecalc=interval
size=9 maxsize=25 nint=10 colorscheme=blue-red --q'

GRASS_INFO_ERROR(16631,1): *** You must open a display monitor ***

The same error raises if I launch it from commandline both in wxgrass and tcltk.
Again, I loose control on the GUI and got to kill it.

In Grass tcltk this command works correctly:

d.vect.thematic -s map=topsoil_completo@tesi type=point column=Ece
layer=1 icon=basic/circle size=9 maxsize=25 nint=10
pointcolor=255:0:0 linecolor=0:0:0 startcolor=255:0:0
endcolor=0:0:255 themetype=graduated_points monitor=none
themecalc=interval colorscheme=blue-red

Giovanni

2008/2/25, Michael Barton <michael.barton@asu.edu>:

On Feb 25, 2008, at 4:14 AM, grass-user-request@lists.osgeo.org wrote:

> Date: Mon, 25 Feb 2008 01:24:39 +0100
> From: "G. Allegri" <giohappy@gmail.com>
> Subject: [GRASS-user] wxpython gui: d.vect.thematic raises error
> To: grassuser <grass-user@lists.osgeo.org>
> Message-ID:
> <e12429640802241624i15de3c42u50c6297de6e35212@mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1

>
> Another problem with the python GUI.
> I tried to create a thematic layer with the following command:
>
> d.vect.thematic map=topsoil_completo@tesi type=point column=Ece
> themetype=graduated_points themecalc=interval colorscheme=blue-red --q
>
> It raises an wxpython error window with this:
>
> "Execution failed: 'd.vect.thematic map=topsoil_completo@tesi
> type=point column=Ece themetype=graduated_points themecalc=interval
> colorscheme=blue-red --q' "
>
> while in the Grass shell appears the following track:
>
> GRASS_INFO_ERROR(26517,1): *** You must open a display monitor ***
>
> Sometimes this thematic map appears displayed, but not correctly (just
> a subset of the points, with the same size), sometimes this exception
> appear.
>
> Is it something with my wxpython again?

Again, could you please describe the context in which you are running
this?

Are you trying to do this from the command line or adding a layer to
the layer manager?

If you are adding this to the layer manager, the display should be
handled automatically. However, if you are trying to run this from
the command line, you must open an x monitor or specify another
display driver yourself.

Also, it would be helpful to know what version you are running, since
there have been recent updates to both wxPython GUI and to
d.vect.thematic.

Overall, you should normally tell us basic information about your
system, GRASS version, and for the GUI, the context you are running a
command.

Michael

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Hi,

2008/2/25, G. Allegri <giohappy@gmail.com>:
[snip]

FIRST ERROR: vdigit

I've loaded (inside the manager) a polygon layer and an empty line
layer to digitize the latter.
Then I've run vdigit from the "tools" menu. I've selected the line
layer as the layer to be digitized.
I get an error window with:

"Unable to initialize display driver, see README file for more information."

To make digitizer you need to compile C++ code in gui/wxpython/vdigit,
see gui/wxpython/README for detailed information.

[snip]

Martin

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

Martin, I've already compiled vdigit correctly. It didn't give any
error or warning...

2008/2/25, Martin Landa <landa.martin@gmail.com>:

Hi,

2008/2/25, G. Allegri <giohappy@gmail.com>:
[snip]

> FIRST ERROR: vdigit
>
> I've loaded (inside the manager) a polygon layer and an empty line
> layer to digitize the latter.
> Then I've run vdigit from the "tools" menu. I've selected the line
> layer as the layer to be digitized.
> I get an error window with:
>
> "Unable to initialize display driver, see README file for more information."

To make digitizer you need to compile C++ code in gui/wxpython/vdigit,
see gui/wxpython/README for detailed information.

[snip]

Martin

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

Hi,

2008/2/25, G. Allegri <giohappy@gmail.com>:

Martin, I've already compiled vdigit correctly. It didn't give any
error or warning...

If you run 'make' in gui/wxpython/vdigit, you get two files
'grass6_wxvdigit.py' and '_grass6_wxvdigit.so'. Maybe you need to run
'make install' (depends on your installation procedure) or just copy
these file to $GISBASE/etc/wxpython/vdigit manually.

Martin

2008/2/25, Martin Landa <landa.martin@gmail.com>:

> Hi,
>
> 2008/2/25, G. Allegri <giohappy@gmail.com>:
> [snip]
>
>
> > FIRST ERROR: vdigit
> >
> > I've loaded (inside the manager) a polygon layer and an empty line
> > layer to digitize the latter.
> > Then I've run vdigit from the "tools" menu. I've selected the line
> > layer as the layer to be digitized.
> > I get an error window with:
> >
> > "Unable to initialize display driver, see README file for more information."
>
>
> To make digitizer you need to compile C++ code in gui/wxpython/vdigit,
> see gui/wxpython/README for detailed information.
>
> [snip]
>
> Martin
>
>
> --
> Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *
>

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

The strange think is that after having made vdigit, I've run make
install (from the source root), but nothing has been moved to the
$GISBASE/etc/wxpython/vdigit folder.

Anyway I've manually moved grass6_wxvdigit.py but obviously it'not
enough because I can't find _grass6_wxdigit.so. Where should it have
been compiled?

2008/2/25, Martin Landa <landa.martin@gmail.com>:

Hi,

2008/2/25, G. Allegri <giohappy@gmail.com>:

> Martin, I've already compiled vdigit correctly. It didn't give any
> error or warning...

If you run 'make' in gui/wxpython/vdigit, you get two files
'grass6_wxvdigit.py' and '_grass6_wxvdigit.so'. Maybe you need to run
'make install' (depends on your installation procedure) or just copy
these file to $GISBASE/etc/wxpython/vdigit manually.

Martin

> 2008/2/25, Martin Landa <landa.martin@gmail.com>:
>
> > Hi,
> >
> > 2008/2/25, G. Allegri <giohappy@gmail.com>:
> > [snip]
> >
> >
> > > FIRST ERROR: vdigit
> > >
> > > I've loaded (inside the manager) a polygon layer and an empty line
> > > layer to digitize the latter.
> > > Then I've run vdigit from the "tools" menu. I've selected the line
> > > layer as the layer to be digitized.
> > > I get an error window with:
> > >
> > > "Unable to initialize display driver, see README file for more information."
> >
> >
> > To make digitizer you need to compile C++ code in gui/wxpython/vdigit,
> > see gui/wxpython/README for detailed information.
> >
> > [snip]
> >
> > Martin
> >
> >
> > --
> > Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *
> >
>

--

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

I'm sorry. I had a problem with vdigit compilation and I accidentally ignore it.
I had an error with the compiler linker:

/usr/bin/ld: cannot find -lgdi
collect2: ld returned 1 exit status

2008/2/25, G. Allegri <giohappy@gmail.com>:

The strange think is that after having made vdigit, I've run make
install (from the source root), but nothing has been moved to the
$GISBASE/etc/wxpython/vdigit folder.

Anyway I've manually moved grass6_wxvdigit.py but obviously it'not
enough because I can't find _grass6_wxdigit.so. Where should it have
been compiled?

2008/2/25, Martin Landa <landa.martin@gmail.com>:
> Hi,
>
> 2008/2/25, G. Allegri <giohappy@gmail.com>:
>
> > Martin, I've already compiled vdigit correctly. It didn't give any
> > error or warning...
>
>
> If you run 'make' in gui/wxpython/vdigit, you get two files
> 'grass6_wxvdigit.py' and '_grass6_wxvdigit.so'. Maybe you need to run
> 'make install' (depends on your installation procedure) or just copy
> these file to $GISBASE/etc/wxpython/vdigit manually.
>
>
> Martin
>
>
> > 2008/2/25, Martin Landa <landa.martin@gmail.com>:
> >
> > > Hi,
> > >
> > > 2008/2/25, G. Allegri <giohappy@gmail.com>:
> > > [snip]
> > >
> > >
> > > > FIRST ERROR: vdigit
> > > >
> > > > I've loaded (inside the manager) a polygon layer and an empty line
> > > > layer to digitize the latter.
> > > > Then I've run vdigit from the "tools" menu. I've selected the line
> > > > layer as the layer to be digitized.
> > > > I get an error window with:
> > > >
> > > > "Unable to initialize display driver, see README file for more information."
> > >
> > >
> > > To make digitizer you need to compile C++ code in gui/wxpython/vdigit,
> > > see gui/wxpython/README for detailed information.
> > >
> > > [snip]
> > >
> > > Martin
> > >
> > >
> > > --
> > > Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *
> > >
> >
>
>
>
> --
>
> Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *
>

I've solved linking _gdi_.so library into /usr/lib
mmm... not very straigthforward :slight_smile:

The second error remains (d.vect.thematic)

2008/2/25, G. Allegri <giohappy@gmail.com>:

I'm sorry. I had a problem with vdigit compilation and I accidentally ignore it.
I had an error with the compiler linker:

/usr/bin/ld: cannot find -lgdi
collect2: ld returned 1 exit status

2008/2/25, G. Allegri <giohappy@gmail.com>:
> The strange think is that after having made vdigit, I've run make
> install (from the source root), but nothing has been moved to the
> $GISBASE/etc/wxpython/vdigit folder.
>
> Anyway I've manually moved grass6_wxvdigit.py but obviously it'not
> enough because I can't find _grass6_wxdigit.so. Where should it have
> been compiled?
>
>
> 2008/2/25, Martin Landa <landa.martin@gmail.com>:
> > Hi,
> >
> > 2008/2/25, G. Allegri <giohappy@gmail.com>:
> >
> > > Martin, I've already compiled vdigit correctly. It didn't give any
> > > error or warning...
> >
> >
> > If you run 'make' in gui/wxpython/vdigit, you get two files
> > 'grass6_wxvdigit.py' and '_grass6_wxvdigit.so'. Maybe you need to run
> > 'make install' (depends on your installation procedure) or just copy
> > these file to $GISBASE/etc/wxpython/vdigit manually.
> >
> >
> > Martin
> >
> >
> > > 2008/2/25, Martin Landa <landa.martin@gmail.com>:
> > >
> > > > Hi,
> > > >
> > > > 2008/2/25, G. Allegri <giohappy@gmail.com>:
> > > > [snip]
> > > >
> > > >
> > > > > FIRST ERROR: vdigit
> > > > >
> > > > > I've loaded (inside the manager) a polygon layer and an empty line
> > > > > layer to digitize the latter.
> > > > > Then I've run vdigit from the "tools" menu. I've selected the line
> > > > > layer as the layer to be digitized.
> > > > > I get an error window with:
> > > > >
> > > > > "Unable to initialize display driver, see README file for more information."
> > > >
> > > >
> > > > To make digitizer you need to compile C++ code in gui/wxpython/vdigit,
> > > > see gui/wxpython/README for detailed information.
> > > >
> > > > [snip]
> > > >
> > > > Martin
> > > >
> > > >
> > > > --
> > > > Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *
> > > >
> > >
> >
> >
> >
> > --
> >
> > Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *
> >
>

Hi,

2008/2/25, G. Allegri <giohappy@gmail.com>:

I've solved linking _gdi_.so library into /usr/lib
mmm... not very straigthforward :slight_smile:

yes, compiling vdigit is quite tricky, it needs to be simplified. The
problematic is usage of wxPython wxPseudoDC class which is not part of
wxWidgets itself. Solution would be to use wxDC instead of wxPseudoDC
in vdigit code. The problem is that in the Python code are used
methods of wxPseudoDC which are not available in wxDC class, e.g.
TraslateId() to move objects. Anyway linking against Python extension
_gdi_.so is not solution, it works on Linux machines, but on Mac
(AFAIU).

Congrats, you are one of the few users who manage compile it;-) Enjoy.

Martin

The second error remains (d.vect.thematic)

2008/2/25, G. Allegri <giohappy@gmail.com>:
> I'm sorry. I had a problem with vdigit compilation and I accidentally ignore it.
> I had an error with the compiler linker:
>
> /usr/bin/ld: cannot find -lgdi
> collect2: ld returned 1 exit status
>
>
>
> 2008/2/25, G. Allegri <giohappy@gmail.com>:
> > The strange think is that after having made vdigit, I've run make
> > install (from the source root), but nothing has been moved to the
> > $GISBASE/etc/wxpython/vdigit folder.
> >
> > Anyway I've manually moved grass6_wxvdigit.py but obviously it'not
> > enough because I can't find _grass6_wxdigit.so. Where should it have
> > been compiled?
> >
> >
> > 2008/2/25, Martin Landa <landa.martin@gmail.com>:
> > > Hi,
> > >
> > > 2008/2/25, G. Allegri <giohappy@gmail.com>:
> > >
> > > > Martin, I've already compiled vdigit correctly. It didn't give any
> > > > error or warning...
> > >
> > >
> > > If you run 'make' in gui/wxpython/vdigit, you get two files
> > > 'grass6_wxvdigit.py' and '_grass6_wxvdigit.so'. Maybe you need to run
> > > 'make install' (depends on your installation procedure) or just copy
> > > these file to $GISBASE/etc/wxpython/vdigit manually.
> > >
> > >
> > > Martin
> > >
> > >
> > > > 2008/2/25, Martin Landa <landa.martin@gmail.com>:
> > > >
> > > > > Hi,
> > > > >
> > > > > 2008/2/25, G. Allegri <giohappy@gmail.com>:
> > > > > [snip]
> > > > >
> > > > >
> > > > > > FIRST ERROR: vdigit
> > > > > >
> > > > > > I've loaded (inside the manager) a polygon layer and an empty line
> > > > > > layer to digitize the latter.
> > > > > > Then I've run vdigit from the "tools" menu. I've selected the line
> > > > > > layer as the layer to be digitized.
> > > > > > I get an error window with:
> > > > > >
> > > > > > "Unable to initialize display driver, see README file for more information."
> > > > >
> > > > >
> > > > > To make digitizer you need to compile C++ code in gui/wxpython/vdigit,
> > > > > see gui/wxpython/README for detailed information.
> > > > >
> > > > > [snip]
> > > > >
> > > > > Martin
> > > > >
> > > > >
> > > > > --
> > > > > Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > >
> > > Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *
> > >
> >
>

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

So, I'm on the edge! :wink:
I've seen the snapping tool between layers... The snap happens only at
the end of the digitizing process, but it doesn't appear during it
(the pointer and the node don't appear snapped). Is it something in
development?

Ops, I'm stressing you too much! I'm sorry, I promise I will stop soon :slight_smile:
I hope to get into the code enough to bcome helpful in some development...

PS: What about d.vect.thematic. Have you reproduced it?

2008/2/25, Martin Landa <landa.martin@gmail.com>:

Hi,

2008/2/25, G. Allegri <giohappy@gmail.com>:

> I've solved linking _gdi_.so library into /usr/lib
> mmm... not very straigthforward :slight_smile:

yes, compiling vdigit is quite tricky, it needs to be simplified. The
problematic is usage of wxPython wxPseudoDC class which is not part of
wxWidgets itself. Solution would be to use wxDC instead of wxPseudoDC
in vdigit code. The problem is that in the Python code are used
methods of wxPseudoDC which are not available in wxDC class, e.g.
TraslateId() to move objects. Anyway linking against Python extension
_gdi_.so is not solution, it works on Linux machines, but on Mac
(AFAIU).

Congrats, you are one of the few users who manage compile it;-) Enjoy.

Martin

> The second error remains (d.vect.thematic)
>
>
> 2008/2/25, G. Allegri <giohappy@gmail.com>:
> > I'm sorry. I had a problem with vdigit compilation and I accidentally ignore it.
> > I had an error with the compiler linker:
> >
> > /usr/bin/ld: cannot find -lgdi
> > collect2: ld returned 1 exit status
> >
> >
> >
> > 2008/2/25, G. Allegri <giohappy@gmail.com>:
> > > The strange think is that after having made vdigit, I've run make
> > > install (from the source root), but nothing has been moved to the
> > > $GISBASE/etc/wxpython/vdigit folder.
> > >
> > > Anyway I've manually moved grass6_wxvdigit.py but obviously it'not
> > > enough because I can't find _grass6_wxdigit.so. Where should it have
> > > been compiled?
> > >
> > >
> > > 2008/2/25, Martin Landa <landa.martin@gmail.com>:
> > > > Hi,
> > > >
> > > > 2008/2/25, G. Allegri <giohappy@gmail.com>:
> > > >
> > > > > Martin, I've already compiled vdigit correctly. It didn't give any
> > > > > error or warning...
> > > >
> > > >
> > > > If you run 'make' in gui/wxpython/vdigit, you get two files
> > > > 'grass6_wxvdigit.py' and '_grass6_wxvdigit.so'. Maybe you need to run
> > > > 'make install' (depends on your installation procedure) or just copy
> > > > these file to $GISBASE/etc/wxpython/vdigit manually.
> > > >
> > > >
> > > > Martin
> > > >
> > > >
> > > > > 2008/2/25, Martin Landa <landa.martin@gmail.com>:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > 2008/2/25, G. Allegri <giohappy@gmail.com>:
> > > > > > [snip]
> > > > > >
> > > > > >
> > > > > > > FIRST ERROR: vdigit
> > > > > > >
> > > > > > > I've loaded (inside the manager) a polygon layer and an empty line
> > > > > > > layer to digitize the latter.
> > > > > > > Then I've run vdigit from the "tools" menu. I've selected the line
> > > > > > > layer as the layer to be digitized.
> > > > > > > I get an error window with:
> > > > > > >
> > > > > > > "Unable to initialize display driver, see README file for more information."
> > > > > >
> > > > > >
> > > > > > To make digitizer you need to compile C++ code in gui/wxpython/vdigit,
> > > > > > see gui/wxpython/README for detailed information.
> > > > > >
> > > > > > [snip]
> > > > > >
> > > > > > Martin
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *
> > > >
> > >
> >
>

--

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

Did you get my questions about d.vect.thematic that I sent you earlier today?

It sounds like nothing is wrong. But I can't troubleshoot it until you tell me more information.

Michael
____________________
C. Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

Phone: 480-965-6262
Fax: 480-965-7671
www: <www.public.asu.edu/~cmbarton>

On Feb 25, 2008, at 4:37 PM, G. Allegri wrote:

PS: What about d.vect.thematic. Have you reproduced it?

Michael, I posted an answer at 5.42 pm...
I attach it again.

----------------------------------

You're right Michael. Sorry for not being exhaustive.
I'm doing test on Kubuntu 7.10
Grass: 6.3.0 RC5
wxwidgets: 2.8.4.0
python: 2.5.1

I create a thematic vector map (from the gui). It's a point layer. I
ask to use graduated_points on a double type attribute.

Execution failed: 'd.vect.thematic map=topsoil_completo@tesi
type=point column=Ece themetype=graduated_points themecalc=interval
size=9 maxsize=25 nint=10 colorscheme=blue-red --q'

GRASS_INFO_ERROR(16631,1): *** You must open a display monitor ***

The same error raises if I launch it from commandline both in wxgrass and tcltk.
Again, I loose control on the GUI and got to kill it.

In Grass tcltk this command works correctly:

d.vect.thematic -s map=topsoil_completo@tesi type=point column=Ece
layer=1 icon=basic/circle size=9 maxsize=25 nint=10
pointcolor=255:0:0 linecolor=0:0:0 startcolor=255:0:0
endcolor=0:0:255 themetype=graduated_points monitor=none
themecalc=interval colorscheme=blue-red

On Feb 25, 2008, at 9:42 AM, G. Allegri wrote:

SECOND ERROR: d.vect.thematic

I create a thematic vector map (from the gui). It’s a point layer. I
ask to use graduated_points on a double type attribute.

Execution failed: ‘d.vect.thematic map=topsoil_completo@tesi
type=point column=Ece themetype=graduated_points themecalc=interval
size=9 maxsize=25 nint=10 colorscheme=blue-red --q’

GRASS_INFO_ERROR(16631,1): *** You must open a display monitor ***

The same error raises if I launch it from commandline both in wxgrass and tcltk.
Again, I loose control on the GUI and got to kill it.

In Grass tcltk this command works correctly:

Sorry I missed your reply. It was trapped by my spam filter.

This works exactly as it should, since you are not running it in the gui, but from the command line. You have to have a window to display the thematic map IN.

If you add a thematic layer in the GUI layer manager, it will take care of this chore.

But if you want to do it the old fashioned way from the command line, you need to specify a display of some kind. The default is an x monitor, but you can also display from a PNG file. You have to launch these using d.mon.

Michael

Sorry Michael. This is the problem: the error raises when I add a
thematic layer in the GUI layer manager... No command line.

2008/2/26, Michael Barton <michael.barton@asu.edu>:

On Feb 25, 2008, at 9:42 AM, G. Allegri wrote:
SECOND ERROR: d.vect.thematic

I create a thematic vector map (from the gui). It's a point layer. I
ask to use graduated_points on a double type attribute.

Execution failed: 'd.vect.thematic map=topsoil_completo@tesi
type=point column=Ece themetype=graduated_points themecalc=interval
size=9 maxsize=25 nint=10 colorscheme=blue-red --q'

GRASS_INFO_ERROR(16631,1): *** You must open a display monitor ***

The same error raises if I launch it from commandline both in wxgrass and
tcltk.
Again, I loose control on the GUI and got to kill it.

In Grass tcltk this command works correctly:
Sorry I missed your reply. It was trapped by my spam filter.

This works exactly as it should, since you are not running it in the gui,
but from the command line. You have to have a window to display the thematic
map IN.

If you add a thematic layer in the GUI layer manager, it will take care of
this chore.

But if you want to do it the old fashioned way from the command line, you
need to specify a display of some kind. The default is an x monitor, but you
can also display from a PNG file. You have to launch these using d.mon.

Michael

On Feb 25, 2008, at 4:42 PM, G. Allegri wrote:

Michael, I posted an answer at 5.42 pm...
I attach it again.

----------------------------------

You're right Michael. Sorry for not being exhaustive.
I'm doing test on Kubuntu 7.10
Grass: 6.3.0 RC5
wxwidgets: 2.8.4.0
python: 2.5.1

I create a thematic vector map (from the gui). It's a point layer. I
ask to use graduated_points on a double type attribute.

Execution failed: 'd.vect.thematic map=topsoil_completo@tesi
type=point column=Ece themetype=graduated_points themecalc=interval
size=9 maxsize=25 nint=10 colorscheme=blue-red --q'

GRASS_INFO_ERROR(16631,1): *** You must open a display monitor ***

I've run some tests and can tell you what you need to do to avoid the error when creating a thematic layer in the GUI Layer Manager. However, we will probably need to make a custom thematic module rather than depend on the autogenerated GUI in this case.

You need to go to the Misc tab and check the box "Output legend for GIS Manager (for scripting use only)".

This should create the thematic map without also generating the xmon error. However, it will not creating a legend automatically. This needs to be created through custom programming, as is done with TclTk GUI.

I think we should wait to create the custom thematic module, however, until the C version of this is done (currently functional for areas, but not yet for points or lines). The current version (d.vect.thematic) is a bash script.

I hope this is helpful. Thanks for testing the wxPython GUI>

Michael

The same error raises if I launch it from commandline both in wxgrass and tcltk.
Again, I loose control on the GUI and got to kill it.

In Grass tcltk this command works correctly:

d.vect.thematic -s map=topsoil_completo@tesi type=point column=Ece
layer=1 icon=basic/circle size=9 maxsize=25 nint=10
pointcolor=255:0:0 linecolor=0:0:0 startcolor=255:0:0
endcolor=0:0:255 themetype=graduated_points monitor=none
themecalc=interval colorscheme=blue-red

Hi,

2008/2/26, G. Allegri <giohappy@gmail.com>:

So, I'm on the edge! :wink:
I've seen the snapping tool between layers... The snap happens only at
the end of the digitizing process, but it doesn't appear during it
(the pointer and the node don't appear snapped). Is it something in
development?

basically snapping is done when new feature is written (snapping on
the fly could be implemented using wxPython functionality). If you
want to enable snapping to background vector map objects, set up
background map in digitization settings. The behaviour is the same,
snapping is done when feature is written not on the fly. Can be
reported as a wish.

Martin

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

Thanks Michael. It works. I thought I had already tried this way...
this time it worked correctly checking the "Output legend for GIS
Manager (for scripting use only)".

2008/2/26, Michael Barton <michael.barton@asu.edu>:

On Feb 25, 2008, at 4:42 PM, G. Allegri wrote:
ec
> Michael, I posted an answer at 5.42 pm...
> I attach it again.
>
> ----------------------------------
>
> You're right Michael. Sorry for not being exhaustive.
> I'm doing test on Kubuntu 7.10
> Grass: 6.3.0 RC5
> wxwidgets: 2.8.4.0
> python: 2.5.1
>
> I create a thematic vector map (from the gui). It's a point layer. I
> ask to use graduated_points on a double type attribute.
>
> Execution failed: 'd.vect.thematic map=topsoil_completo@tesi
> type=point column=Ece themetype=graduated_points themecalc=interval
> size=9 maxsize=25 nint=10 colorscheme=blue-red --q'
>
> GRASS_INFO_ERROR(16631,1): *** You must open a display monitor ***

I've run some tests and can tell you what you need to do to avoid the
error when creating a thematic layer in the GUI Layer Manager.
However, we will probably need to make a custom thematic module
rather than depend on the autogenerated GUI in this case.

You need to go to the Misc tab and check the box "Output legend for
GIS Manager (for scripting use only)".

This should create the thematic map without also generating the xmon
error. However, it will not creating a legend automatically. This
needs to be created through custom programming, as is done with TclTk
GUI.

I think we should wait to create the custom thematic module, however,
until the C version of this is done (currently functional for areas,
but not yet for points or lines). The current version
(d.vect.thematic) is a bash script.

I hope this is helpful. Thanks for testing the wxPython GUI>

Michael

>
> The same error raises if I launch it from commandline both in
> wxgrass and tcltk.
> Again, I loose control on the GUI and got to kill it.
>
>
> In Grass tcltk this command works correctly:
>
> d.vect.thematic -s map=topsoil_completo@tesi type=point column=Ece
> layer=1 icon=basic/circle size=9 maxsize=25 nint=10
> pointcolor=255:0:0 linecolor=0:0:0 startcolor=255:0:0
> endcolor=0:0:255 themetype=graduated_points monitor=none
> themecalc=interval colorscheme=blue-red

basically snapping is done when new feature is written (snapping on
the fly could be implemented using wxPython functionality). If you
want to enable snapping to background vector map objects, set up
background map in digitization settings. The behaviour is the same,
snapping is done when feature is written not on the fly. Can be
reported as a wish.

I will put in the wish. I imagine you're using the v.edit system to do
snapping now... I'll try to figure out how to manage on-the-fly
snapping with wpython.