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

Micheal,

With your today commited fixes for gis.m the single-click zoom-OUT bug
seems gone, which is cooler than ice-cold.

But, a new beast cropped out in regard to single-click zoom-IN for a
change.

Based on spearfish60.

1
add "slope" raster, 'Zoom to selected map'

2
zoom-in by selecting a region with mouse - make the region higher than
wider

3
zoom-in by single-clicking - whole canvas is filled - the aspect ratio
is not preserved when zooming! single-click zoom-OUT *does* preserve
aspect ratio...

Another bug is that zoom-out by selecting a region with mouse leads to
unexpected results, like if only the Y coord was handled correctly.
Reminds of the now-fixed single-click zoom-out bug. Proceed the same
way I described that, to spot this one too.

Good luck in fixing these.

Best,
Maciek

On to better bugs...

Maciek. See below. I'll need some additional info. Thanks

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@o2.pl>
Date: Mon, 18 Sep 2006 22:40:27 +0200
To: Michael Barton <michael.barton@asu.edu>
Cc: grass-dev <grass-dev@grass.itc.it>
Subject: gis.m zooming: 2 new bugs

Micheal,

With your today commited fixes for gis.m the single-click zoom-OUT bug
seems gone, which is cooler than ice-cold.

But, a new beast cropped out in regard to single-click zoom-IN for a
change.

Based on spearfish60.

1
add "slope" raster, 'Zoom to selected map'

2
zoom-in by selecting a region with mouse - make the region higher than
wider

3
zoom-in by single-clicking - whole canvas is filled - the aspect ratio
is not preserved when zooming! single-click zoom-OUT *does* preserve
aspect ratio...

Zooming in simply zooms in from the current display geometry by a set
amount. It essentially creates an invisible zoom box. So it won't preserve a
specific aspect ratio. If you want to also affect the aspect ratio, you need
to either draw a zoom box or use g.region. This could be changed, but from
your description, it seems to be behaving as it is supposed to. Or did I
misunderstand your description?

Another bug is that zoom-out by selecting a region with mouse leads to
unexpected results, like if only the Y coord was handled correctly.
Reminds of the now-fixed single-click zoom-out bug. Proceed the same
way I described that, to spot this one too.

This is bizarre. I specifically tested that in detail last night. Try the
test I used and see if it behaves incorrectly or not and let me know.

I opened the Spearfish elevation map and zoom to match the map in the
display. I draw a zoom-out box in the upper left corner of the display. The
map shrinks so that all of it fits inside this box. This puts the map at the
upper left of the display. Do the same thing with the other corners or in
the middle of the map, and the map should shrink to fit within the box
drawn.

Michael

Good luck in fixing these.

Best,
Maciek

Michael Barton wrote:

On to better bugs...

Based on spearfish60.

1
add "slope" raster, 'Zoom to selected map'

2
zoom-in by selecting a region with mouse - make the region higher than
wider

3
zoom-in by single-clicking - whole canvas is filled - the aspect ratio
is not preserved when zooming! single-click zoom-OUT *does* preserve
aspect ratio...

Zooming in simply zooms in from the current display geometry by a set
amount. It essentially creates an invisible zoom box. So it won't preserve a
specific aspect ratio. If you want to also affect the aspect ratio, you need
to either draw a zoom box or use g.region. This could be changed, but from
your description, it seems to be behaving as it is supposed to. Or did I
misunderstand your description?

I'm not sure if I understand you as well. Please watch this swf

http://kufaya.googlepages.com/single-click_zoom-in_bug.html

and say if what happens there is what should? I find it strange that
after a single click zoom-in (which tales place at the end of my
screencast) the *whole* map canvas is used for display, while it was
only a *half* of it before the zoom-in. It looks like the single-click
zoom-in in constrained display mode behaves the same way as if I used
the unconstrained mode. IMO this shouldn't happen.

Another bug is that zoom-out by selecting a region with mouse leads to
unexpected results, like if only the Y coord was handled correctly.
Reminds of the now-fixed single-click zoom-out bug. Proceed the same
way I described that, to spot this one too.

A note: actually, neither axis is handled properly. It depends. 2
screencats linked below show it.

This is bizarre. I specifically tested that in detail last night. Try the
test I used and see if it behaves incorrectly or not and let me know.

I opened the Spearfish elevation map and zoom to match the map in the
display. I draw a zoom-out box in the upper left corner of the display. The
map shrinks so that all of it fits inside this box. This puts the map at the
upper left of the display. Do the same thing with the other corners or in
the middle of the map, and the map should shrink to fit within the box
drawn.

I can reproduce your test and indeed it's all perfect. But, watch
another 2 swfs of mine to see under what circumstances it fails:

http://kufaya.googlepages.com/area_zoom-out_bug_horizontal.html
http://kufaya.googlepages.com/area_zoom-out_bug_vertical.html

This looks wrong to me. What do you think?

Maciek

Maciej Sieczka wrote:

I can reproduce your test and indeed it's all perfect. But, watch
another 2 swfs of mine to see under what circumstances it fails:

http://kufaya.googlepages.com/area_zoom-out_bug_horizontal.html
http://kufaya.googlepages.com/area_zoom-out_bug_vertical.html

This looks wrong to me. What do you think?

Well, this is not really using the zoom-out box the way it should be: in zoom-out mode, you draw a box to show at which size you would like the currently displayed portion to be after zooming. So if you draw a box which is larger then the currently displayed portion, you actually are zooming in...

So, in my eyes this is not really a bug, but maybe there could be a check and a warning: "WARNING: your zoom-out box cannot be larger than the currently displayed region" or something like this.

Moritz

Moritz is correct. AFAICT from the animation (which is quite helpful, by the
way), the zoom out box is working exactly as it should. The region is
"shrinking" to fit in the box. Given the zooming situation, the result looks
weird.

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: Moritz Lennert <mlennert@club.worldonline.be>
Date: Tue, 19 Sep 2006 17:15:24 +0200
To: Maciej Sieczka <tutey@o2.pl>
Cc: Michael Barton <michael.barton@asu.edu>, grass-dev
<grass-dev@grass.itc.it>
Subject: Re: [GRASS-dev] Re: gis.m zooming: 2 new bugs

Maciej Sieczka wrote:

