[GRASS-SVN] r73422 - in grass-addons/grass7/imagery/i.modis: i.modis.download i.modis.import

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Sep 26 13:48:15 PDT 2018


Author: lucadelu
Date: 2018-09-26 13:48:15 -0700 (Wed, 26 Sep 2018)
New Revision: 73422

Modified:
   grass-addons/grass7/imagery/i.modis/i.modis.download/i.modis.download.py
   grass-addons/grass7/imagery/i.modis/i.modis.import/i.modis.import.py
Log:
i.modis: added string casting otherwise pymodis fail

Modified: grass-addons/grass7/imagery/i.modis/i.modis.download/i.modis.download.py
===================================================================
--- grass-addons/grass7/imagery/i.modis/i.modis.download/i.modis.download.py	2018-09-26 20:47:21 UTC (rev 73421)
+++ grass-addons/grass7/imagery/i.modis/i.modis.download/i.modis.download.py	2018-09-26 20:48:15 UTC (rev 73422)
@@ -248,8 +248,8 @@
         modisOgg = downModis(url=prod['url'], user=user, password=passwd,
                              destinationFolder=fold, tiles=tiles, delta=delta,
                              path=prod['folder'], product=prod['prod'],
-                             today=firstday, enddate=finalday, debug=debug_opt,
-                             checkgdal=checkgdal)
+                             today=str(firstday), enddate=str(finalday),
+                             debug=debug_opt, checkgdal=checkgdal)
         # connect to ftp
         modisOgg.connect()
         if modisOgg.nconnection <= 20:

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-09-26 20:47:21 UTC (rev 73421)
+++ grass-addons/grass7/imagery/i.modis/i.modis.import/i.modis.import.py	2018-09-26 20:48:15 UTC (rev 73422)
@@ -177,7 +177,7 @@
             spectr = prod['spec']
         if m:
             spectr = spectr.replace(' 0', '')
-    return spectr
+    return str(spectr)
 
 
 def confile(pm, opts, q, mosaik=False):
@@ -371,8 +371,8 @@
                                            pref.split('.')[1],
                                            pref.split('.')[2])
             outname = outname.replace(' ', '_')
-            execmodis = convertModisGDAL(hdf, outname, spectr, res,
-                                         wkt=projwkt)
+            execmodis = convertModisGDAL(str(hdf), outname, spectr, res,
+                                         wkt=str(projwkt))
         try:
             execmodis.run(quiet=True)
         except:
@@ -451,8 +451,8 @@
                     res = int(prod['res']) * int(projObj.proj['meters'])
                 else:
                     res = None
-                execmodis = convertModisGDAL(hdf, out, spectr, res, wkt=projwkt,
-                                             vrt=True)
+                execmodis = convertModisGDAL(str(hdf), out, spectr, res,
+                                             wkt=str(projwkt), vrt=True)
             try:
                 execmodis.run(quiet=True)
             except:



More information about the grass-commit mailing list