New answers tagged

0

It's best to avoid for loops in cases like this. Using the NDWI calculation described here (which is also what you list above) you can map an NDWI calculator to your imageCollection. I had to remove some of your functions that were mapped to the image collection because they weren't defined in the code you provide, but this should give you the general gist ...


0

There are at least two other ways to calculate the NDWI for the image other than the .normalizedDifference function. Here are examples adapted from http://www.malfihasan.com I'm assuming you want the NDWI fomula from McFeeters (1996) using green and near IR bands. // // NDWI expression var ndwiL8 = mosaic_L8.expression( '(G - NIR) / (G + NIR)' , { 'NIR' : ...


Top 50 recent answers are included