如何将投影(即epsg = 102001)添加到esri.extra中的Geopandas DF,而不是proj_def.dat文件?

问题描述 投票:0回答:1

我有一个Geopandas数据帧,其CRS为epsg:4326,我想将其转换为espg的CRC:102001,它具有如下的proj.4定义:

proj4_102001 = '+proj=aea +lat_1=50 +lat_2=70 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs' 

在我的/ usr / share / proj目录中,投影位于esri.extra文件中,但不在proj_def.dat文件中,如下面的屏幕截图所示:

Screenshot of 1) the results of the Grep command searching for 102001 and 2)an ls of the /usr/share/proj directory

根据Geopandas documentation,定义投影的正确方法如下:

world = world.to_crs({'init': 'epsg:3395'})

我曾尝试过“world = world.to_crs({'init':'esri.extra:102001'})”以及其他一些变体,但都没有。我曾尝试在互联网上搜索包括Proj.4 documentation在内的解决方案,但没有找到任何解决方案。如果您知道如何操作,请告诉我。我使用的是Ubuntu(Ubuntu-18.04),Python(3.7.1),Geopandas(0.4.0)和Proj.4(5.2.0)。

先感谢您。

汤姆

python-3.x geopandas map-projections proj
1个回答
0
投票

您应该能够在to_crs函数中提供完整的投影字符串。

world = world.to_crs('+proj=aea +lat_1=50 +lat_2=70 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs')
© www.soinside.com 2019 - 2024. All rights reserved.