[GRASS-SVN] r73483 - grass-addons/grass7/imagery/i.modis/i.modis.import
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Oct 3 02:44:40 PDT 2018
Author: lucadelu
Date: 2018-10-03 02:44:39 -0700 (Wed, 03 Oct 2018)
New Revision: 73483
Modified:
grass-addons/grass7/imagery/i.modis/i.modis.import/i.modis.import.py
Log:
i.modis.import: added flag to append rasters to an existing file for t.register
Modified: grass-addons/grass7/imagery/i.modis/i.modis.import/i.modis.import.py
===================================================================
--- grass-addons/grass7/imagery/i.modis/i.modis.import/i.modis.import.py 2018-10-02 18:21:09 UTC (rev 73482)
+++ grass-addons/grass7/imagery/i.modis/i.modis.import/i.modis.import.py 2018-10-03 09:44:39 UTC (rev 73483)
@@ -45,6 +45,10 @@
#% description: Create a text file to use with t.register
#%end
#%flag
+#% key: a
+#% description: Append new file to existing file to use with t.register
+#%end
+#%flag
#% key: l
#% description: List more info about the supported MODIS products
#%end
@@ -543,7 +547,10 @@
outfile = None
# check if file for t.register has to been created
if options['outfile']:
- outfile = open(options['outfile'], 'w')
+ if flags['a']:
+ outfile = open(options['outfile'], 'a')
+ else:
+ outfile = open(options['outfile'], 'w')
if count > 1:
grass.warning("The spectral subsets are more than one so the "
" output file will be renamed")
More information about the grass-commit
mailing list