I can reproduce your test and indeed it's all perfect. But, watch
another 2 swfs of mine to see under what circumstances it fails:

http://kufaya.googlepages.com/area_zoom-out_bug_horizontal.html
http://kufaya.googlepages.com/area_zoom-out_bug_vertical.html

This looks wrong to me. What do you think?

Well, this is not really using the zoom-out box the way it should be: in
zoom-out mode, you draw a box to show at which size you would like the
currently displayed portion to be after zooming. So if you draw a box
which is larger then the currently displayed portion, you actually are
zooming in...

So, in my eyes this is not really a bug, but maybe there could be a
check and a warning: "WARNING: your zoom-out box cannot be larger than
the currently displayed region" or something like this.

Moritz

Moritz wrote:

Well, this is not really using the zoom-out box the way it should be: in
zoom-out mode, you draw a box to show at which size you would like the
currently displayed portion to be after zooming. So if you draw a box
which is larger then the currently displayed portion, you actually are
zooming in...

So, in my eyes this is not really a bug, but maybe there could be a
check and a warning: "WARNING: your zoom-out box cannot be larger than
the currently displayed region" or something like this.

Michael wrote:

Moritz is correct. AFAICT from the animation (which is quite helpful, by the
way), the zoom out box is working exactly as it should. The region is
"shrinking" to fit in the box.

I absolutely don't agree. Re-do the situation but use area zoom-IN
instead of zoom-OUT. In spite that you select an area *outside* your
initial display extent, the result looks OK - the extent is changed as
well as the zoom level.

With either zoom-out or zoom-in, if I include an area outside of my
current display extent within the zooming rectangle, the resulting
region should include this area too. Currently zoom-in does it, while
zoom-out does not. The difference makes tools bahave inconsistently.
Zoom-in works OK while the zoom-out behavior is counter-intuitive and
should be regarded as an usability bug.

Given the zooming situation, the result looks weird.

Because the tool works weird. If it worked OK, the result would look OK.

Maciek

Maciej Sieczka wrote:

Moritz wrote:

Well, this is not really using the zoom-out box the way it should be: in
zoom-out mode, you draw a box to show at which size you would like the
currently displayed portion to be after zooming. So if you draw a box
which is larger then the currently displayed portion, you actually are
zooming in...

So, in my eyes this is not really a bug, but maybe there could be a
check and a warning: "WARNING: your zoom-out box cannot be larger than
the currently displayed region" or something like this.

Michael wrote:

Moritz is correct. AFAICT from the animation (which is quite helpful, by the
way), the zoom out box is working exactly as it should. The region is
"shrinking" to fit in the box.

I absolutely don't agree. Re-do the situation but use area zoom-IN
instead of zoom-OUT. In spite that you select an area *outside* your
initial display extent, the result looks OK - the extent is changed as
well as the zoom level.

With either zoom-out or zoom-in, if I include an area outside of my
current display extent within the zooming rectangle, the resulting
region should include this area too. Currently zoom-in does it, while
zoom-out does not. The difference makes tools bahave inconsistently.
Zoom-in works OK while the zoom-out behavior is counter-intuitive and
should be regarded as an usability bug.

I agree that the two tools work inconsistently. Which of these is the "correct" way, I don't know:

- zoom-in takes the region that you select and displays the content of this region in the entire map display window (minus whatever cannot be displayed in constrain mode). When it does this it takes the information which was "hidden" by the empty space created by constrain mode and displays it as well.

- zoom-out takes the region you select with your box, including the empty space, and displays the content of the display window in this smaller box. When it does this, it does not take the information which was "hidden" by the empty space, but just keeps on displaying the empty space. According to you, Maciej, it should display the information, and not the empty space. This probably is a bit more what users would expect.

Moritz

Michael Barton wrote:

I hope this helps explain what is going on better. What do you think?

I think that box-zoom-in and box-zoom-out should behave the same. They
don't - which is a bug in terms of usability. Since box-zoom-in does
update the region extent properly, taking into account the whole area
within the zoom box, the box-zoom-out should do that too.

As to single-click-zoom-in it should behave the same as
single-click-zoom-out, which you have fixed recently. Ie. it should
only modify the zoom level and not modify the X,Y proportions at all,
which is unfortuantely happening now.

The single-click-zoom-in and -out should also center-pan to cursor
location - simply because the cursor is involved. And since it is, I,
user, expect it to be significant where I click on the map canvas. If
we want a zoom tool that doesn't pan-center, it shouldn't involve cursor.

Maciek

My original (lengthy) explanation was stopped from being posted to the list
for some reason, so I'm attaching it below for reference. Comments in
response to your reply are below.

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: Maciej Sieczka <tutey@o2.pl>
Date: Wed, 20 Sep 2006 11:20:17 +0200
To: Michael Barton <c.michael.barton@gmail.com>
Cc: Moritz Lennert <mlennert@club.worldonline.be>, grass-dev
<grass-dev@grass.itc.it>
Subject: Re: [GRASS-dev] Re: gis.m zooming: 2 new bugs

Michael Barton wrote:

I hope this helps explain what is going on better. What do you think?

I think that box-zoom-in and box-zoom-out should behave the same. They
don't - which is a bug in terms of usability. Since box-zoom-in does
update the region extent properly, taking into account the whole area
within the zoom box, the box-zoom-out should do that too.

The box zoom-in and zoom-out CANNOT operate the same mathematically, as I
tried to explain below. It is impossible. Given that, the question is what
kind of result do you want to see. Currently, both update the region in both
dimensions exactly as defined by the zoom box. You suggest that it gives
visually undesirable results. Updating the region "properly" is meaningless
(sorry). This depends on what is meant by "properly". I'm not splitting
hairs. The question is what kind of view/display result is desired when a
display tool is used. For any desired result some are possible and others
are not.

The possibility that I *think* you'd prefer is described below also. I kind
of like this better too. It makes the tools behave even more differently
mathematically (and "incorrectly" from the perspective of treating one kind
of zoom box as a user error and ignoring it), but produces a visual output
that is probably more desirable.

As to single-click-zoom-in it should behave the same as
single-click-zoom-out, which you have fixed recently. Ie. it should
only modify the zoom level and not modify the X,Y proportions at all,
which is unfortuantely happening now.

