菲奥娜读取数据

Fiona reading data

我在使用 geopandas 读取数据时遇到问题,但根据这个,错误似乎是由于 fiona post 我尝试将 fiona 重新安装到 1.1.6 版本,但仍然无法正常工作..

进口菲奥娜 以 fiona.open('taz.shp') 作为 src: 对于 src 中的功能: 打印功能

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-31-b70513efc12b> in <module>()
      1 import fiona
      2 with fiona.open('taz.shp') as src:
----> 3     for feature in src:
      4         print feature

fiona/ogrext.pyx in fiona.ogrext.Iterator.__next__ (fiona/ogrext.c:17244)()

fiona/ogrext.pyx in fiona.ogrext.FeatureBuilder.build (fiona/ogrext.c:3254)()

IndexError: list index out of range

但是当我写其他类似的脚本时,它似乎可以工作

c = fiona.open('taz.shp', 'r')
print c
<open Collection 'taz.shp:taz', mode 'r' at 0x106f51dd0>

我经历了和你一样的挫败感,直到我终于成功了。以下包一起稳定工作:

GDAL: 1.11.2
Fiona: 1.6.0
Geopandas: 0.1.0.dev- 

有关如何安装它的详细说明,请查看我关于此问题的其他 post: