0
我是GDAL的新手。我使用的分類TM遙感影像,但我將這些代碼行帶數據只是給我0,有什麼我不明白:樂隊如何讀取數組只是返回我0,我該怎麼辦?
raster_dataset = gdal.Open(‘LC81850552017065LGN00_B3.tif’, gdal.GA_ReadOnly)
geo_transform = raster_dataset.GetGeoTransform()
proj = raster_dataset.GetProjectionRef()
bands_data = []
for b in range(1, raster_dataset.RasterCount+1):
band = raster_dataset.GetRasterBand(b)
bands_data.append(band.ReadAsArray())
bands_data = np.dstack(bands_data)