我有一个简单的栅格,它通过栅格数据包中的filledContour函数运行,以给出一个填充的轮廓图。
我正在尝试在此填充轮廓图的顶部覆盖多边形的轮廓,但遇到了麻烦。
读取fill.contour中的注释-必须在plot.axis部分中完成填充轮廓线的添加操作,但是没有任何运气。
到目前为止,我有这样的事情:
library(raster)
library(rgdal)
test_raster <- raster("test_raster.grd")
test_Shapefile <- readOGR("test_shapefile.shp")
test_filled_contour <- filledContour(test, maxpixels=100000, plot.axes = {
axis(1)
axis(2)
map(test_Shapefile, add=T)
})
栅格和shapefile都使用相同的坐标系。
欢迎您的帮助,如果需要,我可以提供数据。