TransWikia.com

Band value selection in Google Earth Engine

Geographic Information Systems Asked by Muhammad Hussnain Fareed on June 16, 2021

I am working on Sentinel-5p NO2 data in Google Earth Engine. The band value of ‘NO2_column_number_density’ starts from negative numbers i.e.(Low : -1.34484e-05) but I need low value to be start from 0. Is there any filter in Google Earth Engine to start band values from 0.

One Answer

You can mask the negative pixels so that image band starts from zero. Like this:

var collection = ee.ImageCollection('COPERNICUS/S5P/NRTI/L3_NO2')
  .select('NO2_column_number_density')
  .filterDate('2019-06-01', '2019-06-06');

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

var image = collection.mean()
var image = image.updateMask(image.gte(0)) //mask pixels less than zero.
Map.addLayer(image, band_viz, 'S5P N02');
Map.setCenter(65.27, 24.11, 4);

Answered by kkrao on June 16, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP