无法使用 geopandas 加载 geojson 文件

问题描述

我正在尝试使用

将 geojson 文件加载到 Jupyter 笔记本中
import geopandas as gpd

country = gpd.read_file(r"‪path-to-file\svn_border.geojson")

它返回以下错误

CPLE_OpenFailedError: '‪‪path-to-file\svn_border.geojson' does not exist in the file system,and is not recognized as a supported dataset name.

fiona\ogrext.pyx in fiona.ogrext.Session.start()

fiona\_shim.pyx in fiona._shim.gdal_open_vector()

DriverError: '‪‪path-to-file\svn_border.geojson' does not exist in the file system,and is not recognized as a supported dataset name.

我使用的是 Python 3.6.8、Fiona 1.18、GDAL 3.1.4。即使我尝试将 geojson 文件内容上传为 json 格式,它也会出现相同的错误

我已经在同一错误上工作了好几天了,有人能指出我的错误吗?

编辑:在尝试验证我拥有的 geojson 文件后,结果发现它们已损坏。我使用了一个示例 geojson 文件效果很好。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)