[GRASS-dev] [bug #3729] (grass) g.region zoom= off by one error on eastern side

Also, the issue is much worse than your example suggests. Because col
is one too high, the loop never examines the rightmost column.
Consider:

  $ g.region -a n=4916070 s=4915800 w=602940 e=603240 res=30
  $ r.mapcalc 'map1 = if(col() == 1 || col() == 10,1,null())'
  $ g.region -a n=4916250 s=4915620 w=602730 e=603450 res=30
  $ g.region rast=map1
  $ g.region zoom=map1
  $ g.region -p
  projection: 1 (UTM)
  zone: 13
  datum: nad27
  ellipsoid: clark66
  north: 4916070
  south: 4915800
  west: 602940
  east: 603000
  nsres: 30
  ewres: 30
  rows: 9
***> cols: 2
  cells: 18

Thus, "g.region zoom=..." can actually make the region too small,
discarding valid data.

Glynn,

Sorry for being slow - does your fix take care of that also?

Maciek

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

Maciek Sieczka via RT wrote:

> Also, the issue is much worse than your example suggests. Because col
> is one too high, the loop never examines the rightmost column.
> Consider:

[snip]

> Thus, "g.region zoom=..." can actually make the region too small,
> discarding valid data.

Sorry for being slow - does your fix take care of that also?

Yes.

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