[GRASS-dev] [bug #4469] (grass) g.region: nsres & ewres are rounded differently

Request Tracker grass-bugs at intevation.de
Thu May 18 11:17:10 EDT 2006


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

Subject: g.region: nsres & ewres are rounded differently

Platform: GNU/Linux/x86
grass obtained from: CVS
grass binary for platform: Compiled from Sources
GRASS Version: 2006-05-18

Hi

nsres & ewres are rounded differently when setting res to something near the decimal places limit.

In [1] both nsres & ewres are rounded-down to 1.12345678 when requested res=1.123456784. That's OK.

But in [2], when requested one decimal point higher res=1.123456785, nsres is rounded-up to 1.12345679 while ewres is rounded-down to 1.12345678.

Moreover, next g.region run [3] with settings identical like in [2] results in ewres=nsres=1.12345678, and, naturaly, different region extent.

Is this all OK? I thought each single, identical g.region run should result in the exactly same region settings.


[1]

$ g.region res=1.123456784 -ap
projection: 1 (UTM)
zone:       33
datum:      wgs84
ellipsoid:  wgs84
north:      5687680.84554222
south:      5673969.0554935
west:       593389.65108669
east:       603210.91029242
nsres:      1.12345678
ewres:      1.12345678
rows:       12205
cols:       8742

[2]

$ g.region res=1.123456785 -ap
projection: 1 (UTM)
zone:       33
datum:      wgs84
ellipsoid:  wgs84
north:      5687680.85060488
south:      5673967.93708717
west:       593388.52815808
east:       603210.91082934
nsres:      1.12345678
ewres:      1.12345679
rows:       12206
cols:       8743

[3]

$ g.region res=1.123456785 -ap
projection: 1 (UTM)
zone:       33
datum:      wgs84
ellipsoid:  wgs84
north:      5687680.85060488
south:      5673966.81363039
west:       593387.4047013
east:       603212.03428612
nsres:      1.12345679
ewres:      1.12345679
rows:       12207
cols:       8745

Maciek


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




More information about the grass-dev mailing list