Spaces:
Running
Running
Commit
·
2d99dbc
1
Parent(s):
f90ad6d
Reverting to first version of NDBI
Browse files
io-app-backend/terramindFunctions.py
CHANGED
|
@@ -29,7 +29,7 @@ NORMALIZATION_MODE = "offset"
|
|
| 29 |
NDWI_THRESHOLD = 0.1
|
| 30 |
MNDWI_THRESHOLD = 0.1
|
| 31 |
NDVI_THRESHOLD = 0.3
|
| 32 |
-
NDBI_THRESHOLD = 0.
|
| 33 |
BSI_THRESHOLD = 0.1
|
| 34 |
|
| 35 |
USE_WATER_CORRECTION = True
|
|
@@ -350,7 +350,7 @@ def calculate_spectral_indices(input_tensor):
|
|
| 350 |
indices['awei'] = 4 * (green - swir1) - (0.25 * nir + 2.75 * swir2)
|
| 351 |
indices['ndvi'] = (nir - red) / (nir + red + eps)
|
| 352 |
indices['evi'] = 2.5 * (nir - red) / (nir + 6 * red - 7.5 * blue + 1 + eps)
|
| 353 |
-
indices['ndbi'] = (swir1 -
|
| 354 |
indices['bsi'] = ((swir1 + red) - (nir + blue)) / ((swir1 + red) + (nir + blue) + eps)
|
| 355 |
|
| 356 |
return indices
|
|
|
|
| 29 |
NDWI_THRESHOLD = 0.1
|
| 30 |
MNDWI_THRESHOLD = 0.1
|
| 31 |
NDVI_THRESHOLD = 0.3
|
| 32 |
+
NDBI_THRESHOLD = 0.0
|
| 33 |
BSI_THRESHOLD = 0.1
|
| 34 |
|
| 35 |
USE_WATER_CORRECTION = True
|
|
|
|
| 350 |
indices['awei'] = 4 * (green - swir1) - (0.25 * nir + 2.75 * swir2)
|
| 351 |
indices['ndvi'] = (nir - red) / (nir + red + eps)
|
| 352 |
indices['evi'] = 2.5 * (nir - red) / (nir + 6 * red - 7.5 * blue + 1 + eps)
|
| 353 |
+
indices['ndbi'] = (swir1 - nir) / (swir1 + nir + eps)
|
| 354 |
indices['bsi'] = ((swir1 + red) - (nir + blue)) / ((swir1 + red) + (nir + blue) + eps)
|
| 355 |
|
| 356 |
return indices
|