【发布时间】:2019-05-23 17:21:59
【问题描述】:
Geopandas 在读取 SHP 文件时引发驱动程序错误。
DriverError: '*PATH*/cb_2018_us_zcta510_500k.shp does not exist in the file system, and is not recognized as a supported dataset name.
我所做的只是:
import geopandas
geopandas.read_file("*PATH*/cb_2018_us_zcta510_500k.shp")
从中提取的目录包括从此处下载的所有其他所需文件:
https://www.census.gov/geographies/mapping-files/time-series/geo/carto-boundary-file.html
实际文件在这里: https://www2.census.gov/geo/tiger/GENZ2018/shp/cb_2018_us_zcta510_500k.zip
只是为了确认文件没有损坏或我在 QGis 中打开它的任何内容,并且它完美地拉起。
【问题讨论】:
-
GeoPandas 在我的系统上正确导入该文件。您确定您指定的文件路径正确吗?
-
是的,这是正确的位置。我能够将其复制粘贴到 Windows 资源管理器中,并且可以正常工作。
标签: python driver gis geopandas