[GRASS-dev] r.regression.line fix proposal
Markus Neteler
neteler at fbk.eu
Mon Dec 3 18:00:31 EST 2007
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
?
(Un)related question:
Would it be a big mess to implement r.regression.line a C module?
Markus
More information about the grass-dev
mailing list