[GRASS-SVN] r29523 - grass/trunk/raster/r.in.gdal

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Dec 27 11:53:15 EST 2007


Author: martinl
Date: 2007-12-27 11:53:15 -0500 (Thu, 27 Dec 2007)
New Revision: 29523

Modified:
   grass/trunk/raster/r.in.gdal/main.c
Log:
r.in.gdal: do not require input/output parameter (not needed for -f flag)

Modified: grass/trunk/raster/r.in.gdal/main.c
===================================================================
--- grass/trunk/raster/r.in.gdal/main.c	2007-12-27 16:35:53 UTC (rev 29522)
+++ grass/trunk/raster/r.in.gdal/main.c	2007-12-27 16:53:15 UTC (rev 29523)
@@ -83,8 +83,13 @@
 /* -------------------------------------------------------------------- */
     parm.input = G_define_standard_option(G_OPT_R_INPUT);
     parm.input->description = _("Raster file to be imported");
+    parm.input->gisprompt = "old_file,file,input";
+    parm.input->required = NO; /* not required because of -f flag */
+    parm.input->guisection = _("Main");
 
     parm.output = G_define_standard_option(G_OPT_R_OUTPUT);
+    parm.output->required = NO; /* not required because of -f flag */
+    parm.output->guisection = _("Main");
 
     parm.band = G_define_option();
     parm.band->key = "band";
@@ -182,6 +187,15 @@
 	exit(EXIT_SUCCESS);
     }
 
+    if (!input) {
+	G_fatal_error(_("Required parameter <%s> not set"),
+		      parm.input->key);
+    }
+
+    if (!output) {
+	G_fatal_error(_("Name for output raster map not specified"));
+    }
+
 /* -------------------------------------------------------------------- */
 /*      Open the file.                                                  */
 /* -------------------------------------------------------------------- */



More information about the grass-commit mailing list