[GRASS-dev] Re: gis.m zooming: 2 new bugs
Maciej Sieczka
tutey at o2.pl
Thu Sep 21 05:04:17 EDT 2006
Michael Barton wrote:
>> From: Maciej Sieczka <tutey at 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
More information about the grass-dev
mailing list