确定Shapefile的面积

use*_*534 5 r geospatial

如何确定shapefile的区域?

当我使用时summary(data),它给出了区域,但是我不知道每个shapefile多边形的区域是什么.

此外,该区域可以转换为米?

Gar*_*man 8

# 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
Run Code Online (Sandbox Code Playgroud)