Spaces:
Sleeping
Sleeping
update indices
Browse files- functions.py +2 -2
functions.py
CHANGED
|
@@ -311,9 +311,9 @@ def add_indices(image, nir_band, red_band, blue_band, green_band, swir_band, swi
|
|
| 311 |
gujevi = image.expression(
|
| 312 |
'0.5 * (NIR - RED) / (NIR + 6 * RED - 8.25 * BLUE - 0.01)', {
|
| 313 |
'NIR': nir, 'RED': red, 'BLUE': blue
|
| 314 |
-
}).rename('GujEVI')
|
|
|
|
| 315 |
mndwi = image.normalizedDifference([green_band, swir_band]).rename('MNDWI')
|
| 316 |
-
|
| 317 |
savi = image.expression('(1 + L) * (NIR - RED) / (NIR + RED + L)', {
|
| 318 |
'NIR': nir, 'RED': red, 'L': 0.5
|
| 319 |
}).rename('SAVI')
|
|
|
|
| 311 |
gujevi = image.expression(
|
| 312 |
'0.5 * (NIR - RED) / (NIR + 6 * RED - 8.25 * BLUE - 0.01)', {
|
| 313 |
'NIR': nir, 'RED': red, 'BLUE': blue
|
| 314 |
+
}).clamp(0, 1).rename('GujEVI')
|
| 315 |
+
|
| 316 |
mndwi = image.normalizedDifference([green_band, swir_band]).rename('MNDWI')
|
|
|
|
| 317 |
savi = image.expression('(1 + L) * (NIR - RED) / (NIR + RED + L)', {
|
| 318 |
'NIR': nir, 'RED': red, 'L': 0.5
|
| 319 |
}).rename('SAVI')
|