【发布时间】:2021-09-10 10:09:56
【问题描述】:
我有一些经纬度的点。我想设置 CRS 来计算距离。我试图设置 CRS,但它在 (function (classes, fdef, mtable) 中显示错误“错误: 无法找到签名“CRS”的函数“proj4string”的继承方法
long <- c(133.2982, 132.6715,133.2375,133.3048,133.2594,133.2165)
lat <- c(35.5716,35.3551,35.5504,35.5707,35.5680,35.5708)
lonlat <-data.frame(cbind(long,lat))
pj <- sp::CRS("+proj=longlat +datum=WGS84")
fetch_locs = sp::SpatialPoints(lonlat[,1:2],
sp::CRS(proj4string(pj)))
【问题讨论】: