首页 > 解决方案 > 在(光栅)填充轮廓图上覆盖 shapfile

问题描述

我有一个简单的栅格,它通过 raster 包中的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 都使用相同的坐标系。

欢迎任何帮助,如果需要,我可以提供数据。

标签: rshinypolygonrastercontour

解决方案


推荐阅读