[GRASS5] Re: [GRASSLIST:3735] Re: d.zoom question

Glynn Clements glynn.clements at virgin.net
Fri May 24 12:30:21 EDT 2002


Eric G. Miller wrote:

> > I just noticed this with d.zoom, that you are only able to zoom with a
> > raster image.  Is it possible to modify the code such that you would be
> > able to zoom with only a vector??
> 
> This should be working in recent GRASS.  What version of GRASS?

Even in the most recent version, "d.zoom" requires a "rast=" option
unless something is already displayed in the monitor (according to
D_get_{cell,dig,site}_list()):

    if(!rast && !vect && !site)
    {
	  rmap->required = YES;
	  just->answer = 1;
    }

This should probably be replaced by a check *after* G_parser()
returns, e.g.

    if(!rast && !vect && !site &&
       !rmap->answer && !vmap->answer && !smap->answer)
	G_fatal_error("Nothing to zoom");

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-dev mailing list