[GRASS-dev] Zooming issue in gis manager

Michael Barton michael.barton at asu.edu
Wed Nov 1 17:30:06 EST 2006


I've looked even further and found that as Glynn notes, d.rast also will
align with cells, even if the -a flag is not set in g.region. It also seems
to do so somewhat more accurately than with the -a flag set. That is, it
produces a much better (exact?) match between the display and computational
region in a more predictable way, as you can see in the graphics I showed
last night.

However, if  you want to *really* see where the grid cells are at high
magnification, try the explore mode. Because it increases the resolution as
you zoom in (to keep a constant number of cells/pixel) you can set the
display to zoom across original cell boundaries. It also shows a point
overlaying cells in a slightly differently place even than "normal" display
mode with -a not set--by about a quarter of a cell on the display I'm
looking at. With -a set, the difference is more than 1/2 cell in the other
direction. 

I can't tell which is "right" for certain. That is, I'm not sure how to tell
mathematically where the cell boundaries ought to lie with respect to their
actual coordinates and where a point should lie within a cell. I'm betting
that explore mode is the most "accurate" in terms of the relationship
between cells and a point. How can we determine what the cell boundaries
ought to be? Since this is a function of the interaction between g.region
and the display driver, do we need to do anything about it (as Joel asks)?
If so, what? Also, I assume that this is only affecting the graphics created
out of d.rast (and d.vect??), and does not affect any overlay operations. So
how should it be prioritized?

Michael 


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

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


> From: Joel Pitt <joel.pitt at gmail.com>
> Reply-To: <joel.pitt at gmail.com>
> Date: Thu, 2 Nov 2006 10:08:48 +1300
> To: Glynn Clements <glynn at gclements.plus.com>
> Cc: Maciej Sieczka <tutey at o2.pl>, Michael Barton <michael.barton at asu.edu>,
> grass-dev <grass-dev at grass.itc.it>
> Subject: Re: [GRASS-dev] Zooming issue in gis manager
> 
> On 11/2/06, Glynn Clements <glynn at gclements.plus.com> wrote:
>> I think that the core problem is that d.rast cannot render an
>> arbitrary portion of a map; the rendered image has to be aligned to
>> the cell boundaries.
>> 
>> The region always has an integer number of rows and columns. d.rast
>> always ensures that the entire region just fits inside the frame; one
>> pair of edges will always exactly touch the corresponding edges of the
>> region.
>> 
>> Thus, the rendered image will only ever show whole cells. You will
>> never get a situation where part of a cell is shown and the other part
>> cropped.
> 
> How much difficulty would it be to alter the behaviour of d.rast to
> allow partial
> cells to be rendered?
> 
> If someone were to make the change, can anyone think of what flow on
> effects this would have for other components of GRASS? (Not too much
> of an issue since a flag could be added to d.rast to have this as
> optional behaviour).
> 
> -- 
> -Joel
> 
> "Wish not to seem, but to be, the best."
>                 -- Aeschylus




More information about the grass-dev mailing list