0

我正在通过 libpysal 库在 Python 中运行空间回归。为了获得空间权重,我的数据框中的输入数据如下所示(匀称点):

0    POINT (50.03771 14.32943)
1    POINT (50.10815 14.39488)
2    POINT (50.01611 14.53056)
3    POINT (50.07254 14.46753)
4    POINT (50.02791 14.51335)
5    POINT (50.03728 14.34139)
6    POINT (50.04956 14.31686)
7    POINT (50.04254 14.33117)
8    POINT (50.10283 14.5492)
9    POINT (49.96596 14.38119)

以及获取权重的代码:

knn_spatial = libpysal.weights.KNN.from_dataframe(df,geom_col = 'new_geo', k = 3)

band_spatial = libpysal.weights.DistanceBand.from_dataframe(df,geom_col = 'new_geo',
                                                            threshold = 0.0005)

我现在想知道这种方法是否正确,因为我的输入点不在笛卡尔坐标系中,但它们是地理坐标。这是计算距离权重矩阵的有效方法,还是我需要将 GPS 转换为笛卡尔坐标?

非常感谢!

4

0 回答 0