Add -1,1 range to ratio formulas

pull/1246/head
Piero Toffanin 2022-10-01 18:09:42 +02:00
rodzic a803d919da
commit e26de1af7d
1 zmienionych plików z 12 dodań i 6 usunięć

Wyświetl plik

@ -9,23 +9,28 @@ from django.utils.translation import gettext_lazy as _
algos = { algos = {
'NDVI': { 'NDVI': {
'expr': '(N - R) / (N + R)', 'expr': '(N - R) / (N + R)',
'help': _('Normalized Difference Vegetation Index shows the amount of green vegetation.') 'help': _('Normalized Difference Vegetation Index shows the amount of green vegetation.'),
'range': (-1, 1)
}, },
'NDYI': { 'NDYI': {
'expr': '(G - B) / (G + B)', 'expr': '(G - B) / (G + B)',
'help': _('Normalized difference yellowness index (NDYI), best model variability in relative yield potential in Canola.') 'help': _('Normalized difference yellowness index (NDYI), best model variability in relative yield potential in Canola.'),
'range': (-1, 1)
}, },
'NDRE': { 'NDRE': {
'expr': '(N - Re) / (N + Re)', 'expr': '(N - Re) / (N + Re)',
'help': _('Normalized Difference Red Edge Index shows the amount of green vegetation of permanent or later stage crops.') 'help': _('Normalized Difference Red Edge Index shows the amount of green vegetation of permanent or later stage crops.'),
'range': (-1, 1)
}, },
'NDWI': { 'NDWI': {
'expr': '(G - N) / (G + N)', 'expr': '(G - N) / (G + N)',
'help': _('Normalized Difference Water Index shows the amount of water content in water bodies.') 'help': _('Normalized Difference Water Index shows the amount of water content in water bodies.'),
'range': (-1, 1)
}, },
'NDVI (Blue)': { 'NDVI (Blue)': {
'expr': '(N - B) / (N + B)', 'expr': '(N - B) / (N + B)',
'help': _('Normalized Difference Vegetation Index shows the amount of green vegetation.') 'help': _('Normalized Difference Vegetation Index shows the amount of green vegetation.'),
'range': (-1, 1)
}, },
'ENDVI':{ 'ENDVI':{
'expr': '((N + G) - (2 * B)) / ((N + G) + (2 * B))', 'expr': '((N + G) - (2 * B)) / ((N + G) + (2 * B))',
@ -59,7 +64,8 @@ algos = {
}, },
'GNDVI':{ 'GNDVI':{
'expr': '(N - G) / (N + G)', 'expr': '(N - G) / (N + G)',
'help': _('Green Normalized Difference Vegetation Index is similar to NDVI, but measures the green spectrum instead of red.') 'help': _('Green Normalized Difference Vegetation Index is similar to NDVI, but measures the green spectrum instead of red.'),
'range': (-1, 1)
}, },
'GRVI':{ 'GRVI':{
'expr': 'N / G', 'expr': 'N / G',