当我将数据框保存为带有几何形状的 shapefile 时,出现以下错误。
geometry = [Point(xy) for xy in zip(df.longitude, df.latitude)]
dfout = geopandas.GeoDataFrame(df, geometry=geometry)
dfout.to_file(outputpath, driver='ESRI Shapefile')
Traceback (most recent call last):
File "test.py", line 230, in <module>
main()
File "test.py", line 223, in main
createSHP(df,outputpath)
File "test.py", line 150, in createSHP
dfout.to_file(outputpath, driver='ESRI Shapefile')
File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/geopandas/geodataframe.py", line 343, in to_file
to_file(self, filename, driver, schema, **kwargs)
File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/geopandas/io/file.py", line 61, in to_file
schema=schema, **kwargs) as c:
File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/fiona/__init__.py", line 178, in open
enabled_drivers=enabled_drivers, crs_wkt=crs_wkt)
File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/fiona/collection.py", line 155, in __init__
self.session.start(self, **kwargs)
File "fiona/ogrext.pyx", line 961, in fiona.ogrext.WritingSession.start (fiona/ogrext.c:16015)
ValueError: 'bool' is not in list
我无法找出这个错误的含义。