我有一个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文件中,如下面的屏幕截图所示:
根据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)。
先感谢您。
汤姆
您应该能够在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')