小编pum*_*ger的帖子

Python绘制底图时出现“EPSG代码未知”?

我试图通过 Contextily 将底图添加到我的绘图中,但在尝试查看绘图时收到此错误。

Traceback (most recent call last):
  File "rasterio/_crs.pyx", line 322, in rasterio._crs._CRS.from_epsg
  File "rasterio/_err.pyx", line 192, in rasterio._err.exc_wrap_int
rasterio._err.CPLE_AppDefinedError: PROJ: proj_create_from_database: /opt/anaconda3/share/proj/proj.db lacks DATABASE.LAYOUT.VERSION.MAJOR / DATABASE.LAYOUT.VERSION.MINOR metadata. It comes from another PROJ installation.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/anaconda3/lib/python3.8/site-packages/matplotlib/cbook/__init__.py", line 196, in process
    func(*args, **kwargs)
  File "/opt/anaconda3/lib/python3.8/site-packages/matplotlib/widgets.py", line 1051, in _clicked
    self.set_active(closest)
  File "/opt/anaconda3/lib/python3.8/site-packages/matplotlib/widgets.py", line 1077, in set_active
    func(self.labels[index].get_text())
  File "vis.py", line 1109, in draw_basemap
    ctx.add_basemap(ax, crs=properties_geo.crs.to_string())
  File …
Run Code Online (Sandbox Code Playgroud)

python geopandas contextily

5
推荐指数
0
解决办法
1139
查看次数

标签 统计

contextily ×1

geopandas ×1

python ×1