如何将窗口显示为Rasterio Python中的JPG格式?
我在Python中使用Rastrio阅读和可视化Geotiff,我不知道如何导出可视化的窗口。
阅读Geotiff的示例代码。
import rasterio
from matplotlib import pyplot
from rasterio.plot import show
#src = rasterio.open(r'D:\Phenology\00RemoteSensing\clip_ndvi\TIFF\2015.01.01.tif')
src2 = rasterio.open(r'D:\Phenology\00RemoteSensing\Tif_Diem\float64\NDVIMOD09Q1TLcrop2001.01.01_001.tif')
#pyplot.imshow(src.read(1), cmap="Spectral")
#pyplot.show()
#show(src)
pyplot.figure(figsize=(10,10))
#show(src, cmap= "Spectral")
show(src2)
print(src2.height, src2.width)
I reading and visualizing GeoTiff with Rastrio in Python and I do not know how to export visualized window.
The example code for reading geotiff.
import rasterio
from matplotlib import pyplot
from rasterio.plot import show
#src = rasterio.open(r'D:\Phenology\00RemoteSensing\clip_ndvi\TIFF\2015.01.01.tif')
src2 = rasterio.open(r'D:\Phenology\00RemoteSensing\Tif_Diem\float64\NDVIMOD09Q1TLcrop2001.01.01_001.tif')
#pyplot.imshow(src.read(1), cmap="Spectral")
#pyplot.show()
#show(src)
pyplot.figure(figsize=(10,10))
#show(src, cmap= "Spectral")
show(src2)
print(src2.height, src2.width)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论