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

Maciek Sieczka via RT grass-bugs at intevation.de
Mon Sep 25 11:29:32 EDT 2006


> 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




More information about the grass-dev mailing list