플롯 윈도우의 크기를 조정할 때 이상한 동작이 나타났습니다. 고려하십시오래스터 점 이상의 유물을 플로팅합니다.
library(sp)
library(rgeos)
library(raster)
rst.test <- raster(nrows=300, ncols=300, xmn=-150, xmx=150, ymn=-150, ymx=150, crs="NA")
sap.krog300 <- SpatialPoints(coordinates(matrix(c(0,0), ncol = 2)))
sap.krog300 <- gBuffer(spgeom = sap.krog300, width = 100, quadsegs = 20)
shrunk <- gBuffer(spgeom = sap.krog300, width = -30)
shrunk <- rasterize(x = shrunk, y = rst.test)
shrunk.coords <- xyFromCell(object = rst.test, cell = which(shrunk[] == 1))
plot(shrunk)
points(shrunk.coords, pch = "+")
창의 크기를 조정하면 플롯 된 점이 기본 래스터와 다른 정도를 갖습니다. 창 크기를 조정하고 shrunk
및 shrunk.coords
을 다시 플롯하면 플롯이 올바르게 나타납니다. 아무도 이것을 설명 할 수 있습니까?