[GRASS-SVN] r36860 - grass/branches/develbranch_6/scripts/r.shaded.relief

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Apr 22 06:58:18 EDT 2009


Author: hamish
Date: 2009-04-22 06:58:18 -0400 (Wed, 22 Apr 2009)
New Revision: 36860

Modified:
   grass/branches/develbranch_6/scripts/r.shaded.relief/r.shaded.relief
Log:
allow alt and az to be floats

Modified: grass/branches/develbranch_6/scripts/r.shaded.relief/r.shaded.relief
===================================================================
--- grass/branches/develbranch_6/scripts/r.shaded.relief/r.shaded.relief	2009-04-22 07:54:36 UTC (rev 36859)
+++ grass/branches/develbranch_6/scripts/r.shaded.relief/r.shaded.relief	2009-04-22 10:58:18 UTC (rev 36860)
@@ -66,7 +66,7 @@
 #% end
 #% option
 #%  key: altitude
-#%  type: integer
+#%  type: double
 #%  description: Altitude of the sun in degrees above the horizon
 #%  required : no
 #%  options : 0-90
@@ -74,7 +74,7 @@
 #% end
 #% option
 #%  key: azimuth
-#%  type: integer
+#%  type: double
 #%  description: Azimuth of the sun in degrees to the east of north
 #%  required : no
 #%  options : 0-360
@@ -179,7 +179,8 @@
 fi		
 
 #correct azimuth to East (GRASS convention):
-az=`expr $az - 90`
+#  this seems to be backwards, but in fact it works so leave it.
+az=`echo "$az" | awk '{print $1 - 90.0}'`
 
 g.message "Calculating shading, please stand by."
 



More information about the grass-commit mailing list