Notifications
Clear all

GEE: identify the value range of imagery


Robbie
(@robbie)
New Member
Joined: 2 months ago
Posts: 1
Topic starter  

Hi all, I have a question regarding displaying imagery in GEE. When I am trying to display a sentinel 2 image and use the following code for displaying, it all goes well:

var trueColor ={
bands: ['B4', 'B3', 'B2'],
min: 500,
max:1001,
}; 

Now I try to apply this to landsat 8 imagery. As the bit depth is different and range of pixel values is different I obviously need to change my min and max values here. However, I have troubles finding the correct range for the area I am looking at. Is there a way to get a histogram of the pixel values so that I can adjust the min and max values more precisely. Or is there another way to get a better idea of what some good values would be here. My image just turns out completely black or completely white, all the time. Perhaps there is something else I am doing wrong. 

var image_ls8_2016 = ee.Image(ls8.filterDate('2016-01-01',"2017-01-01").filterBounds(location).sort("CLOUD_COVER").first());


var trueColor ={
bands: ["B4","B3","B2"],
min:500,
max:1000,
};

Map.addLayer(image_ls8_2016, trueColor, "ls8_2016");

Thanks!

 


Quote
Share: