[GRASS-user] r.fillnulls in the latest cvs version doesn't work
hamish_nospam at yahoo.com
Mon Feb 12 03:18:28 EST 2007
Michael Barton wrote:
> Beyond the larger issue of how the complex command g.region should be
> controlled (which has already had considerable discussion), won't
> replacing g.region -gm with g.region -gpm fix the immediate problem
> with the r.nulls shell script?
That would fix r.fillnulls, but g.region is probably one of the most
heavily scripted modules, and who knows how many user scripts this
We made a commitment that any script written for GRASS 6.0.0 should work
the same or better for any version of GRASS up to GRASS 7, and that any
data created for GRASS 6.0.0 will be compatible with any version of
GRASS up to GRASS 7. The only thing worse than having to rewrite your
scripts every time a new version of GRASS comes out (1-2 times a year)
is having your script silently not do the thing you expect it to do
after am upgrade. The lesson here is that messing with core modules and
library functions should be done with extreme care.
Martin Landa wrote:
> I hope I fixed this problem or I missed something? Now:
> g.region -m == g.region -gm (== g.region -pgm)
* "g.region -m" by itself was and is meaninless. (doesn't print anything)
* "g.region -gm" is not the same as "g.region -pm"!
i.e. -m does not imply -g.
* the "new way" is that "-g" be like "-m", a flag to change the state.
* the old -m did not restrict printing to just the res. Regardless of
the merits of changing that to something more logical, doing that might
break a script on someone from Basingstoke's customised Amstrad.
Fortunately "g.region -pg" == "g.region -g" output since GRASS 6.0.
> I agree that the larger issues for g.region need to be sorted out. But
> can the script be made functional in this way until they are?
With Martin's 'g.region -gm' == 'g.region -pgm' fix, it should be.
I do not intend to rewrite scripts to fix forward compatibility
issues, when the compatibility issues are the things that should be
fixed. If we do that we won't catch backwards compatibility issues/
combinations when they happen and then we get lots of grumpy support
questions when we release a new version which is no longer compatible
with an earlier minor release.
WRT "g.region print=region", just typing "g.region -p" is faster :)
More information about the grass-user