我正在阅读 R 中的 .tif 文件并收到下面列出的 4 条警告消息。当我按照第 4 条消息的说明进行操作时,前 3 个警告仍然存在,但从文件中读取的值在每个像素处都会发生巨大变化。请帮助我从 .tif 文件中正确读取数据。示例文件可在以下链接中找到:ftp: //ftp.ntsg.umt.edu/pub/MODIS/NTSG_Products/MOD16/MOD16A2_MONTHLY.MERRA_GMAO_1kmALB/GEOTIFF_0.05degree/
我的代码:
remove(list=ls())
library(tiff)
library(raster)
str_name<-'MOD16A2_ET_0.05deg_GEO_2008M01.tif'
read_file<-readTIFF(str_name)
警告信息:
1: In readTIFF(str_name) :
TIFFReadDirectory: Unknown field with tag 33550 (0x830e) encountered
2: In readTIFF(str_name) :
TIFFReadDirectory: Unknown field with tag 33922 (0x8482) encountered
3: In readTIFF(str_name) :
TIFFReadDirectory: Unknown field with tag 34735 (0x87af) encountered
4: In readTIFF(str_name) :
tiff package currently only supports unsigned integer or float sample formats in direct mode, but the image contains signed integer format - it will be treated as unsigned (use native=TRUE or convert=TRUE to avoid this issue)
请帮助我解决正确读取 tif 文件的问题。提前致谢。