首页 > 解决方案 > 如何绘制空间对象的方角?

问题描述

一些数据:

require(sp)
require(rgeos)

pts1 = cbind(seq(50,850,100), 50)
pts2 = cbind(seq(50,850,100), 150)
df = data.frame(1:18)
ptss <- rbind(pts1,pts2)
Spts <- SpatialPointsDataFrame(ptss, df)
sPts.B <- gBuffer(Spts, byid=TRUE, width=48, capStyle="SQUARE")
plot(sPts.B)

结果就是我正在寻找的,一种网格。sPts.Blwd=4导致圆角的正方形绘图,但我想收到方角。使用绘图参数lend只会产生一个方角。

如何让所有的角落都是正方形的?

标签: rplotspatial

解决方案


推荐阅读