[GRASS-dev] gis.m: resolution not preserved
Maciej Sieczka
tutey at o2.pl
Fri Aug 18 06:12:32 EDT 2006
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