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

Maciej Sieczka tutey at o2.pl
Wed Sep 20 12:24:58 EDT 2006


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




More information about the grass-dev mailing list