1

给定一组坐标

 lat <- c(47.2325618, 47.2328269, 47.2330041, 47.2330481, 47.2330914, 
          47.2331172, 47.2331291, 47.2331499)
 lon <- c(11.3707441, 11.3707791, 11.3708087, 11.3708031, 11.3707818, 
          11.3707337, 11.3706588, 11.370284)
coords <- cbind(lon,lat)

我想计算多边形的面积。我使用areapl()package splancs中的函数:

library(splancs)
areapl(coords)
# [1] 1.4768e-07

这给我留下了一个以度为单位的维度(?)。所以我的问题是:我如何将其转换为米/公里?

提前非常感谢。

4

1 回答 1

5

spTransform在包中使用转换为笛卡尔网格系统(例如 UTM 区域) ,或在包sp中尝试。areaPolygongeosphere

> areaPolygon(coords)
[1] 7688.568
于 2012-09-27T15:03:04.407 回答