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

Michael Barton michael.barton at asu.edu
Fri Aug 18 11:48:28 EDT 2006


I posted a message on this over a week ago and got no reply.

<http://grass.itc.it/pipermail/grass-dev/2006-August/024866.html>

I also discovered this and thought it was a bug at first. But when I looked
at the code (this new 'explore mode' was developed by Cedric Shock), I
realized that it was intentional.

That is, it is dynamically changing resolution to speed display times as you
zoom in and out.

I asked if this is what we wanted or not. There are advantages and
disadvantages. It needs to be documented in any case, of course.

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 12:12:32 +0200
> To: Michael Barton <michael.barton at asu.edu>, grass-dev
> <grass-dev at grass.itc.it>
> Cc: Jarek Jasiewicz <jarekj at amu.edu.pl>
> Subject: gis.m: resolution not preserved
> 
> Michael,
> 
> There is a problem with resolution handling in gis.m (6.3 CVS and 6.1).
> It's not preserved when zooming, and switching to "Map fills display
> window" corrupts it.
> 
> Start Grass in spearfish.
> 
> # terminal:
> g.region rast=slope -a
> 
> # gis.m
> add raster 'slope'
> display it
> 
> # gis.m CLI
> g.region -g
> 
> n=4928030
> s=4913690
> w=589980
> e=609000
> nsres=30
> ewres=30
> rows=478
> cols=634
> 
> # gis.m
> zoom in/out a bit
> 
> # gis.m CLI
> g.region -g
> n=4925065.04215
> s=4921067.9817
> w=593703.886256
> e=599027.771749
> nsres=30.05308609
> ewres=30.07844911
> rows=133
> cols=177
> 
> As you see, the resolution is not preserved.
> 
> It's even worse if you switch to "Map fills display window" mode: once
> you do it, the resolution goes really funky:
> 
> # gis.m CLI
> g.region -g
> 
> n=4925065.04215
> s=4921067.9817
> w=593703.886256
> e=599027.771749
> nsres=8.29265654
> ewres=8.29265653
> rows=482
> cols=642
> 
> I tried adding -a for g.region calls in mapcanvas.tcl and it seems to
> solve the problem, but I'm not entirely sure which g.region calls really
> require it, and which should be be left without it. Moreover, I don't
> know how to fix the "Map fills display window" resolution bug.
> 
> Also, it seems that rastnum.tcl and georect.tcl would require same fix (?).
> 
> As I'm not sure how to fix these, can I ask you to take a look at them?
> 
> Maciek




More information about the grass-dev mailing list