1

MNDWI is the normalized difference of Green Band and SWIR Band. In LANDSAT both are of a similar resolution i.e. 30m.

In the case of LANDSAT

var landsat8 = ee.Image("LANDSAT/LC08/C01/T1_RT_TOA/LC08_148044_20130425")
var ndwi = image.normalizedDifference(['B3', 'B6']).rename('MNDWI')

gives us MNDWI Band

whereas in the case of Sentinel 2 the resolutions of Green Band (B3 is 10m) and SWIR Band (B11 is 20m) are different.

How to change SWIR Band to more finer resolution so that I can apply normalized difference?

2 Answers 2

1

You might want consider going through the earth engine documentation: https://developers.google.com/earth-engine/resample

Basically you want to define the projections of both bands before doing the calculation. Changing the scale suggests you need to set the scale parameter in .reproject()

I guess you could following this workflow: https://leclab.wixsite.com/spatial/post/pansharpening-sentinel-2-imagery-in-google-earth-engine

0

normalizedDifference(['B3', 'B6']) means (Band 3-Band 6)/(Band 3 + Band 6), what you need to do is substitute the band number as you wish.

1
  • Sorry, I know what normalized difference means but I think we cannot apply Normalized difference for the bands whose resolutions are different. Jun 30, 2019 at 7:22

Your Answer

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

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