[GRASSLIST:10343] Re: [GRASS5] New release candidate 3 of GIS Manager 2

I could be wrong about this, but I remember some discussion on the list a while back about this issue. I thought that g.region changes the resolution so that there are always an integer number of cells in the display. Partial cells can't be displayed, so the resolution is changed to best fit your desired zooming, always going in the direction of greater resolution. Does this sound familiar to anyone else?

-Ian

-----Original Message-----
From: owner-GRASSLIST@baylor.edu on behalf of Michael Barton
Sent: Wed 2/15/2006 3:59 PM
To: Maciek Sieczka
Cc: grass5@grass.itc.it; Multiple recipients of list
Subject: [GRASSLIST:10331] Re: [GRASS5] New release candidate 3 of GIS Manager 2

Maciek,

I see what you are talking about. But the GIS Manager is NOT doing this. The
zooming in the new GIS Manager does NOT use d.zoom. It simply resets the
region extents--extents ONLY--by issuing a g.region n=y1 s=y2 e=x1 w=x2 (no
change to resolution)

I tried adding the -a flag and it makes no difference. It looks like it is
some kind of a rounding issue in g.region (or possibly in the OS). In a
working context the change is a tiny fraction of a mm in your example below.
So it wouldn't make any meaningful difference in most cases. However, it is
odd that it happens. Maybe someone who understands the g.region code can
explain it.

Michael
______________________________
Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: Maciek Sieczka <werchowyna@epf.pl>
Date: Tue, 14 Feb 2006 21:12:17 +0100
To: Michael Barton <michael.barton@asu.edu>
Cc: <grass5@grass.itc.it>, <GRASSLIST@baylor.edu>
Subject: Re: [GRASS5] New release candidate 3 of GIS Manager 2

Zoom does NOT change resolution, only EXTENTS.

But it really DOES change the region. Try for yourself:

1.
$ g.region rast=u65_10k_rogow -ap
projection: 1 (UTM)
zone: 33
datum: wgs84
ellipsoid: wgs84
north: 5681438
south: 5676368
west: 596952
east: 603815
nsres: 1
ewres: 1
rows: 5070
cols: 6863

2.
Display in gis.m, zoom in once.

3.
$ g.region -p
projection: 1 (UTM)
zone: 33
datum: wgs84
ellipsoid: wgs84
north: 5679541.73929
south: 5678636.76827
west: 600274.248772
east: 601286.741103
nsres: 0.99996798
ewres: 0.99949885
rows: 905
cols: 1013

As you can see the resolution changed. Please don't do it.

controlled by g.region. Nothing I can do about that.

Use "g.region -a" instead?

Who can say what d.zoom is doing that it is not changing the res at
zooming in/out?

-------------------------------------------------------------
This message has been scanned by Postini anti-virus software.