[GRASS-SVN] r70529 - grass-addons/grass7/raster/r.modis/r.modis.import
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Feb 10 06:33:06 PST 2017
Author: lucadelu
Date: 2017-02-10 06:33:06 -0800 (Fri, 10 Feb 2017)
New Revision: 70529
Modified:
grass-addons/grass7/raster/r.modis/r.modis.import/r.modis.import.py
Log:
r.modis.import: added l flag, fix #3268
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-02-10 14:22:08 UTC (rev 70528)
+++ grass-addons/grass7/raster/r.modis/r.modis.import/r.modis.import.py 2017-02-10 14:33:06 UTC (rev 70529)
@@ -42,7 +42,10 @@
#% key: w
#% description: Create a text file to use into t.register
#%end
-
+#%flag
+#% key: l
+#% description: List more info about the supported MODIS products
+#%end
#%option
#% key: input
#% type: string
@@ -471,6 +474,14 @@
if not gisbase:
grass.fatal(_('$GISBASE not defined'))
return 0
+ if flags['l']:
+ try:
+ from rmodislib import product
+ except:
+ grass.fatal("r.modis library is not installed")
+ prod = product()
+ prod.print_prods()
+ return 0
# return an error if q and spectral are set
if not flags['q'] and options['spectral'] != '':
grass.warning(_('If no QA layer chosen in the "spectral" option'
More information about the grass-commit
mailing list