[GRASS-SVN] r71017 - grass-addons/grass7/raster/r.modis/r.modis.import
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed May 3 23:40:03 PDT 2017
Author: lucadelu
Date: 2017-05-03 23:40:03 -0700 (Wed, 03 May 2017)
New Revision: 71017
Modified:
grass-addons/grass7/raster/r.modis/r.modis.import/r.modis.import.py
Log:
r.modis: added option for output file to use as input in t.register
Modified: grass-addons/grass7/raster/r.modis/r.modis.import/r.modis.import.py
===================================================================
--- grass-addons/grass7/raster/r.modis/r.modis.import/r.modis.import.py 2017-05-03 20:52:05 UTC (rev 71016)
+++ grass-addons/grass7/raster/r.modis/r.modis.import/r.modis.import.py 2017-05-04 06:40:03 UTC (rev 71017)
@@ -84,6 +84,11 @@
#% description: String of the form "( 1 0 1 0 )" to choose a subset of HDF layers to import
#% required: no
#%end
+#%option G_OPT_F_OUTPUT
+#% key: outfile
+#% description: Full path to output file to use in t.register
+#% required: no
+#%end
import os
import sys
@@ -520,7 +525,9 @@
else:
count = 0
outfile = None
- if flags['w'] and count == 1:
+ if options['outfile']:
+ outfile = options['outfile']
+ elif flags['w'] and not options['outfile'] and count == 1:
outfile = tempfile.NamedTemporaryFile(delete=False)
elif flags['w'] and count != 1:
grass.warning(_("To use correctly the file in t.rast.import you have "
More information about the grass-commit
mailing list