The single-click-zoom-in and -out should also center-pan to cursor
location - simply because the cursor is involved. And since it is, I,
user, expect it to be significant where I click on the map canvas. If
we want a zoom tool that doesn't pan-center, it shouldn't involve cursor.

A similar issue is here. We can have a one-click zoom in preserve display
region geometry and zoom to the center of the current region, regardless of
where you click (i.e., decrease all region extents by the same proportion)
OR we can have it zoom in to the spot where you click (the way it works now,
and the way this tool works in other programs), disregarding the display
region geometry. Neither one or the other is the "proper" way to zoom. Both
have advantages and disadvantages. The question is which is most desirable.

Maciek

Maciej,

I've relooked at the code, math, and concepts behind the one-click and
box-defined zooming and they are behaving in a completely consistent,
logical, and proper way. This doesn't necessarily mean that they are
behaving in the way that you expect, of course. After reading the
explanation below of what is happening with the zooming, I'd like to hear
how you might expect zooming to behave. This might or might not be
realistically doable and might or might not be what others expect. But it
would be good to know in any case.

First, keep in mind that the way that GRASS works, the display acts as a
fixed-size window on the region. Zooming varies the region, not the window.
Every time the map is displayed, we calculate the number of pixels needed
(height and width) to create graphic PPM image of the size to exactly fit
into the display window so that all of it is visible in normal mode. In
'explore mode' the region is reset so that the extents are proportional to
the display window geometry and the resolution equals the number of pixels
needed to make a graphic file that exactly and completely fills the display.

1) When you draw a zoom in box, we calculate the n,s,e,w extents of the box
in geographic coordinates. Then the display region is reset to match those
extents. Finally the calculations are are done as above to create the
graphic file to display in the window.

2) When you do a one-click zoom in, there is no box drawn. A virtual box is
drawn, 1/(square root of 2) * the current screen height and width. The box
is centered on the place where you click, allowing you to zoom in to a
particular spot. The region extents are set to match this box, as described
above. There is no apriori way to know what kind of zoom box a user might
actually want but this is a reasonable way, given that no zoom box is drawn,
although it is not the only way to calculate this zoom box. Zooming could
also be done to simply set the new extents this same fraction of the
previous extents. Essentially, this zooms into the center of the current
region, regardless of where you click. One-click zoom out works this way in
reverse. However, this does not let you zoom in to a particular spot. It
seems to me that zooming in to the spot where you click is probably more
useful than zooming to the center of a region that maintains a constant
proportion. Keep in mind, too, that what you see is not what you get in
terms of the computational region--which does not change on zooming
anymore--it's just what you see.

3) When you draw a zoom out box, the calculations are quite a bit different.
With a zoom in box, the box defines the new display region extents, and the
region then just displayed so that it fills the window. For a zoom out box,
the box does NOT define the new extents. Rather, it is necessary to
calculate new extents that are sufficiently large that the currently
displayed region will fit into the box. This is done first by calculating
the geographic e-w and n-s dimensions of the zoom out box. Then the ratio of
the zoom out box extents to the current region extents are calculated for
the 2 dimensions. Finally, the region is expanded in each of the 4
directions by the distance between the current extent and corresponding zoom
out box extent multiplied by the ratio between the zoom box and region
dimension. This sounds (and is) a bit complicated, so here is an example.

current region E extent = 200
zoom out box E extent = 100
ratio of zoom out box E-W dimension:region E-W dimension = 2.0
The new region E extent = 200 + (2.0 * (200-100)) = 400

This makes the original region fit inside the zoom out box. In your example,
however, you drew a zoom out box that was smaller than the current region in
the N-S dimension and larger than the current region in the E-W dimension.
So what happened? It did exactly as described above. Because the E-W
dimensions of the zoom out box were larger than region extents, it did not
increase the region much in the E-W dimension. Compare the example below
with the example above.

current region E extent = 100
zoom out box E extent = 200
ratio of zoom out box E-W dimension:region E-W dimension = 0.5
The new region E extent = 200 + (0.5 * (100-200)) = 150

However, it DID increase the N-S region by a much larger amount. This makes
a region with a height to width ratio even greater than before. That is,
you've drawn a box that increases the N-S extents by a lot more than the E-W
extents. (You can only do that if you make a tall, narrow region to begin
with and then draw a zoom out box that is shorter than the N-S region but
wider than the E-W region.) Then, in order to make the new, taller, thinner
region visible in the display, we must calculate a graphic with the proper
pixel height/width ratio. So the result is a taller (possibly with white
space if the raster information does not extend to the new region extents),
thinner map being displayed.

So the question is, how should a zoom out box that is smaller than the
current region in one dimension but larger than the current region in
another dimension behave? In one sense, such a box isn't even meaningful.
The more important question is, what is a user potentially trying to
achieve when drawing such a zoom out box given that zoom in GRASS is done by
resetting the region extents, not by changing the view window? One
possibility is treat this as a user error and only allow zooming out in a
dimension if the box is smaller than the current region in that dimension.
Although this means that one or both dimensions of a user zoom box will be
ignored, I'd recommend this if we want to change the zoom out behavior. It
gives results that can appear to make more sense visually, although they are
incorrect mathematically.

4) Finally, we get to one-click zoom out. This simply increases the current
region extents by a set amount (the square root of 2). Unlike zooming out,
it does not recenter the new region on the mouse click. Unlike zooming in,
where you are seeing smaller and smaller space in the display window, you
will always see the locale where you clicked when you zoom out because the
window will show a larger geographic extent. Recentering with zoom out can
also produce results that appear visual strange, although they are
mathematically correct.

I hope this helps explain what is going on better. What do you think?

Michael

On Sep 19, 2006, at 9:03 AM, Maciej Sieczka wrote:

Moritz wrote:

>> Well, this is not really using the zoom-out box the way it should be: in
>> zoom-out mode, you draw a box to show at which size you would like the
>> currently displayed portion to be after zooming. So if you draw a box
>> which is larger then the currently displayed portion, you actually are
>> zooming in...
>>
>> So, in my eyes this is not really a bug, but maybe there could be a
>> check and a warning: "WARNING: your zoom-out box cannot be larger than
>> the currently displayed region" or something like this.

Michael wrote:

> Moritz is correct. AFAICT from the animation (which is quite helpful, by
the
> way), the zoom out box is working exactly as it should. The region is
> "shrinking" to fit in the box.

