geoseries.to_crs()在使用geopandas计算距离时失败

2024-09-30 01:23:47 发布

您现在位置:Python中文网/ 问答频道 /正文

我想用geopandasseries.distance计算两个lat/log点之间的距离,并用单位米来测量结果,我知道我应该先定义crs,但我尝试了好几次使用to_crs(),但它显示了一个错误:b'no arguments in initialization list'似乎函数从未起作用。有人能帮我解决这个问题吗?在

def wgs84_to_CGCS2000(df,code):
    result=df.to_crs(from_epsg(code))
    return result
city=wgs84_to_CGCS2000(city,4549)
kfc=wgs84_to_CGCS2000(kfc,4549)
^{pr2}$

Tags: tolog距离citydfcode单位result

热门问题