[GRASS-dev] Re: gis.m: resolution not preserved

Michael Barton michael.barton at asu.edu
Fri Aug 18 16:07:40 EDT 2006


Maciej,

See below. I hope you realize that I and others appreciate the work you do
to find and get fixed all the little (and some not so little) things that
can frustrate GRASS users.

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: Fri, 18 Aug 2006 21:55:49 +0200
> To: Michael Barton <michael.barton at asu.edu>
> Cc: grass-dev <grass-dev at grass.itc.it>, Jarek Jasiewicz <jarekj at amu.edu.pl>
> Subject: Re: gis.m: resolution not preserved
> 
> Michael Barton napisa?(a):
> 
>> I think that it's going from res=8 to res=30
> 
> No. It's going from 30 to 8.
> 
> Another example:
> 
> #0 grass63 -text, spearfish60, g.region rast=slope -a, gis.m
> 
> ALL COMMANDS BELOW ARE CALLED FROM gis.m:
> 
> #1 g.region -g
> n=4928030
> s=4913690
> w=589980
> e=609000
> nsres=30
> ewres=30
> rows=478
> cols=634
> 
> #2 add 'slope' raster, display, zoom in (CONSTRAIN mode)
> 
> #3 g.region -g
> n=4925144.14938
> s=4922139.29461
> w=595930.207469
> e=599887.095436
> nsres=30.0485477
> ewres=29.97642399
> rows=100
> cols=132
> 
> #4 swith to EXPLORE mode
> 
> #5 g.region -g
> n=4925144.14938
> s=4922139.29461
> w=595907.492984
> e=599909.809921
> nsres=6.23413853
> ewres=6.23413853
> rows=482
> cols=642

The resolution is a function of the extents. If you zoom in from here, the
res value gets smaller; if you zoom out it gets bigger. It is not related to
prior resolution. It is set so that you get a +/- constant number of pixels
in the display output. This is why it is faster overall.

> 
> As you see, the resolution goes from ~30 to ~6. This will not speed up
> the display, will it?
> 
>> I've done this, going back and forth between modes and can only
>> get it to change resolution if I'm in explore mode. I'll  keep
>> looking into it.
> 
> Above you can also see that resolution changed a bit between #1 and #2.
> This proves that gis.m doesn't allign region to resolution, while it
> should (like d.zoom did) to avoid weird results in the output of
> commands that use current region settings.
> 

This is the -a issue, rather than a big change in resolution. I see now.
There is some complication as to where to put the -a so that it doesn't mess
things up when you DON'T want to align to region. I'll try again to put it
in somewhere.

Michael

> I must be really going now. See you next week!
> 
> Cheers,
> Maciek




More information about the grass-dev mailing list