From b21b919b4fbdeeb93eb39afd2fa3efdfa4ff3035 Mon Sep 17 00:00:00 2001 From: usplm Date: Thu, 3 Feb 2022 14:46:38 -0500 Subject: [PATCH] Added NDWI formula --- app/api/formulas.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/api/formulas.py b/app/api/formulas.py index b4cfe9ae..52d15689 100644 --- a/app/api/formulas.py +++ b/app/api/formulas.py @@ -11,6 +11,10 @@ algos = { 'expr': '(N - R) / (N + R)', 'help': _('Normalized Difference Vegetation Index shows the amount of green vegetation.') }, + 'NDWI': { + 'expr': '(G - N) / (G + N)', + 'help': _('Normalized Difference Water Index shows the amount of water content in water bodies.') + }, 'NDVI (Blue)': { 'expr': '(N - B) / (N + B)', 'help': _('Normalized Difference Vegetation Index shows the amount of green vegetation.') @@ -22,7 +26,7 @@ algos = { 'vNDVI':{ 'expr': '0.5268*((R ** -0.1294) * (G ** 0.3389) * (B ** -0.3118))', 'help': _('Visible NDVI is an un-normalized index for RGB sensors using constants derived from citrus, grape, and sugarcane crop data.') - }, + }, 'VARI': { 'expr': '(G - R) / (G + R - B)', 'help': _('Visual Atmospheric Resistance Index shows the areas of vegetation.'),