[GRASS-dev] RE: [bug #4604] (grass) tcl/tk GUI: v.digit can't create new vect or in GUI mode

Confirmed; some caveats below.

For starters, v.digit from the CLI fails to automatically open an X-monitor;
whether this is intentional or not, it's inconsistent with the v.digit GUI
version, as that one opens x0 automatically.

##################
# v.digit -n CLI
##################

d.mon x0; v.digit -n map=Bugtest1
New empty map created.

############################
# v.digit CLI (no -n flag)
############################

d.mon x0 ; v.digit map=Opilio_ROV_Stations

using default visual which is TrueColor
ncolors: 16777216
Graphics driver [x0] started
Segmentation fault

This is important - if I try to query the vector Opilio_ROV_Stations from
the gis.m query tool, topology seems to be destroyed!

$ v.what -a map=Opilio_ROV_Stations east_north=647925.576373,5169619.14795
distance=16.2926107986 (copied from Output screen of gis.m)

(From Output screen): Opilio_ROV_Stations: You must build topology on vector
file

Ok, let's build some topology...

v.build Opilio_ROV_Stations
Building topology ...
18 primitives registered
Building areas: 100%
0 areas built
0 isles built
Attaching islands:
Attaching centroids: 100%
Topology was built.
Number of nodes : 12
Number of primitives: 18
Number of points : 12
Number of lines : 6
Number of boundaries: 0
Number of centroids : 0
Number of areas : 0
Number of isles : 0

Now, if I try to edit this vector again with the CLI command

d.mon x0 ; v.digit map=Opilio_ROV_Stations

using default visual which is TrueColor
ncolors: 16777216
Graphics driver [x0] started
Segmentation fault

Similarly, topology is again destroyed as I can't query this vector until I
rebuild topology.

Moving on to the GUI version of v.digit.....

Running the command

v.digit map=Bugtest2 'bgcmd=d.rast -o
map=CheticampAll_Aug2005_10m.shade.comb' displays my background map in x0,
but no v.digit toolbar opens! The corresponding output from gis.m:

GRASS_INFO_MESSAGE(9662,1): New empty map created.

Application initialization failed: "-n" option requires an additional
argument
Error in startup script: couldn't read file "map=Bugtest2": no such file or
directory

I thought -n was supposed to take care of creating the new vector for me.
What additional argument is it talking about?

Now let's try editing an existing vector through the GUI:

v.digit map=Disposal_Sites

x0 opens, but that's it.

~ Eric.

-----Original Message-----
From: Maciek Sieczka via RT
To: Patton, Eric
Cc: Michael.Barton@asu.edu
Sent: 7/23/2006 4:33 PM
Subject: [bug #4604] (grass) tcl/tk GUI: v.digit can't create new vector in
GUI mode

This bug is still valid in current CVS.

Maciek

-------------------------------------------- Managed by Request Tracker

Eric,

This is kind of a backhanded compliment I guess. From the command line,
GRASS has always had fairly primitive display control ability. NOTHING will
automatically open a display monitor of any kind.

Radim added the ability to automatically open an x11 display monitor when
d.rast or d.vect was run to the Display Manager in GRASS 5 and 6. I added it
to the v.digit button in the old GIS Manager for GRASS 6 and someone else
added automatic background display.

These conveniences are all in the TclTk code that creates the GIS Manager.

From the command line, you do all this manually...

D.mon start=x0
V.digit [vector map] bk=[background commands]
Etc.

Displaying things in the TclTk canvas, with display controls is completely
done within TclTk code, using display output to PPM files. This is where
things get problematic with v.digit, which only displays to an x11 monitor.

So this is NOT a bug. It is the way that the GRASS CLI is supposed to work.
You can make it a wish, however.

Cheers
Michael

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: "Patton, Eric" <epatton@nrcan.gc.ca>
Date: Mon, 24 Jul 2006 11:01:23 -0300
To: 'Maciek Sieczka via RT ' <grass-bugs@intevation.de>,
"'grass-dev@grass.itc.it'" <grass-dev@grass.itc.it>
Cc: "'Michael.Barton@asu.edu '" <Michael.Barton@asu.edu>
Subject: RE: [bug #4604] (grass) tcl/tk GUI: v.digit can't create new vect or
in GUI mode

Confirmed; some caveats below.

For starters, v.digit from the CLI fails to automatically open an X-monitor;
whether this is intentional or not, it's inconsistent with the v.digit GUI
version, as that one opens x0 automatically.

##################
# v.digit -n CLI
##################

d.mon x0; v.digit -n map=Bugtest1
New empty map created.

############################
# v.digit CLI (no -n flag)
############################

d.mon x0 ; v.digit map=Opilio_ROV_Stations

using default visual which is TrueColor
ncolors: 16777216
Graphics driver [x0] started
Segmentation fault

This is important - if I try to query the vector Opilio_ROV_Stations from
the gis.m query tool, topology seems to be destroyed!

$ v.what -a map=Opilio_ROV_Stations east_north=647925.576373,5169619.14795
distance=16.2926107986 (copied from Output screen of gis.m)

(From Output screen): Opilio_ROV_Stations: You must build topology on vector
file

Ok, let's build some topology...

v.build Opilio_ROV_Stations
Building topology ...
18 primitives registered
Building areas: 100%
0 areas built
0 isles built
Attaching islands:
Attaching centroids: 100%
Topology was built.
Number of nodes : 12
Number of primitives: 18
Number of points : 12
Number of lines : 6
Number of boundaries: 0
Number of centroids : 0
Number of areas : 0
Number of isles : 0

Now, if I try to edit this vector again with the CLI command

d.mon x0 ; v.digit map=Opilio_ROV_Stations

using default visual which is TrueColor
ncolors: 16777216
Graphics driver [x0] started
Segmentation fault

Similarly, topology is again destroyed as I can't query this vector until I
rebuild topology.

Moving on to the GUI version of v.digit.....

Running the command

v.digit map=Bugtest2 'bgcmd=d.rast -o
map=CheticampAll_Aug2005_10m.shade.comb' displays my background map in x0,
but no v.digit toolbar opens! The corresponding output from gis.m:

GRASS_INFO_MESSAGE(9662,1): New empty map created.

Application initialization failed: "-n" option requires an additional
argument
Error in startup script: couldn't read file "map=Bugtest2": no such file or
directory

I thought -n was supposed to take care of creating the new vector for me.
What additional argument is it talking about?

Now let's try editing an existing vector through the GUI:

v.digit map=Disposal_Sites

x0 opens, but that's it.

~ Eric.

-----Original Message-----
From: Maciek Sieczka via RT
To: Patton, Eric
Cc: Michael.Barton@asu.edu
Sent: 7/23/2006 4:33 PM
Subject: [bug #4604] (grass) tcl/tk GUI: v.digit can't create new vector in
GUI mode

This bug is still valid in current CVS.

Maciek

-------------------------------------------- Managed by Request Tracker