R Raster Merge Changes Values -


i have series of gtiff images trying merge single larger extent. 6 small tiles need combined generate larger extent. original 6 tiles have values range 0 255.

for example:

> tiff.list[[1]] class       : rasterlayer  dimensions  : 1200, 1200, 1440000  (nrow, ncol, ncell) resolution  : 926.6254, 926.6254  (x, y) extent      : -10007555, -8895604, 2223901, 3335852  (xmin, xmax, ymin, ymax) coord. ref. : +proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371007.181 +b=6371007.181 +units=m +no_defs  data source : d:\scratch\data\mod15a2.a2016153.h09v06.005.2016166083754.tif  names       : mod15a2.a2016153.h09v06.005.2016166083754  values      : 0, 255  (min, max) 

however, when merging tiles using code detailed here, new image file , values have changed:

> xx class       : rasterlayer  dimensions  : 2400, 3600, 8640000  (nrow, ncol, ncell) resolution  : 926.6254, 926.6254  (x, y) extent      : -10007555, -6671703, 1111951, 3335852  (xmin, xmax, ymin, ymax) coord. ref. : +proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371007.181 +b=6371007.181 +units=m +no_defs  data source : d:\scratch\modis\a2016161.tif  names       : a2016161  values      : 0, 25  (min, max) 

does know why happening? i've tried changing file format , datatype ('int1u') keeps happening. it's important values don't change 0 255 original data comes nasas modis satellite , values (i.e. 248-255) have specific fill values associated them (for example, land cover assigned water or snow). change max value of 255 25 removing important information original files.

any assistance provided welcome.

this suggests these values absent in original files. min , max values reported original files based on metadata provided therein. metadata wrong (showing range of possible, not actual values). investigate

setminmax(tiff.list[[1]]) 

or

tiff.list[[1]] * 1 

Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -