I want to rescale the Landsat-8 SR image using the rescale factor in the documentation, which is 0.0001 for each band. I assume that the original values are DN values, and after rescaling I can get reflectance values (Is it right?).
After applying the rescaling factor the image only shows 0 values. I am also using a .int16()
to keep it as an integer, but it does not work. It seems that I am missing some steps in this process.
This is the code:
// Landsat 8 - Image
var image = ee.Image("LANDSAT/LC08/C01/T1_SR/LC08_016039_20190107");
// Rescale image
var rescale = image.divide(10000).int16()
//RGB color palette
var rgbVis = {
min: 0,
max: 2000,
bands: ['B4', 'B3', 'B2'],
};
var rgbVis2 = {
min: 0,
max: 0.2,
bands: ['B4', 'B3', 'B2'],
};
// Add to map
Map.centerObject(rescale)
Map.addLayer(image, rgbVis, 'Original');
Map.addLayer(rescale, rgbVis, 'Rescaled');
Link to the code editor: https://code.earthengine.google.com/abb6f59a90864368dd462e3267072834