简体   繁体   English

是否有 R 函数将栅格写入带有颜色图的浮动 Geotiff?

[英]Is there an R function to write raster as float Geotiff with colormap?

I tried solution from answers to this question Write classified raster with its symbology I used function writeGDAL(r, outRstName, type="Byte" etc.) but it only works with type "Byte", which include only integers from 0 to 256.我尝试从这个问题的答案中解决解决方案使用其符号系统编写分类栅格我使用了函数 writeGDAL(r, outRstName, type="Byte" etc.) 但它仅适用于类型“Byte”,其中仅包含 0 到 256 的整数。

Is there solution for floats?有没有浮动的解决方案? I want to use it for data like air temperature maps.我想将它用于气温图等数据。 I save it with writeraster(format="GTiff") and it works well with floats.我用 writeraster(format="GTiff") 保存它,它适用于浮点数。 I want to add color palette to have it with color for use in Arcgis.我想添加调色板以使其具有可在 Arcgis 中使用的颜色。

Many thanks in advance,提前谢谢了,

Anastasiia.阿纳斯塔西娅。

No, that is not possible.不,那是不可能的。 You can only store a color table with Byte or short integer values --- it is a restriction of the GeoTIFF file format.您只能存储带有字节或短整数值的颜色表——这是 GeoTIFF 文件格式的限制。 An ArcGIS color palette is a different thing altogether, I think.我认为 ArcGIS 调色板完全不同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM