The 1 arc-second DEM's work fine, but after clipping and exporting a smaller part of my DEM, I get this attribute error. Is there any way I could clip a DEM without this issue?
AttributeError Traceback (most recent call last)
in
----> 1 grid = Grid.from_raster('C:/Users/18683/Desktop/Datasets/DEM/DEM.tif', data_name='dem')
~\miniconda3\lib\site-packages\pysheds\grid.py in from_raster(cls, path, data_name, **kwargs)
315 def from_raster(cls, path, data_name, **kwargs):
316 newinstance = cls()
--> 317 newinstance.read_raster(path, data_name, **kwargs)
318 return newinstance
319
~\miniconda3\lib\site-packages\pysheds\grid.py in read_raster(self, data, data_name, band, window, window_crs, metadata, **kwargs)
274 shape = f.shape
275 if len(f.indexes) > 1:
--> 276 data = np.ma.filled(f.read_band(band))
277 else:
278 data = np.ma.filled(f.read())
AttributeError: 'DatasetReader' object has no attribute 'read_band'
The 1 arc-second DEM's work fine, but after clipping and exporting a smaller part of my DEM, I get this attribute error. Is there any way I could clip a DEM without this issue?
AttributeError Traceback (most recent call last)