如何确定shapefile的区域?
当我使用 summary(data)
,它给出了面积,但是我不知道每个 shapefile 多边形的面积是多少。
另外,面积可以换算成米吗?
最佳答案
# load the rgeos library
library(rgeos)
# make a polygon (borrowed from ref manual for package)
sample_poly <- readWKT("POLYGON((0 1,0.95 0.31,0.59 -0.81,-0.59 -0.81,-0.95 0.31,0 1))")
# and calculate the area
gArea(sample_poly)
[1] 2.3803
关于r - 确定形状文件的区域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23037367/