如何使用Python显示Geotiff图像

时间:2016-09-15 14:41:50

标签: python-2.7 geospatial gdal rasterio

我是Python2.7的新手,并尝试使用wheel文件安装rasterio,但仍然出现以下错误:

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import rasterio
  File "D:\Python\lib\site-packages\rasterio\__init__.py", line 23, in <module>
    from rasterio._base import (
ImportError: DLL load failed: The specified module could not be found.

3 个答案:

答案 0 :(得分:2)

我不小心删除了我的旧评论,这是代码:

from osgeo import gdal
import matplotlib.pyplot as plt



ds = gdal.Open('filename.tif').ReadAsArray()

im = plt.imshow(ds)

这样可行。

答案 1 :(得分:0)

我不熟悉Rasterio,但如果您正在寻找一些图书馆进行图像分析或只是显示地理图像,您可以查看opencv python库。

链接:OpenCV3

答案 2 :(得分:0)

TuiView是一个基于PyQt的开源轻量级Raster GI。它可在Windows,Mac和Linux上使用:http://tuiview.org