[GRASS-SVN] r41370 - in grass/branches/develbranch_6/scripts: d.rast.leg db.droptable r.regression.line

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Mar 9 01:42:47 EST 2010


Author: hamish
Date: 2010-03-09 01:42:47 -0500 (Tue, 09 Mar 2010)
New Revision: 41370

Modified:
   grass/branches/develbranch_6/scripts/d.rast.leg/d.rast.leg
   grass/branches/develbranch_6/scripts/db.droptable/db.droptable
   grass/branches/develbranch_6/scripts/r.regression.line/r.regression.line
Log:
revert local changes accidentally checked in with last commit

Modified: grass/branches/develbranch_6/scripts/d.rast.leg/d.rast.leg
===================================================================
--- grass/branches/develbranch_6/scripts/d.rast.leg/d.rast.leg	2010-03-09 06:38:45 UTC (rev 41369)
+++ grass/branches/develbranch_6/scripts/d.rast.leg/d.rast.leg	2010-03-09 06:42:47 UTC (rev 41370)
@@ -112,6 +112,10 @@
    g.message -e "Raster map '$GIS_OPT_MAP' not found in mapset search path"
    exit 1
 fi
+filemapset="${mapset}"
+# would it be better to search for cats/ file ??
+eval `g.gisenv`
+HISTFILEDIR=$GISDBASE/$LOCATION_NAME/$filemapset/cell_misc/
 eval `r.info -t "$GIS_OPT_MAP"`
 
 # for rast=

Modified: grass/branches/develbranch_6/scripts/db.droptable/db.droptable
===================================================================
--- grass/branches/develbranch_6/scripts/db.droptable/db.droptable	2010-03-09 06:38:45 UTC (rev 41369)
+++ grass/branches/develbranch_6/scripts/db.droptable/db.droptable	2010-03-09 06:42:47 UTC (rev 41370)
@@ -85,7 +85,7 @@
 fi
 
 # check if table is used somewhere (connected to vector map)
-USEDINMAPS=`grep -l "$table" "$GISDBASE/$LOCATION_NAME"/*/vector/*/dbln | sed -e 's+/dbln$++g' -e 's+^.*/++'`
+USEDINMAPS=`grep "$table" "$GISDBASE/$LOCATION_NAME"/*/vector/*/dbln | sed -e 's+/dbln:.*$++g' -e 's+^.*/++'`
 if  [ -n "$USEDINMAPS" ] ; then
    g.message -w "Deleting <$table> table which is attached to following map(s):"
    for i in $USEDINMAPS ; do

Modified: grass/branches/develbranch_6/scripts/r.regression.line/r.regression.line
===================================================================
--- grass/branches/develbranch_6/scripts/r.regression.line/r.regression.line	2010-03-09 06:38:45 UTC (rev 41369)
+++ grass/branches/develbranch_6/scripts/r.regression.line/r.regression.line	2010-03-09 06:42:47 UTC (rev 41370)
@@ -110,21 +110,13 @@
 awk '{tot += $3;sumX +=$1 * $3; sumsqX +=$1*$1*$3;sumY +=$2 * $3; sumsqY +=$2*$2*$3;\
  sumXY +=$1*$2*$3;\
 }\
-END {B = (sumXY - sumX*sumY/tot)/(sumsqX - sumX*sumX/tot); \
-R = (sumXY - sumX*sumY/tot)/((sumsqX - sumX^2/tot)*(sumsqY - sumY^2/tot))^0.5; \
-mediaX = sumX/tot; sumsqX=sumsqX/tot; varX=sumsqX-(mediaX^2); sdX=varX^0.5; \
-mediaY = sumY/tot; sumsqY=sumsqY/tot; varY=sumsqY-(mediaY^2); sdY=varY^0.5; \
-A = mediaY - B*mediaX; \
-F = R^2/(1-R^2/tot-2); \
+END {B=(sumXY - sumX*sumY/tot)/(sumsqX - sumX*sumX/tot);\
+R= (sumXY - sumX*sumY/tot)/((sumsqX - sumX^2/tot)*(sumsqY - sumY^2/tot))^0.5;\
+mediaX=sumX/tot;sumsqX=sumsqX/tot;varX=sumsqX-(mediaX^2);sdX=varX^0.5;\
+mediaY=sumY/tot;sumsqY=sumsqY/tot;varY=sumsqY-(mediaY^2);sdY=varY^0.5;\
+A=mediaY - B*mediaX; F= R^2/(1-R^2/tot-2);\
 print A, B, R, tot, F, mediaX, sdX, mediaY, sdY}' "$TEMPFILE" > "$TEMPFILE"b
 
-#if( sumsqX == sumX^2/tot ) { B = NaN; }
-#else { B = (sumXY - sumX*sumY/tot)/(sumsqX - sumX*sumX/tot); }
-#
-#if( sumsqY == sumY^2/tot ) { R = NaN; }
-#else { R = (sumXY - sumX*sumY/tot)/((sumsqX - sumX^2/tot)*(sumsqY - sumY^2/tot))^0.5; }
-
-
 echo "a b R N F medX sdX medY sdY" | tr -s ' ' '\n' > "$TEMPFILE"d
 cat "$TEMPFILE"b | tr -s ' ' '\n' > "$TEMPFILE"e
 



More information about the grass-commit mailing list