[GRASS-dev] Re: gis.m zooming: 2 new bugs

Michael Barton michael.barton at asu.edu
Thu Sep 21 16:26:31 EDT 2006


Hi Maciej. 

I modeled the zoom out box after the behavior of MapInfo. After reading
this, I went and downloaded the QGIS 8 preview release. It looks very nice.
I checked out the zoom out box in some detail. Here is how it seems to work
(someone from the QGIS team can clarify if I miss something).

The zoom out box simply tells QGIS to zoom out by a standard amount,
regardless of the size and/or shape of the box. That is, the zoom out box
does not have any effects on the display geometry or on the amount of zoom.
It does seem to pan so that the center of the zoom out box becomes the
center of the screen. This seems in part due to how map-to-screen rendering
works and part because of how it deals with region-of-interest.  Using the
zoom out box and zoom out clicking in QGIS do pretty much the same thing
AFAICT.

If you simply click the zoom out tool in GRASS, it works pretty much like
QGIS does, but without centering. Previous iterations did centering too, but
I was getting some inconsistent behavior (as you know) and dropped it when I
redid the one-click zoom out algorithm. I probably can put it back in. But I
guess we need to see if it is really helpful on zoom out (it certainly is on
zoom in). 

A few additional answers to questions and comments below (probably some
redundancy too).

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: Maciej Sieczka <tutey at o2.pl>
> Date: Thu, 21 Sep 2006 20:14:49 +0200
> To: Michael Barton <michael.barton at asu.edu>
> Cc: Moritz Lennert <mlennert at club.worldonline.be>, Michael Barton
> <c.michael.barton at gmail.com>, grass-dev <grass-dev at grass.itc.it>
> Subject: Re: [GRASS-dev] Re: gis.m zooming: 2 new bugs
> 
> OK, now I understand how it works. Questions:
> 
> Why did you implement it this way? Other GIS software working the same?
> 
> I checked the box-zoom-out in QGIS and UDIG - neither behaves the way
> gis.m does. Of course, this is not an ultimate argument. But I'm
> wondering why you decided for an IMO counter-intuitive, non-standard
> (to my limited experience) solution?

I don't know UDIG. Many programs do not have a zoom out box, but simply do
zooming out the way the GRASS one-click zoom out behaves.

> 
> I can explain why IMO counter-intuitive: when I draw a box (no matter
> if zoom-out or zoom-in one) I (naturaly, I think) expect the objects
> within this box to be in the center of display in a result. With gis.m
> for box-zoom-out this will only happen if I over a center of the
> canvas. If I draw the zoom box in eg. the top left corner, the
> resulting region will be still centered on the former center, not on
> the center of my zoom-box. Also, I don't know how to enforce the region
> shape as I wish.

When you zoom in by drawing a box, you are in effect saying 'Make this box
the new window on the world'. When you zoom out with a box, you are saying,
'Put the visible world into this box'.

When you say enforcing region shape, I assume you mean that you want the
display to extend to certain bounds in the N-S and E-W directions--probably
for some kind of output.

Zooming in with a box lets you control interactively where the display
bounds will be (though you may get some white space if the window geometry
doesn't match the region geometry).

Zooming out can never let you control the display bounds interactively, at
least not directly in the way that a zoom-in box does. The reason is that
the new bounds are off the screen when you begin to zoom out. QGIS doesn't
let you do this either. It controls where the map centers, but not where the
edges will be. 

In any program like this that I know of, the best way to reset more
extensive bounds with some precision is to zoom out to a region that
includes what you want to see. Then use a zoom-in box to interactively set
the display bounds.

In GRASS, if you want to zoom out while preserving a height/width ratio and
center you've already set, you can just use the zoom-out one click.

> 
> It took me 3 days to understand how box-zoom-out in gis.m works. Only
> thanks to your long emails and patience. I admit my attitude was biased
> by what I expected, but I believe other Grass users might be biased the
> same way and get puzzled or frustrated as I did.

Various times over the past 9 months, I've been tempted to just drop the
zoom-out box altogether. The one-click zoom-out is all that most programs
provide. The zoom out box provides an additional tool for a kind of region
management that is not found in most other programs. Many times you won't
need it in GRASS either. But I've kept it in because, in the GRASS
tradition, it adds additional sophisticated flexibility not available
elsewhere. Also in the GRASS tradition, it adds a layer of complexity that
can leave people puzzled, frustrated, or both. ;-)


>I believe the "normal"
> way (eg. QGIS and UDIG) of box-zoom-out is as good as your current
> approach in terms of browsing maps, but, which is even more important
> for Grass GIS in the *restricted* zoom mode, the "normal" way lets the
> user control the region shape and extent precisely.

The QGIS zoom-out box does not allow the user to control the region shape
and extent at all, let alone precisely. This is indeed the more common way
these tools function. GRASS actually does allow the user to control the
shape and and extents much more precisely, but in a way that might require
several days of meditation or head banging to understand.  In both the QGIS
and GRASS cases, the effects of using a zoom-out tool is different from
using a zoom-in tool.

> 
> Would you be willing to implement it the way I mean?

AFAICT, this is already implemented as the one-click zoom-out...except for
recentering. It is possible to reimplement recenter with one-click zoom-out,
but you lose the ability to 'back out' of a precisely defined region and
center. Currently, you can 'back out' and then use the pan tool to recenter.

The zoom box provides an alternative way to zoom out, in addition to the
"normal" way, that is not available with many other programs.

Thoughts?

Michael





More information about the grass-dev mailing list