[GRASS-dev] invoking d.vect and d.rast from CLI

I'm having trouble getting d.rast and d.vect working on the command line.
Here's a step-by-step to reproduce using Spearfish:

After initial Grass 6.3 startup finishes:

d.mon -L

name description status
---- ----------- ------
PNG Create PNG Map not running
png1 Create PNG Map not running
png2 Create PNG Map not running
png3 Create PNG Map not running
png4 Create PNG Map not running
png5 Create PNG Map not running
png6 Create PNG Map not running
png7 Create PNG Map not running
gism Create PNG Map for gis.m not running
x0 X-windows graphics display not running
x1 X-windows graphics display not running
x2 X-windows graphics display not running
x3 X-windows graphics display not running
x4 X-windows graphics display not running
x5 X-windows graphics display not running
x6 X-windows graphics display not running
x7 X-windows graphics display not running

# Shouldn't gism be shown as running here?

d.mon start=gism

PNG: GRASS_TRUECOLOR status: FALSE
PNG: collecting to file: map.png,
     GRASS_WIDTH=640, GRASS_HEIGHT=480
Graphics driver [gism] started

~ >d.mon -L
name description status
---- ----------- ------
PNG Create PNG Map not running
png1 Create PNG Map not running
png2 Create PNG Map not running
png3 Create PNG Map not running
png4 Create PNG Map not running
png5 Create PNG Map not running
png6 Create PNG Map not running
png7 Create PNG Map not running
gism Create PNG Map for gis.m running (selected)
x0 X-windows graphics display not running
x1 X-windows graphics display not running
x2 X-windows graphics display not running
x3 X-windows graphics display not running
x4 X-windows graphics display not running
x5 X-windows graphics display not running
x6 X-windows graphics display not running
x7 X-windows graphics display not running

# I seem to remember before that gism was shown as being selected
immediately
# upon starting Grass...

~ >g.region rast=elevation.10m
~ >d.rast -o map=elevation.10m
100%

# Nothing draws in the gis.m map display!
# Let's try a vector instead...

~ >g.region vect=soils
~ >d.vect soils

Again, nothing displays.

Any ideas on what's going on here?

~ Eric.

On Thu, August 31, 2006 20:15, Patton, Eric wrote:

I'm having trouble getting d.rast and d.vect working on the command line.
Here's a step-by-step to reproduce using Spearfish:

After initial Grass 6.3 startup finishes:

d.mon -L

name description status
---- ----------- ------
PNG Create PNG Map not running
png1 Create PNG Map not running
png2 Create PNG Map not running
png3 Create PNG Map not running
png4 Create PNG Map not running
png5 Create PNG Map not running
png6 Create PNG Map not running
png7 Create PNG Map not running
gism Create PNG Map for gis.m not running
x0 X-windows graphics display not running
x1 X-windows graphics display not running
x2 X-windows graphics display not running
x3 X-windows graphics display not running
x4 X-windows graphics display not running
x5 X-windows graphics display not running
x6 X-windows graphics display not running
x7 X-windows graphics display not running

# Shouldn't gism be shown as running here?

No, since last week, gis.m uses Glynn's implementation of monitor-less
renderning via the GRASS_RENDER_IMMEDIATE variable.

~ >g.region rast=elevation.10m
~ >d.rast -o map=elevation.10m
100%

# Nothing draws in the gis.m map display!
# Let's try a vector instead...

~ >g.region vect=soils
~ >d.vect soils

Again, nothing displays.

Any ideas on what's going on here?

Try rendering without launching gis.m. Check if GRASS_RENDER_IMMEDIATE is
set to true.

However, I don't know if when it's set, it will render to the same ppm
file as gis.m.

Moritz

Patton, Eric wrote:

I'm having trouble getting d.rast and d.vect working on the command line.
Here's a step-by-step to reproduce using Spearfish:

After initial Grass 6.3 startup finishes:

>d.mon -L

# Shouldn't gism be shown as running here?

No. The gism monitor is no longer used; even when gis.m did use it, it
would start and stop it as necessary.

>d.mon start=gism

The gism monitor is "reserved" for gis.m. Don't attempt to use it
yourself. Now that gis.m no longer uses it, it is likely to be
removed.

~ >d.mon -L

# I seem to remember before that gism was shown as being selected immediately
# upon starting Grass...

It used to be, but isn't any more. But that doesn't matter.

~ >g.region rast=elevation.10m
~ >d.rast -o map=elevation.10m
100%

# Nothing draws in the gis.m map display!

Even when gis.m used the gism monitor, this wouldn't have worked.
gis.m will only attempt to display the images which are generated at
its request. Any other images generated by the monitor will be
ignored.

# Let's try a vector instead...

~ >g.region vect=soils
~ >d.vect soils

Again, nothing displays.

Any ideas on what's going on here?

You appear to have misunderstood what gis.m does and how it works.

Currently, there is no mechanism by which another process can control
what is displayed in gis.m. Such a feature would be useful, but
implementing it would be non-trivial.

--
Glynn Clements <glynn@gclements.plus.com>

Gism now uses GRASS_RENDER_IMMEDIATE mode. This causes any d.* command to
send its output to a PPM file rather than to the d.mon display driver. This
is only invoked just before a d.* command is issued and turned off
afterwards. So d.mon start=gism is no longer used. This leaves the display
driver free for whatever you want to use it for, but you'll have to set
d.mon manually.

In any case, you couldn't just set d.mon start=gism, type a display command,
and have the map display in the canvas. This is a TclTk canvas, whose
display is controlled by TclTk scripts, not GRASS commands. It is not a
simple display window like an xterminal.

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: Thu, 31 Aug 2006 15:15:44 -0300
To: "'grassuser@grass.itc.it'" <grassuser@grass.itc.it>
Cc: "'grass-dev@grass.itc.it'" <grass-dev@grass.itc.it>
Subject: [GRASS-user] invoking d.vect and d.rast from CLI

I'm having trouble getting d.rast and d.vect working on the command line.
Here's a step-by-step to reproduce using Spearfish:

After initial Grass 6.3 startup finishes:

d.mon -L

name description status
---- ----------- ------
PNG Create PNG Map not running
png1 Create PNG Map not running
png2 Create PNG Map not running
png3 Create PNG Map not running
png4 Create PNG Map not running
png5 Create PNG Map not running
png6 Create PNG Map not running
png7 Create PNG Map not running
gism Create PNG Map for gis.m not running
x0 X-windows graphics display not running
x1 X-windows graphics display not running
x2 X-windows graphics display not running
x3 X-windows graphics display not running
x4 X-windows graphics display not running
x5 X-windows graphics display not running
x6 X-windows graphics display not running
x7 X-windows graphics display not running

# Shouldn't gism be shown as running here?

d.mon start=gism

PNG: GRASS_TRUECOLOR status: FALSE
PNG: collecting to file: map.png,
     GRASS_WIDTH=640, GRASS_HEIGHT=480
Graphics driver [gism] started

~ >d.mon -L
name description status
---- ----------- ------
PNG Create PNG Map not running
png1 Create PNG Map not running
png2 Create PNG Map not running
png3 Create PNG Map not running
png4 Create PNG Map not running
png5 Create PNG Map not running
png6 Create PNG Map not running
png7 Create PNG Map not running
gism Create PNG Map for gis.m running (selected)
x0 X-windows graphics display not running
x1 X-windows graphics display not running
x2 X-windows graphics display not running
x3 X-windows graphics display not running
x4 X-windows graphics display not running
x5 X-windows graphics display not running
x6 X-windows graphics display not running
x7 X-windows graphics display not running

# I seem to remember before that gism was shown as being selected
immediately
# upon starting Grass...

~ >g.region rast=elevation.10m
~ >d.rast -o map=elevation.10m
100%

# Nothing draws in the gis.m map display!
# Let's try a vector instead...

~ >g.region vect=soils
~ >d.vect soils

Again, nothing displays.

Any ideas on what's going on here?

~ Eric.