[GRASS-SVN] r53160 - grass-addons/grass6/raster/r.cog

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Sep 10 23:17:49 PDT 2012


Author: hamish
Date: 2012-09-10 23:17:49 -0700 (Mon, 10 Sep 2012)
New Revision: 53160

Modified:
   grass-addons/grass6/raster/r.cog/r.cog
Log:
more incorrect dip angle experiments, but mostly to fix the temporary raster map removals

Modified: grass-addons/grass6/raster/r.cog/r.cog
===================================================================
--- grass-addons/grass6/raster/r.cog/r.cog	2012-09-11 05:32:16 UTC (rev 53159)
+++ grass-addons/grass6/raster/r.cog/r.cog	2012-09-11 06:17:49 UTC (rev 53160)
@@ -98,7 +98,7 @@
       g.remove --quiet rast="$TMP_MAP"
   fi
   if [ "$GIS_FLAG_A" -eq 1 ] ; then
-  true; #    g.remove --quiet rast="$TMP_MAP.slope,$TMP_MAP.dx,$TMP_MAP.dy"
+      g.remove --quiet rast="$TMP_MAP.slope,$TMP_MAP.dx,$TMP_MAP.dy"
   fi
 }
 trap "cleanup" 2 3 15
@@ -188,11 +188,24 @@
 # r.univar -g tmp.magnitude
 #   ??
 
+DIP_try1=`r.univar -eg map="$TMP_MAP.slope" | grep '^median=' | cut -f2 -d'='`
 
-DIP=`r.univar -eg map="$TMP_MAP.slope" | grep '^median=' | cut -f2 -d'='`
+
+# this is completely incorrect:
+FUDGE="$DIP_try1"
+
+GRASS_VERBOSE=0 \
+  r.mapcalc "$TMP_MAP.magnitude = sqrt(tmp.rcog.$$.dx*tmp.rcog.$$.dx \
+                                     + tmp.rcog.$$.dy*tmp.rcog.$$.dy) * $FUDGE"
+
+DIP=`r.univar -eg map="$TMP_MAP.magnitude" | grep '^median=' | cut -f2 -d'='`
+
 DX=`r.univar -g map="$TMP_MAP.dx" | grep '^mean=' | cut -f2 -d'='`
 DY=`r.univar -g map="$TMP_MAP.dy" | grep '^mean=' | cut -f2 -d'='`
 
+
+
+
 #r.univar map="$TMP_MAP.slope" -e
 #d.rast "$TMP_MAP"
 PI=3.14159265358979323846



More information about the grass-commit mailing list