0

I am working on GEE using Sentinel 5P methane dataset. The min and max band value for this dataset is 1750 and 1900 ppb respectively. When I run the code using this value, I get majority areas to be in max value region, i.e., red color. Can I change this default band value so that I can see a pattern in the map? The following is the code I used:

var CH4 = ee.ImageCollection("COPERNICUS/S5P/OFFL/L3_CH4")

var ROI = table.filter(ee.Filter.eq('country_co','IN'))
Map.addLayer(ROI)
Map.centerObject(ROI,10)

var CH4bands = CH4.select('CH4_column_volume_mixing_ratio_dry_air')

var image = CH4bands.filterBounds(ROI)

var CH4filterdate = image.filterDate('2022-01-01','2022-02-28')

var percentileCH4 = CH4filterdate.reduce(ee.Reducer.percentile([60]))

var band_viz = {
  min: 1750,
  max: 1900,
  palette: ['black', 'blue', 'purple', 'cyan', 'green', 'yellow', 'red']
};

var study_area = percentileCH4.clip(ROI)

Map.addLayer(study_area, band_viz)

Link: https://code.earthengine.google.com/9c9adeecb74679a3b921f105ab1d07ca

2 Answers 2

0

Rather than change the values of the band, you can change how the values are stretched when displaying.

In the corner of the map, click the gear next to your layer. Where it says custom choose an option. Play with that until you have one you like, then you can copy those values into your script. Visualization parameters for a layer

Here's what the above setting looks like. It's the 2 sigma stretch.

enter image description here

1
  • 1
    Thank you very much for the answer. As a beginner in GEE, I didn't know what to do in this situation. So, this is very helpful.
    – Aiswarya
    Commented May 30, 2022 at 5:39
0

https://code.earthengine.google.com/e7a7d69f8fcc07aadc0b61d72f878638 I guess that's what you need。

1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented May 27, 2022 at 12:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.