简体   繁体   English

使用 Geopandas 时出现无效的投影错误

[英]Invalid Projection error when using Geopandas

When I run the following code is causes CRSError as shown below:当我运行以下代码时,会导致CRSError ,如下所示:

>>> locations = gpd.GeoDataFrame(Data,geometry = points)
>>> locations.crs = ('init','epsg4326')
CRSError: Invalid projection: init:epsg4326: (Internal Proj Error: 
proj_create: crs not found)

What does it mean and how i solve it?这是什么意思以及我如何解决它?

The syntax ('init','epsg:4326') is deprecated, and epsg needs a colon in any case.不推荐使用语法('init','epsg:4326') ,并且epsg在任何情况下都需要冒号。 The following should work:以下应该有效:

locations = gpd.GeoDataFrame(Data, geometry=points)
locations.crs = 'epsg:4326'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM