[GRASS-dev] r.regression.line fix proposal

Dylan Beaudette dylan.beaudette at gmail.com
Tue Dec 4 19:42:44 EST 2007


On Tuesday 04 December 2007, Markus Neteler wrote:
> Markus Neteler wrote:
> > Hi,
> >
> > I wonder if this change is reasonable to make the script
> > working with FP maps:
> >
> > diff -u -r1.17 scripts/r.regression.line
> > --- r.regression.line   3 Dec 2007 22:52:43 -0000       1.17
> > +++ r.regression.line   3 Dec 2007 22:54:09 -0000
> > @@ -90,7 +90,7 @@
> >
> >
> >  #calculate regression equation
> > -r.stats -c input=$GIS_OPT_MAP1,$GIS_OPT_MAP2  > "$TMP"
> > +r.stats -cAN input=$GIS_OPT_MAP1,$GIS_OPT_MAP2  > "$TMP"
> >  awk '{tot += $3;sumX +=$1 * $3; sumsqX +=$1*$1*$3;sumY +=$2 * $3; sumsqY
> > +=$2*$2*$3;\
> >   sumXY +=$1*$2*$3;\
> >  }\
> >
> >
> > changes:
> > -n to suppress no data
> > -A to avoid range output for FP maps
> > ?
>
> Committed to CVS.
>
> (Un)related question:
> Would it be a big mess to implement r.regression.line a C module?
>
> Markus

If written as a C module, could it take advantage of any stats library 
functions lying around ? 

Dylan

-- 
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341


More information about the grass-dev mailing list