[GRASS-dev] [bug #5183] (grass) g.region -a: different number of rows if using 'res' or 'nsres' and 'ewres' - though res=nsres=ewres=10!

this bug's URL: http://intevation.de/rt/webrt?serial_num=5183
-------------------------------------------------------------------------

Subject: g.region -a: different number of rows if using 'res' or 'nsres' and 'ewres' - though res=nsres=ewres=10!

Although the n,s,e,w are equal in both cases, and that res=nsres=ewres=10, the
number of rows in the resulting regions are different:

$ g.region n=5679000 s=5678670 w=599240 e=599880 res=10 -ag
n=5679000
s=5678670
w=599240
e=599880
nsres=10
ewres=10
rows=33 < !!!
cols=64

$ g.region n=5679000 s=5678670 w=599240 e=599880 nsres=10 ewres=10 -ag
n=5679000
s=5678660
w=599240
e=599880
nsres=10
ewres=10
rows=34 < !!!
cols=64

Please please please fix it before 6.2 release.

Maciek

-------------------------------------------- Managed by Request Tracker

Request Tracker wrote:

this bug's URL: http://intevation.de/rt/webrt?serial_num=5183
-------------------------------------------------------------------------

Subject: g.region -a: different number of rows if using 'res' or 'nsres' and 'ewres' - though res=nsres=ewres=10!

Although the n,s,e,w are equal in both cases, and that res=nsres=ewres=10, the
number of rows in the resulting regions are different:

$ g.region n=5679000 s=5678670 w=599240 e=599880 res=10 -ag
n=5679000
s=5678670
w=599240
e=599880
nsres=10
ewres=10
rows=33 < !!!
cols=64

$ g.region n=5679000 s=5678670 w=599240 e=599880 nsres=10 ewres=10 -ag
n=5679000
s=5678660
w=599240
e=599880
nsres=10
ewres=10
rows=34 < !!!
cols=64

Please please please fix it before 6.2 release.

I've changed it in CVS.

Previously, ewres=/nsres= rounded to an even multiple of the
resolution, whereas res= simply rounded to a multiple.

--
Glynn Clements <glynn@gclements.plus.com>

Glynn Clements wrote:

Previously, ewres=/nsres= rounded to an even multiple of the
resolution, whereas res= simply rounded to a multiple.

I always wondered why that 2* ... /2 stuff was in there...

Hamish