Skip to content
Prev 27963 / 29559 Next

issue when opening raster image in R, the pixel values a rescaled somehow

Please make the file in question available for download (url), or the url you downloaded it from (no login), on this list. It looks as though the unsigned 16 bit integer is not right.

Roger Bivand
Norwegian School of Economics
Bergen, Norway

________________________________
Fra: R-sig-Geo <r-sig-geo-bounces at r-project.org> p? vegne av Victor F. Rodriguez Galiano <vrgaliano at gmail.com>
Sendt: mandag 23. mars 2020, 21.02
Til: r-sig-geo at r-project.org
Emne: [R-sig-Geo] issue when opening raster image in R, the pixel values a rescaled somehow

I opened a Geotiff image in R using the raster function. However, the image seems to be rescaled. The minimum and maximum values should be 13607 and 15461 but are 275 and 305. The Geotiff image when opened in a GIS is correct but not in R. This is my code: Script: library(raster) trial<-raster("MOD11A2.A2000049.h17v05.006.2015058135048.tif", datatype = "INT2U") trial plot(trial) [[alternative HTML version deleted]] _______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo