[GRASS5] zoom and pan in v.digit (was raster map file format)

Glynn Clements glynn at gclements.plus.com
Mon Nov 7 16:11:23 EST 2005


Michael Barton wrote:

> I'd like to add, a bit different from what Maciek suggests, that any zooming
> OR panning in v.digit should stay in v.digit and have no effect on the
> region for display or analysis outside of v.digit.

v.digit does this so that any external commands which it invokes use
the same region settings as v.digit.

AFAICT, there are two cases, both in display.c:

1. display_bg() executes a sequence of user-specified commands to draw
the background.

2. display_erase() executes d.erase to erase the background.

The second is gratuitous; it should just erase the background itself.

However, there's no getting around the former; the only way to make an
external command use a specific region is to modify the WIND file.

One option is to save the WIND file prior to executing the commands
then restore them afterwards.

Another option would be to modify G_get_window() so that you can force
it to read a different file by using an environment variable. Then,
v.digit could write the modified region to a temporary file and force
the background commands to use that via the environment variable.

In either case, the auto-redraw feature won't work, as the commands
will get the normal region rather than v.digit's internal version.

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




More information about the grass-dev mailing list