r - 确定形状文件的区域

标签 r geospatial

如何确定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/

相关文章:

r - 在 ggplot 中绘制具有 Gamma 分布的模型

r - 如何在 ggplot2 中绘制置信区间限制的虚线?工作室R

mongodb - 如何使用 Mongoid 执行 $geoIntersects 查询?

grails - 如何在 Grails 中实现空间(地理位置)搜索?

postgresql - 多边形联合(地理类型为 ST_UNION)

mysql - mysql中计算空间距离并按距离排序

R Shiny : Dynamic Row of Action Buttons

r - 为什么 knitr 不尊重 RStudio 项目细节?

r - 在 R 中计算频率

sqlite - 基于纬度/经度查询附近兴趣点的 SQL 查询 - SQLite