[GRASS-dev] Re: r.neighbors modification
Martin Wegmann
wegmann at biozentrum.uni-wuerzburg.de
Fri Nov 24 06:16:32 EST 2006
Hello Hamish,
thanks for your comments, I added most of them but a few questions remain:
On Friday 24 November 2006 07:38, Hamish wrote:
> Martin Wegmann wrote:
> > I wrote a short neighbourhood ring analysis for average and
> > variance analysis (currently only up to 11x11 but I will add rings up
> > to 21x21).
> > Hamish advice how to improve a script (v.cellstats threat) is partly
> > incorporated but I am grateful for any further suggestions how to
> > improve this script.
>
> Hi,
>
> just a few more comments-
>
> this only has to happen once:
> #%Module
> #% description: ring neighborhood analysis
> #%END
done
>
> you might combine all those flags into one option,
> #%option
> #% key: size
> #% type: integer
> #% description: compute var & avg of NxN ring
> #% options: 3,5,7,9,11
> #% answer: 5
> #% required : no
> #%END
very good - implemented
> (defaults and not abreviating in descriptions [these get built into help
> pages, translated, etc] are nice)
that means that in
#% description:
it is nicer not to use abbreviations, because they are shown in help pages
etc., right?
>
> you call a "cleanup" fn but don't define one.
I think you mean this part:
# what to do in case of user break:
exitprocedure()
{
echo "User break!" 1>&2
cleanup
exit 1
}
# shell check for user break (signal list: trap -l)
trap "exitprocedure" 2 3 15
## copy from r.univar.sh - end
how do I only call a "cleanup"?
thanks, Martin
>
>
> Hamish
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev
More information about the grass-dev
mailing list