问题
I have problems concerning reading data using geopandas , but it seems the error is due to fiona according to this post I tried to reinstall fiona to 1.1.6 version, but still it does not work..
import fiona with fiona.open('taz.shp') as src: for feature in src: print feature
---------------------------------------------------------------------------
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
But when I write other similar script, it seems to work
c = fiona.open('taz.shp', 'r')
print c
<open Collection 'taz.shp:taz', mode 'r' at 0x106f51dd0>
回答1:
I went through the same frustration as you until I made it finally working. The following packages work stable together:
GDAL: 1.11.2
Fiona: 1.6.0
Geopandas: 0.1.0.dev-
For detailed explanation on how to install it check out my other post on this issue: https://stackoverflow.com/a/37634515/5853731
来源:https://stackoverflow.com/questions/33428056/fiona-reading-data