【问题标题】:Geopandas (read_file) CRSError Message in JupyterlabJupyterlab 中的 Geopandas (read_file) CRSError 消息
【发布时间】:2021-01-08 04:49:09
【问题描述】:

当我尝试使用 geopandas 在 jupyterlab 中打开 shapefile 时收到错误消息。

我的代码:

import geopandas as gpd
shapefile = gpd.read_file("urban.shp")

错误信息:

CRSError                                  Traceback (most recent call last)
<ipython-input-7-1d7660c631f4> in <module>
      1 import geopandas as gpd
----> 2 shapefile = gpd.read_file("urban.shp")

。 . . . .
pyproj/_crs.pyx in pyproj._crs._CRS.init()

CRSError: Invalid projection: epsg:32633: (Internal Proj Error: proj_create: SQLite error on SELECT name, coordinate_system_auth_name, coordinate_system_code, geodetic_crs_auth_name, geodetic_crs_code, conversion_auth_name, conversion_code, area_of_use_auth_name, area_of_use_code, text_definition, deprecated FROM projected_crs WHERE auth_name = ? AND code = ?: no such column: area_of_use_auth_name)

prj文件有以下信息:

PROJCS["WGS_1984_UTM_Zone_33N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",15.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]

我重新安装了 pyproj;项目; geopanda,但麻烦仍然存在。 提前致谢。

【问题讨论】:

    标签: python-3.x jupyter-lab geopandas


    【解决方案1】:

    您的 CRS 定义似乎没问题,应该是与您的环境有关的问题。 您可以在任何桌面应用程序中成功打开 shapefile 吗?

    您使用的是什么版本的 Python 和 Geopandas?

    【讨论】:

    • 嗨 Deniz 是的,我可以在其他桌面应用程序中打开我的 shapefile,例如 ArcMap。我正在使用 Python 3.8 和 Geopandas 0.81 感谢您的帮助
    • 我尝试了类似的配置,但使用相同的投影没有任何错误。
    猜你喜欢
    • 2021-03-07
    • 1970-01-01
    • 2021-05-31
    • 1970-01-01
    • 1970-01-01
    • 2023-02-14
    • 1970-01-01
    • 2020-02-11
    • 2021-04-16
    相关资源
    最近更新 更多