I absolutely don't agree. Re-do the situation but use area zoom-IN
instead of zoom-OUT. In spite that you select an area *outside* your
initial display extent, the result looks OK - the extent is changed as
well as the zoom level.

With either zoom-out or zoom-in, if I include an area outside of my
current display extent within the zooming rectangle, the resulting
region should include this area too. Currently zoom-in does it, while
zoom-out does not. The difference makes tools bahave inconsistently.
Zoom-in works OK while the zoom-out behavior is counter-intuitive and
should be regarded as an usability bug.

> Given the zooming situation, the result looks weird.

Because the tool works weird. If it worked OK, the result would look OK.

Maciek

____________________

C. Michael Barton, Professor of Anthropology

School of Human Evolution and Social Change

PO Box 872402

Arizona State University

Tempe, AZ 85287-2402

USA

Phone: 480-965-6262

Fax: 480-965-7671

www: <www.public.asu.edu/~cmbarton <http://www.public.asu.edu/~cmbarton&gt; >

Michael Barton wrote:

My original (lengthy) explanation was stopped from being posted to the list
for some reason, so I'm attaching it below for reference. Comments in
response to your reply are below.

Thanks for putting it together.

Michael Barton wrote:

I hope this helps explain what is going on better. What do you think?

Maciej Sieczka wrote:

I think that box-zoom-in and box-zoom-out should behave the same. They
don't - which is a bug in terms of usability. Since box-zoom-in does
update the region extent properly, taking into account the whole area
within the zoom box, the box-zoom-out should do that too.

The box zoom-in and zoom-out CANNOT operate the same mathematically, as I
tried to explain below. It is impossible. Given that, the question is what
kind of result do you want to see. Currently, both update the region in both
dimensions exactly as defined by the zoom box.

That's not true. Box-zoom-in indeed always updates the region geometry
exactly following the zoom box (OK), but the box-zoom-out fails to do
that *if* the zoom box overlaps the part of map canvas where nothing is
rendered (BAD).

You suggest that it gives visually undesirable results. Updating the region
"properly" is meaningless> (sorry). This depends on what is meant by
"properly".

"properly" means that the box-zoom update the region geometry according
to the geometry of the zoom box. Currently this is only the case for
box-zoom-in - no matter if the zoom box overlaps the part of map canvas
where nothing is rendered or not. In case of box-zoom-out however, if
the zoom box overlaps the part of map canvas where nothing is rendered,
the resulting region geometry fails to reflect the geomtery of the zoom
box, which is "wrong".

I'm not splitting hairs. The question is what kind of view/display
result is desired when a display tool is used. For any desired result
some are possible and others are not.

There is a bad feature/bug/inconstency - you name it, but you keep
denying it for a reason I don't understand.

The possibility that I *think* you'd prefer is described below also. I kind
of like this better too. It makes the tools behave even more differently
mathematically (and "incorrectly" from the perspective of treating one kind
of zoom box as a user error and ignoring it),

What user error?

The box-zoom-in handles geometry according to the zoom box, while the
zoom-out fails to do it if the zoom box overlaps the part of map canvas
where nothing is rendered.

Do you maybe mean the "user error" is to draw zoom box so that it
overlaps part of map canvas where nothing is rendered? Why would it be
an error? I want to have a region of a given geometry and extent, so I
draw the zoom box accordingly, overlapping an empty part of the map
canvas, and the box-zoom-in handles it OK but the box-zoom-out doesn't.
What user error?

but produces a visual output that is probably more desirable.

It's not only about a "visual output". It's mainly about setting the
region geometry and extent the way the user draws the zoom box. Failing
to do it is a bug.

As to single-click-zoom-in it should behave the same as
single-click-zoom-out, which you have fixed recently. Ie. it should
only modify the zoom level and not modify the X,Y proportions at all,
which is unfortuantely happening now.

The single-click-zoom-in and -out should also center-pan to cursor
location - simply because the cursor is involved. And since it is, I,
user, expect it to be significant where I click on the map canvas. If
we want a zoom tool that doesn't pan-center, it shouldn't involve cursor.

A similar issue is here. We can have a one-click zoom in preserve display
region geometry and zoom to the center of the current region, regardless of
where you click (i.e., decrease all region extents by the same proportion)
OR we can have it zoom in to the spot where you click (the way it works now,
and the way this tool works in other programs), disregarding the display
region geometry.

You mustn't disregard the region geometry in the 'Constrain window to
map geometry mode'!. Absurd. There is the 'Map fills display window'
aka "uncostrained" mode for that!

Neither one or the other is the "proper" way to zoom. Both have advantages
and disadvantages. The question is which is most desirable.

No, the point is that it is not a matter of preference but a matter of
doing properly in the very deed of it.

Maciek

From: Maciej Sieczka <tutey@o2.pl>
Date: Wed, 20 Sep 2006 18:24:58 +0200
To: Michael Barton <michael.barton@asu.edu>
Cc: Michael Barton <c.michael.barton@gmail.com>, grass-dev
<grass-dev@grass.itc.it>, Moritz Lennert <mlennert@club.worldonline.be>
Subject: Re: [GRASS-dev] Re: gis.m zooming: 2 new bugs

The box zoom-in and zoom-out CANNOT operate the same mathematically, as I
tried to explain below. It is impossible. Given that, the question is what
kind of result do you want to see. Currently, both update the region in both
dimensions exactly as defined by the zoom box.

That's not true. Box-zoom-in indeed always updates the region geometry
exactly following the zoom box (OK), but the box-zoom-out fails to do
that *if* the zoom box overlaps the part of map canvas where nothing is
rendered (BAD).

Zooming in decreases the region extents while zooming out increases the
extents.

You are not following the math. A zoom in box uses the geographic
coordinates of the box extents to directly set the new region extents. This
is IMPOSSIBLE to do with a zoom out box. Rather the box defines a region,
and new larger extents must be calculated such that the original extents fit
inside the region defined by the zoom out box. To zoom out, you must make
the region bigger than what you can see. You cannot draw a box on the screen
that is bigger than the screen (or at least I don't think that anyone would
want to do this). So the box cannot directly define the extents.

You suggest that it gives visually undesirable results. Updating the region
"properly" is meaningless> (sorry). This depends on what is meant by
"properly".

