Skip to content

writeRaster to TIF changes raster maximum value

1 message · Guillaume Drolet

#
Hi Robert,

Following my previous post, I tried with a smaller extent than the one
that was used previously:

e <- extent(457785, 516302, 5147085, 5217408)

For the rest, I ran the same code as before:
class       : RasterLayer
dimensions  : 2344, 1951, 4573144  (nrow, ncol, ncell)
resolution  : 30, 30  (x, y)
extent      : 457785, 516315, 5147085, 5217405  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=utm +zone=18 +datum=WGS84 +units=m +no_defs
+ellps=WGS84 +towgs84=0,0,0
data source : E:\temp\Fmask\Image_sub\L71015027_02720000730_B10.tif
names       : L71015027_02720000730_B10
values      : 0, 255  (min, max)

Don't know why but the minimum is now 0, while for the extent we used
before (which was larger) the minimum value was 1...

There are definitely some behaviour I don't quite get in all this...

Thanks,

Guillaume



2013/9/17  <Guillaume.Drolet at mrn.gouv.qc.ca>: