我正在尝试让python读取geoTIFF图像,但在尝试让图像显示时遇到困难
import rasterio as r
import numpy as np
import matplotlib.pyplot as plt
FNF=r'D:\\Iceberg data\\RADARSAT\\RS2_SLC_geotif\\roi20m_RS2_20160415_153940_0004_FQ13_HHVVHVVH_SLC_470697_4660_12996414_Geo.tif\\'
raster = r.open(FNF)
print(raster)
raster.bounds
raster.height
raster.width
raster.transform
raster.get_transform()
raster.tags(1)
xmin=raster.bounds[0]
ymax=raster.bounds[3]
raster.read(1)
fig = plt.figure(1)
plt.title('SLC image') # this defines the title
plt.imshow(raster)
我用imshow得到了错误。我做错了什么
当我做{i: dtype for i, dtype in zip(raster.indexes, raster.dtypes)}
的时候,我得到了float32
目前没有回答
相关问题 更多 >
编程相关推荐