"properly" means that the box-zoom update the region geometry according
to the geometry of the zoom box. Currently this is only the case for
box-zoom-in - no matter if the zoom box overlaps the part of map canvas
where nothing is rendered or not. In case of box-zoom-out however, if
the zoom box overlaps the part of map canvas where nothing is rendered,
the resulting region geometry fails to reflect the geomtery of the zoom
box, which is "wrong".

Currently the new region defined by a zoom out box DOES reflect the geometry
of the zoom box. This is why it looks weird to you. You are giving it weird
geometry. You are essentially telling it to increase the region extents so
that the current region gets smaller. It almost sounds like you are saying
that if you try to zoom "out" to an area smaller than your box the result
should be to zoom "in", that is a tool designed to INCREASE region extents
should REDUCE the region extents in these circumstances. This seems like a
completely unexpected behavior of a tool that is supposed to INCREASE the
region extents.

It would help to know if you are actually trying to achieve some kind of
meaningful result and what that is, or if you are just trying out tools in
various circumstances.

I'm have set the zoom out box tool to treat the case of a zoom out box
larger than the current region as undefined, so that it does not change the
display region in that dimension (it won't produce an error). This will
probably give you the visual effects you are looking for, but I'm not sure.

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

Michael Barton wrote:

Michael Barton wrote:

The box zoom-in and zoom-out CANNOT operate the same mathematically, as I
tried to explain below. It is impossible. Given that, the question is what
kind of result do you want to see. Currently, both update the region in both
dimensions exactly as defined by the zoom box.

Maciej Sieczka wrote:

That's not true. Box-zoom-in indeed always updates the region geometry
exactly following the zoom box (OK), but the box-zoom-out fails to do
that *if* the zoom box overlaps the part of map canvas where nothing is
rendered (BAD).

Michael Barton wrote:

Zooming in decreases the region extents while zooming out increases the
extents.

You are not following the math.

Well, that's not very kind of you, and beyond the meritum first of all.

A zoom in box uses the geographic
coordinates of the box extents to directly set the new region extents. This
is IMPOSSIBLE to do with a zoom out box. Rather the box defines a region,
and new larger extents must be calculated such that the original extents fit
inside the region defined by the zoom out box. To zoom out, you must make
the region bigger than what you can see. You cannot draw a box on the screen
that is bigger than the screen (or at least I don't think that anyone would
want to do this). So the box cannot directly define the extents.

I realize that the zoom box doesn't define the extents directly. But it
does define the geometry directly. So if the geometry is set wrong, the
resulting region extent is wrong too. And currently the box-zoom-out
sets the region geometry wrong (ie. different than the zoom box that is
drawn by the user) if the box zoom includes a part of an empty map
canvas. *This* should be fixed.

You suggest that it gives visually undesirable results. Updating the region
"properly" is meaningless> (sorry). This depends on what is meant by
"properly".

"properly" means that the box-zoom update the region geometry according
to the geometry of the zoom box. Currently this is only the case for
box-zoom-in - no matter if the zoom box overlaps the part of map canvas
where nothing is rendered or not. In case of box-zoom-out however, if
the zoom box overlaps the part of map canvas where nothing is rendered,
the resulting region geometry fails to reflect the geomtery of the zoom
box, which is "wrong".

Currently the new region defined by a zoom out box DOES reflect the geometry
of the zoom box. This is why it looks weird to you. You are giving it weird
geometry.

What weird geometry?

You are essentially telling it to increase the region extents
so that the current region gets smaller.
It almost sounds like you are saying
that if you try to zoom "out" to an area smaller than your box the result
should be to zoom "in", that is a tool designed to INCREASE region extents
should REDUCE the region extents in these circumstances. This seems like a
completely unexpected behavior of a tool that is supposed to INCREASE the
region extents.

That's not what I mean. I mean that the geometry must be preserved
exactly the way I set it by drawing the zoom box. Currently in gis.m,
using box-zoom-out, this geometry is preserved OK only when I don't
include a part of an empty map canvas in my zoom box. But if I do that,
the part of my zoom box that overlaps this empty canvas is not taken
into account, so the geometry is set wrong (ie. not the way I drew the
zoom box), thus the resulting region extent is also wrong.

Is it impossible to fix that?

It would help to know if you are actually trying to achieve some kind of
meaningful result and what that is, or if you are just trying out tools in
various circumstances.

No, I'm not teasing you for fun.

I'm have set the zoom out box tool to treat the case of a zoom out box
larger than the current region as undefined, so that it does not change the
display region in that dimension (it won't produce an error). This will
probably give you the visual effects you are looking for, but I'm not sure.

IMO the patch should be reverted. It doesn't fix the problem. The issue
is that geometry is not handled properly if the zoom box overlaps an
empty map canvas when box-zooming-out, which, as result, leads to a
bogus region.

As such situation (zooming over an empty map canvas) is handled OK in
the box-zoom-in, I suppose it could also be fixed for box-zoom-out.

If I still haven't made myself clear in this email, please ask me on.

Maciek

Maciej,

This is getting close to finding out what it is you are wanting to see. See
below for additional questions.

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@o2.pl>
Date: Wed, 20 Sep 2006 20:57:46 +0200
To: Michael Barton <michael.barton@asu.edu>
Cc: Michael Barton <c.michael.barton@gmail.com>, grass-dev
<grass-dev@grass.itc.it>, Moritz Lennert <mlennert@club.worldonline.be>
Subject: Re: [GRASS-dev] Re: gis.m zooming: 2 new bugs

That's not what I mean. I mean that the geometry must be preserved
exactly the way I set it by drawing the zoom box.

So in the example you gave what is it that you think ought to be displayed.
I'm not trying to be a problem, but this is unclear.

You first used a zoom in box to set a region geometry that was tall (N-S)
and narrow (E-W). So far so good.

Then you draw a zoom out box that is smaller in the N-S dimension than the
current region and larger in the E-W dimension than the current region. The
algorithm increases the N-S region extents so that the parts of a map at the
previous north and south edges now fit into the box that you drew on the
screen.

What is it you think should happen with the E-W given the box you've drawn?

Currently in gis.m,
using box-zoom-out, this geometry is preserved OK only when I don't
include a part of an empty map canvas in my zoom box. But if I do that,
the part of my zoom box that overlaps this empty canvas is not taken
into account, so the geometry is set wrong (ie. not the way I drew the
zoom box), thus the resulting region extent is also wrong.

Is it impossible to fix that?

It would help to know if you are actually trying to achieve some kind of
meaningful result and what that is, or if you are just trying out tools in
various circumstances.

No, I'm not teasing you for fun.

I'm have set the zoom out box tool to treat the case of a zoom out box
larger than the current region as undefined, so that it does not change the
display region in that dimension (it won't produce an error). This will
probably give you the visual effects you are looking for, but I'm not sure.

IMO the patch should be reverted. It doesn't fix the problem. The issue
is that geometry is not handled properly if the zoom box overlaps an
empty map canvas when box-zooming-out, which, as result, leads to a
bogus region.

It's not a matter of whether the area is empty (i.e., there is no map data
there), it's where the edge of the region is located.

As such situation (zooming over an empty map canvas) is handled OK in
the box-zoom-in, I suppose it could also be fixed for box-zoom-out.

If I still haven't made myself clear in this email, please ask me on.

Even though zooming in and out with a box drawn on the screen appear to be
very much the same, they are not mirror images of each other. The underlying
algorithms to change the region are very different.

Try the change to mapcanvas.tcl and see what you think.

Maciek

Michael Barton wrote:

This is getting close to finding out what it is you are wanting to see.

Michael,

It's not about me "wanting to see", but about fixing an issue that
hampers gis.m. I wouldn't bother messing with nice folks just to
enforce some silly feature everybody could live without.

That's not what I mean. I mean that the geometry must be preserved
exactly the way I set it by drawing the zoom box.

So in the example you gave what is it that you think ought to be displayed.
I'm not trying to be a problem, but this is unclear.

You first used a zoom in box to set a region geometry that was tall (N-S)
and narrow (E-W). So far so good.

Then you draw a zoom out box that is smaller in the N-S dimension than the
current region and larger in the E-W dimension than the current region.

Correct.

The algorithm increases the N-S region extents so that the parts of a

map at the

previous north and south edges now fit into the box that you drew on the
screen.

What is it you think should happen with the E-W given the box you've drawn?

It should be extended accordingly, like N-S is, including the invisible
part od the display (beyond the region, to the E). So that the
resulting region reflected the proportions of the zoom box.

Currently in gis.m,
using box-zoom-out, this geometry is preserved OK only when I don't
include a part of an empty map canvas in my zoom box. But if I do that,
the part of my zoom box that overlaps this empty canvas is not taken
into account, so the geometry is set wrong (ie. not the way I drew the
zoom box), thus the resulting region extent is also wrong.

Is it impossible to fix that?

It would help to know if you are actually trying to achieve some kind of
meaningful result and what that is, or if you are just trying out tools in
various circumstances.

No, I'm not teasing you for fun.

I'm have set the zoom out box tool to treat the case of a zoom out box
larger than the current region as undefined, so that it does not change the
display region in that dimension (it won't produce an error). This will
probably give you the visual effects you are looking for, but I'm not sure.

IMO the patch should be reverted. It doesn't fix the problem. The issue
is that geometry is not handled properly if the zoom box overlaps an
empty map canvas when box-zooming-out, which, as result, leads to a
bogus region.

It's not a matter of whether the area is empty (i.e., there is no map data
there), it's where the edge of the region is located.

Correct. I mean the greyish, "empty" part of the display canvas. The
map data are there under the greyish part, but they are not displayed
due to the region extent.

As such situation (zooming over an empty map canvas) is handled OK in
the box-zoom-in, I suppose it could also be fixed for box-zoom-out.

If I still haven't made myself clear in this email, please ask me on.

Even though zooming in and out with a box drawn on the screen appear to be
very much the same, they are not mirror images of each other. The underlying
algorithms to change the region are very different.

Try the change to mapcanvas.tcl and see what you think.

I tried it and told you what I thought in my previous email. Have you
read that?

Maciek

This is getting close to finding out what it is you are wanting to see.

Michael,

It's not about me "wanting to see", but about fixing an issue that
hampers gis.m. I wouldn't bother messing with nice folks just to
enforce some silly feature everybody could live without.

It is often more helpful to find out how you think the interface "should"
behave than what you think is "wrong"--especially in this case where it is
necessary to write some (for me at least) conceptually complicated equations
to make zooming happen in different ways and under different conditions.

That's not what I mean. I mean that the geometry must be preserved
exactly the way I set it by drawing the zoom box.

So in the example you gave what is it that you think ought to be displayed.
I'm not trying to be a problem, but this is unclear.

You first used a zoom in box to set a region geometry that was tall (N-S)
and narrow (E-W). So far so good.

Then you draw a zoom out box that is smaller in the N-S dimension than the
current region and larger in the E-W dimension than the current region.

Correct.

The algorithm increases the N-S region extents so that the parts of a

map at the

previous north and south edges now fit into the box that you drew on the
screen.

What is it you think should happen with the E-W given the box you've drawn?

It should be extended accordingly, like N-S is, including the invisible
part od the display (beyond the region, to the E). So that the
resulting region reflected the proportions of the zoom box.

So you agree that the N-S region extent should be increased (well beyond the
box) so that the old region edges fit into the box.

In the E-W direction, you'd want the new region extents to match the box's
geographic extent rather than behave like the changes to the N-S extents.
This would only apply, however, only if the box is larger than the region
extents in a given dimension? in a given direction?

...snip snip...

Try the change to mapcanvas.tcl and see what you think.

I tried it and told you what I thought in my previous email. Have you
read that?

It was not clear that you had looked at it yet.

Maciek

Keep in mind that with any other program we wouldn't even be having this
discussion. It's a function of the complex, sophisticated, and insanely
frustrating way that GRASS manages its region of interest.

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

Maciej Sieczka wrote:

It's not about me "wanting to see", but about fixing an issue that
hampers gis.m. I wouldn't bother messing with nice folks just to
enforce some silly feature everybody could live without.

Michael Barton wrote:

It is often more helpful to find out how you think the interface "should"
behave than what you think is "wrong"--especially in this case where it is
necessary to write some (for me at least) conceptually complicated equations
to make zooming happen in different ways and under different conditions.

But I did: I said what's wrong and what it should look like. I'm sorry
you didn't understand.

Michael Barton wrote:

You first used a zoom in box to set a region geometry that was tall (N-S)
and narrow (E-W). So far so good.

Then you draw a zoom out box that is smaller in the N-S dimension than the
current region and larger in the E-W dimension than the current region.

Correct.

The algorithm increases the N-S region extents so that the parts of a
map at the previous north and south edges now fit into the box that you
drew on the screen.

What is it you think should happen with the E-W given the box you've drawn?

It should be extended accordingly, like N-S is, including the invisible
part od the display (beyond the region, to the E). So that the
resulting region reflected the proportions of the zoom box.

So you agree that the N-S region extent should be increased (well beyond the
box) so that the old region edges fit into the box.

In the E-W direction, you'd want the new region extents to match the box's
geographic extent rather than behave like the changes to the N-S extents.

No. The E-W extent should change the same way the N-S does. This is the
case now for box-zoom-out (GOOD), but only when the zoom box doesn't
overlap the map canvas outside the current region (BAD). This should be
fixed - so that the region geometry reflects the zoom box geometry
exactly, no matter if the zoom box overlaps the map canvas outside the
current region or not. Box-zoom-in behaves correctly in this regard.
Box-zoom-out should do the same.

This would only apply, however, only if the box is larger than the region
extents in a given dimension? in a given direction?

It doesn't have to do with region or zoom box size directly. Please
revert your 2 most recent pathces to mapcanvas.tcl. I tried them. They
don't fix the problem and add to confussion.

Maciek

Somehow we are not communicating here.

From: Maciej Sieczka <tutey@o2.pl>
Date: Thu, 21 Sep 2006 07:44:04 +0200
To: Michael Barton <michael.barton@asu.edu>
Cc: Michael Barton <c.michael.barton@gmail.com>, grass-dev
<grass-dev@grass.itc.it>, Moritz Lennert <mlennert@club.worldonline.be>
Subject: Re: [GRASS-dev] Re: gis.m zooming: 2 new bugs

No. The E-W extent should change the same way the N-S does. This is the
case now for box-zoom-out (GOOD), but only when the zoom box doesn't
overlap the map canvas outside the current region (BAD).
This should be
fixed - so that the region geometry reflects the zoom box geometry
exactly, no matter if the zoom box overlaps the map canvas outside the
current region or not. Box-zoom-in behaves correctly in this regard.
Box-zoom-out should do the same.

Let me try again. Zooming in makes a map (total extents) smaller. Then the
graphic image of the map must be expanded to fill the display window. The
map *looks* magnified, even though it is smaller than before.

Zooming out makes a map bigger (total extents). Then the graphic image must
be shrunk to fit into the display window. Hence the map *looks* reduced,
even though it is bigger than before. One must be careful not to confuse the
region geometry (NSEW extents) with the part the region that holds a visible
raster or vector or the apparent size and shape of the visible portion of a
region within the display window.

Zoom in and zoom out boxes work completely differently from each other. The
zoom in box makes the new region the size and shape of the box. The zoom out
box defines a region that the original extents must fit into and expands the
region in order to make this happen.

At the time of your first report a couple days ago, the zoom out box worked
exactly the same in all directions, regardless of whether it was larger than
the region or not.

Extending a zoom out box beyond the bounds of the current region
conceptually doesn't make sense (like asking, How large is blue?). The
region already fits inside the box, so it makes no sense to expand the
region so that the original extents fit inside the box. In this case, the
zoom out algorithm, working perfectly correctly and consistently in all
directions, can produce visual results that are not very useful.

For changing the region, using a zoom out box that extends beyond the region
bounds, the only meaningful computational alternatives are the following:

1. let inappropriate use of a zoom out box continue to produce logically
consistent and completely predictable, but not very useful results on the
display;

2. generate an error dialog when someone tries to draw zoom out box that
extends beyond a region boundary;

3. change the zoom out box behavior when it is drawn beyond a region
boundary (i.e., a region extent is already inside the box) so that it no
longer behaves like a zoom out box but sets the region in a different way. I
see 2 reasonable ways to change the behavior of a zoom out box when it goes
out of bounds.

3a. Where the zoom out box extends beyond the region bounds, it simply does
not do anything. That is, it does not change the region. The part of the
zoom out box that remains within the region bounds will change the region
accordingly (i.e., expand it so that the original extents will fit into the
box) and the other extents will simply stay the way they were. This is
pretty straightforward behavior conceptually and not overly difficult to
describe. The new region does fit inside the box, but may not fill it in all
directions. This is the way it is now.

3b. Where the zoom out box extends beyond the region bounds, it changes to
behave like a zoom in box. That is, the box itself defines the new region
extents in the out of bounds part and the region expands to completely fill
the box in that dimension. Where it remains within the region bounds it
still behaves like a zoom out box (i.e., expand the region in that dimension
so that the original extents will fit into the box). This is conceptually
more complicated and harder to explain from scratch, but perhaps more
satisfying to some in that the region fills the box in all directions,
regardless of how it started out. This produces visual effects similar to,
but not exactly the same as 3a.

There are no other options AFAICT. It is not a matter of being unwilling to
make changes. It's just that these are all the possible algorithms that
produce reasonably meaningful region changing behavior with a zoom out box.
However, if someone can come up with a different algorithm, more power to
them.

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

Michael Barton wrote:

From: Maciej Sieczka <tutey@o2.pl>

No. The E-W extent should change the same way the N-S does. This is the
case now for box-zoom-out (GOOD), but only when the zoom box doesn't
overlap the map canvas outside the current region (BAD).
This should be
fixed - so that the region geometry reflects the zoom box geometry
exactly, no matter if the zoom box overlaps the map canvas outside the
current region or not. Box-zoom-in behaves correctly in this regard.
Box-zoom-out should do the same.

Let me try again. Zooming in makes a map (total extents) smaller. Then the
graphic image of the map must be expanded to fill the display window. The
map *looks* magnified, even though it is smaller than before.

Right.

Zooming out makes a map bigger (total extents). Then the graphic image must
be shrunk to fit into the display window. Hence the map *looks* reduced,
even though it is bigger than before. One must be careful not to confuse the
region geometry (NSEW extents) with the part the region that holds a visible
raster or vector or the apparent size and shape of the visible portion of a
region within the display window.

Right.

Zoom in and zoom out boxes work completely differently from each other. The
zoom in box makes the new region the size and shape of the box. The zoom out
box defines a region that the original extents must fit into and expands the
region in order to make this happen.

I admit I didn't really understand how the box-zoom-out currently
works. Now I think I do.

This was the main reason of missunderstading, as I *in error*, by my
mistake, thought that the region created by the box-zoom-out would
preserve the shape of the zoom-out box. How did I conclude that it
worked this way - I don't know. I was propably too concentrated on the
case when the zoom box overlaps canvas outside the current region.

Now I see that the box-zoom-out never preserves the zoom-box geometry.
I think so beacause when I draw a zoom-out box taller than wider, the
resulting region is wider than taller, and vice-versa.

So the primary question should be: why cannot the box-zoom-out preserve
the shape of a zoom-box, while zooming out at the same time? OTW: why
doesn't the region after box-zoom-out match the geometry of the zoom
out box?

What I think should happen when zooming-out by box is:

1. change the current region so that it's center is on the center of
the zoom-out box,
2. extend the region in each direction, so that the shape of the
resulting region is identical to the shape of the zoom-out box

Before we continue on the particular case of "box-zoom-out with the
zoom box overlapping outside region", which initiated this discussion,
let's try to understand each other about the general case.

Best,
Maciek

Just saw that Maciej has already responded in the same direction, but posting this anyway, in case it helps:

Michael Barton wrote:

Somehow we are not communicating here.

I agree. Therefore, let me try to figure out what really is the problem here.

As far as I understand it, zoom-out by box never respects the form of the box you draw, be it within or without the region. See

http://moritz.homelinux.org/grass/grass_zooming.html

for a demonstration.

As you can see, even with no empty space on the canvas (i.e. the region filling the canvas completely), the shape of the region which is displayed after zoom-out has nothing to do with the shape of the box. This is completely different from the zoom-in behaviour, where the shape of the box is respected.

This is one issue.

The other issue, as far as I understand, is the fact that if you draw a zoom-in box across the empty part of the canvas (i.e. a part where theoretically there is map data, but the way the region is defined, this map data is not displayed) the resulting displayed map, includes the part that was not displayed before, but which was within the zooming box.

The zooming out by box does not behave this way. Obviously, after a zoom-out you would expect to see more of the map than what you saw before. This is not always the case as you can see here:

http://moritz.homelinux.org/grass/zoom_out.html

Notice the red area. It appears in the zoom-in, but it doesn't in the zoom-out: not very "logical"...

Maybe this helps,

Moritz

From: Maciej Sieczka <tutey@o2.pl>
Date: Thu, 21 Sep 2006 07:44:04 +0200
To: Michael Barton <michael.barton@asu.edu>
Cc: Michael Barton <c.michael.barton@gmail.com>, grass-dev
<grass-dev@grass.itc.it>, Moritz Lennert <mlennert@club.worldonline.be>
Subject: Re: [GRASS-dev] Re: gis.m zooming: 2 new bugs

No. The E-W extent should change the same way the N-S does. This is the
case now for box-zoom-out (GOOD), but only when the zoom box doesn't
overlap the map canvas outside the current region (BAD).
This should be
fixed - so that the region geometry reflects the zoom box geometry
exactly, no matter if the zoom box overlaps the map canvas outside the
current region or not. Box-zoom-in behaves correctly in this regard.
Box-zoom-out should do the same.

Let me try again. Zooming in makes a map (total extents) smaller. Then the
graphic image of the map must be expanded to fill the display window. The
map *looks* magnified, even though it is smaller than before.

Zooming out makes a map bigger (total extents). Then the graphic image must
be shrunk to fit into the display window. Hence the map *looks* reduced,
even though it is bigger than before. One must be careful not to confuse the
region geometry (NSEW extents) with the part the region that holds a visible
raster or vector or the apparent size and shape of the visible portion of a
region within the display window.

Zoom in and zoom out boxes work completely differently from each other. The
zoom in box makes the new region the size and shape of the box. The zoom out
box defines a region that the original extents must fit into and expands the
region in order to make this happen.

At the time of your first report a couple days ago, the zoom out box worked
exactly the same in all directions, regardless of whether it was larger than
the region or not.

Extending a zoom out box beyond the bounds of the current region
conceptually doesn't make sense (like asking, How large is blue?). The
region already fits inside the box, so it makes no sense to expand the
region so that the original extents fit inside the box. In this case, the
zoom out algorithm, working perfectly correctly and consistently in all
directions, can produce visual results that are not very useful.

For changing the region, using a zoom out box that extends beyond the region
bounds, the only meaningful computational alternatives are the following:

1. let inappropriate use of a zoom out box continue to produce logically
consistent and completely predictable, but not very useful results on the
display;

2. generate an error dialog when someone tries to draw zoom out box that
extends beyond a region boundary;

3. change the zoom out box behavior when it is drawn beyond a region
boundary (i.e., a region extent is already inside the box) so that it no
longer behaves like a zoom out box but sets the region in a different way. I
see 2 reasonable ways to change the behavior of a zoom out box when it goes
out of bounds.

3a. Where the zoom out box extends beyond the region bounds, it simply does
not do anything. That is, it does not change the region. The part of the
zoom out box that remains within the region bounds will change the region
accordingly (i.e., expand it so that the original extents will fit into the
box) and the other extents will simply stay the way they were. This is
pretty straightforward behavior conceptually and not overly difficult to
describe. The new region does fit inside the box, but may not fill it in all
directions. This is the way it is now.

3b. Where the zoom out box extends beyond the region bounds, it changes to
behave like a zoom in box. That is, the box itself defines the new region
extents in the out of bounds part and the region expands to completely fill
the box in that dimension. Where it remains within the region bounds it
still behaves like a zoom out box (i.e., expand the region in that dimension
so that the original extents will fit into the box). This is conceptually
more complicated and harder to explain from scratch, but perhaps more
satisfying to some in that the region fills the box in all directions,
regardless of how it started out. This produces visual effects similar to,
but not exactly the same as 3a.

There are no other options AFAICT. It is not a matter of being unwilling to
make changes. It's just that these are all the possible algorithms that
produce reasonably meaningful region changing behavior with a zoom out box.
However, if someone can come up with a different algorithm, more power to
them.

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

Moritz,

You put it all right the way I should have!

Thanks,
Maciek