打印一个转换为栅格的shapefile

发布于 2025-01-18 16:45:37 字数 505 浏览 2 评论 0原文

我将 shapefile 转换为栅格,它具有奇数格式。当我尝试将其绘制为栅格时,颜色基于 id,但我想弄清楚如何根据死亡或病例值对其进行着色。

代码:

rasterEmpty = raster(ncol=36000, nrow=18000)
rasterNations = rasterize(nations, rasterEmpty)
plot(rasterNations)

我将转换后的栅格写入 .nc 文件,当我加载它时,它没有相同的格式。

I converted a shapefile into a raster, and it has odd format. When I try to plot it as a raster, colors are based on the id, but I want to figure out how to color it based on the deaths or cases values.

Code:

rasterEmpty = raster(ncol=36000, nrow=18000)
rasterNations = rasterize(nations, rasterEmpty)
plot(rasterNations)

I wrote the converted raster to a .nc file, and when I load it in, it doesn't have the same format.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文