[GRASS-SVN] r45335 - grass/trunk/raster/r.out.vtk
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Feb 7 18:15:02 EST 2011
Author: huhabla
Date: 2011-02-07 15:15:02 -0800 (Mon, 07 Feb 2011)
New Revision: 45335
Modified:
grass/trunk/raster/r.out.vtk/main.c
grass/trunk/raster/r.out.vtk/parameters.c
Log:
Make the input maps obligatory to allow the export of rgb or vector maps
without the specification of an input map.
Modified: grass/trunk/raster/r.out.vtk/main.c
===================================================================
--- grass/trunk/raster/r.out.vtk/main.c 2011-02-07 22:30:09 UTC (rev 45334)
+++ grass/trunk/raster/r.out.vtk/main.c 2011-02-07 23:15:02 UTC (rev 45335)
@@ -67,6 +67,12 @@
if (G_parser(argc, argv))
exit(EXIT_FAILURE);
+ if (param.input->answers == NULL && param.rgbmaps->answers == NULL &&
+ param.vectmaps->answers == NULL) {
+ G_fatal_error(_("No input maps specified. You need to specify at least one input map or three vector maps or three rgb maps."));
+ }
+
+
/*open the output */
if (param.output->answer) {
fp = fopen(param.output->answer, "w");
Modified: grass/trunk/raster/r.out.vtk/parameters.c
===================================================================
--- grass/trunk/raster/r.out.vtk/parameters.c 2011-02-07 22:30:09 UTC (rev 45334)
+++ grass/trunk/raster/r.out.vtk/parameters.c 2011-02-07 23:15:02 UTC (rev 45335)
@@ -29,6 +29,9 @@
void set_params()
{
param.input = G_define_standard_option(G_OPT_R_INPUTS);
+ param.input->required = NO;
+ param.input->description =
+ _("Raster map(s) to be converted to VTK-ASCII data format");
param.output = G_define_option();
param.output->key = "output";
More information about the grass-commit
mailing list