[GRASS-SVN] r63203 - grass/branches/releasebranch_7_0/raster/r.sun

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Nov 27 07:22:50 PST 2014


Author: martinl
Date: 2014-11-27 07:22:50 -0800 (Thu, 27 Nov 2014)
New Revision: 63203

Modified:
   grass/branches/releasebranch_7_0/raster/r.sun/main.c
Log:
r.sun: use standardized options (#2409) (merge r63202 from trunk)

Modified: grass/branches/releasebranch_7_0/raster/r.sun/main.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.sun/main.c	2014-11-27 15:20:47 UTC (rev 63202)
+++ grass/branches/releasebranch_7_0/raster/r.sun/main.c	2014-11-27 15:22:50 UTC (rev 63203)
@@ -303,17 +303,15 @@
 	_("Name of the Linke atmospheric turbidity coefficient input raster map [-]");
     parm.linkein->guisection = _("Input");
 
-    if (parm.linkein->answer == NULL) {
-	parm.lin = G_define_option();
-	parm.lin->key = "lin";
-	parm.lin->type = TYPE_DOUBLE;
-	parm.lin->answer = LINKE;
-	parm.lin->required = NO;
-	parm.lin->description =
-	    _("A single value of the Linke atmospheric turbidity coefficient [-]");
-	parm.lin->guisection = _("Input");
-    }
-
+    parm.lin = G_define_option();
+    parm.lin->key = "linke_value";
+    parm.lin->type = TYPE_DOUBLE;
+    parm.lin->answer = LINKE;
+    parm.lin->required = NO;
+    parm.lin->description =
+      _("A single value of the Linke atmospheric turbidity coefficient [-]");
+    parm.lin->guisection = _("Input");
+    
     parm.albedo = G_define_option();
     parm.albedo->key = "albedo";
     parm.albedo->type = TYPE_STRING;
@@ -323,16 +321,14 @@
 	_("Name of the ground albedo coefficient input raster map [-]");
     parm.albedo->guisection = _("Input");
 
-    if (parm.albedo->answer == NULL) {
-	parm.alb = G_define_option();
-	parm.alb->key = "alb";
-	parm.alb->type = TYPE_DOUBLE;
-	parm.alb->answer = ALB;
-	parm.alb->required = NO;
-	parm.alb->description =
-	    _("A single value of the ground albedo coefficient [-]");
-	parm.alb->guisection = _("Input");
-    }
+    parm.alb = G_define_option();
+    parm.alb->key = "albedo_value";
+    parm.alb->type = TYPE_DOUBLE;
+    parm.alb->answer = ALB;
+    parm.alb->required = NO;
+    parm.alb->description =
+      _("A single value of the ground albedo coefficient [-]");
+    parm.alb->guisection = _("Input");
 
     parm.latin = G_define_option();
     parm.latin->key = "lat";



More information about the grass-commit mailing list