[GRASS-SVN] r36490 -
grass-addons/LandDyn/devs_landcover_scripts/r.soil.fertility
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Mar 26 16:09:53 EDT 2009
Author: isaacullah
Date: 2009-03-26 16:09:53 -0400 (Thu, 26 Mar 2009)
New Revision: 36490
Modified:
grass-addons/LandDyn/devs_landcover_scripts/r.soil.fertility/r.soil.fertility
Log:
Modified: grass-addons/LandDyn/devs_landcover_scripts/r.soil.fertility/r.soil.fertility
===================================================================
--- grass-addons/LandDyn/devs_landcover_scripts/r.soil.fertility/r.soil.fertility 2009-03-26 18:09:22 UTC (rev 36489)
+++ grass-addons/LandDyn/devs_landcover_scripts/r.soil.fertility/r.soil.fertility 2009-03-26 20:09:53 UTC (rev 36490)
@@ -49,7 +49,7 @@
#% type: string
#% gisprompt: string
#% description: New soil fertility output map name (no prefix)
-#% answer: landcover
+#% answer: s_fertility
#% required : yes
#%END
@@ -58,7 +58,7 @@
#% type: string
#% gisprompt: string
#% description: path to color rules file for landcover map
-#% answer: /usr/local/grass-6.3.cvs/scripts/rules/sfertil_colors.txt
+#% answer: /usr/local/grass-6.5.svn/scripts/rules/sfertil_colors.txt
#% required : yes
#%END
@@ -89,16 +89,11 @@
max=$GIS_OPT_max
-sf_rules=$GIS_OPT_sf_rules
-
sf_color=$GIS_OPT_sf_color
+txtout=$outmap"_sfertil_stats.txt"
-txtout=$outmap"sfertil_stats.txt"
-outsf=$outmap
-
-
#setting initial conditions of map area
g.region rast=$inmap
@@ -107,14 +102,14 @@
#updating raw soil fertility category numbers
-r.mapcalc "$out_sf = if ($inmap == $max && isnull($impacts), $max, (if ($inmap < $max && isnull($impacts), ($inmap + 1), if ($inmap > $max, ($max - $impacts), if ($inmap < 0, 0, ($inmap - $impacts))))))"
+r.mapcalc "$outmap=if($inmap == $max && isnull($impacts), $max, (if ($inmap < $max && isnull($impacts), ($inmap + 1), if ($inmap > $max, ($max - $impacts), if ($inmap < 0, 0, ($inmap - $impacts))))))"
- r.colors map=$outsf rules=$sf_color
+ r.colors --quiet map=$outmap rules=$sf_color
#checking total area of updated cells
- temparea=`eval r.stats -n -a fs=- input=$impacts | cut -d'-' -f2`
+ temparea=`eval r.stats -a -n input=$impacts fs=- nv=* nsteps=1 | cut -d'-' -f2`
echo "***********************"
echo "Total area of impacted zones = $temparea square meters"
echo "***********************"
More information about the grass-commit
mailing list