You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to create mosaic and reproject the created mosiac. However, after the creation of the mosaic I am getting an empty list for layers which results in an error for reprojection.
`only_hdf = []
subset = [1,0,0]
for file in hdf:
if file.endswith('.hdf'):
only_hdf.append(os.path.join(r'D:\CAMP4ASB\MOLT\MOD17A2H.006\2021.03.14', file))
So this code creates the mosaic successfully, however, the reprojection is not working with following error:
File "C:/Users/Gigabyte/PycharmProjects/CAMP4ASB/test.py", line 14, in <module> rep.run() File "C:\Users\Gigabyte\PycharmProjects\pythonProject\DSP\lib\site-packages\pymodis\convertmodis_gdal.py", line 289, in run self._createWarped(self.layers[0][0]) IndexError: list index out of range
and src_ds = gdal.Open('geo123_Gpp_500m.tif') layers = src_ds.GetSubDatasets()
showing an empty list.
Can you please help on that? Why is the reason? Qgis is opening correctly.
Python version 3.7.7 and GDAL 2.4.1
The text was updated successfully, but these errors were encountered:
Hello everyone!
I am trying to create mosaic and reproject the created mosiac. However, after the creation of the mosaic I am getting an empty list for layers which results in an error for reprojection.
`only_hdf = []
subset = [1,0,0]
for file in hdf:
if file.endswith('.hdf'):
only_hdf.append(os.path.join(r'D:\CAMP4ASB\MOLT\MOD17A2H.006\2021.03.14', file))
mosaic = convertmodis_gdal.createMosaicGDAL(only_hdf, [1,0,0], 'GTiff')
mosaic.run(prefix)`
So this code creates the mosaic successfully, however, the reprojection is not working with following error:
File "C:/Users/Gigabyte/PycharmProjects/CAMP4ASB/test.py", line 14, in <module> rep.run() File "C:\Users\Gigabyte\PycharmProjects\pythonProject\DSP\lib\site-packages\pymodis\convertmodis_gdal.py", line 289, in run self._createWarped(self.layers[0][0]) IndexError: list index out of range
and
src_ds = gdal.Open('geo123_Gpp_500m.tif') layers = src_ds.GetSubDatasets()
showing an empty list.
Can you please help on that? Why is the reason? Qgis is opening correctly.
Python version 3.7.7 and GDAL 2.4.1
The text was updated successfully, but these errors were encountered: