| TWI Algorithm Specification | ![]() |
The TWI operator algorithm computes the Triangle
Water Index from a given product.
The TWI results from the following equation:
TWI = (2.84 * (RE1 - RE2) / (G + S2)) + ((1.25 * (G - B) - (N
- B)) / (N + 1.25 * G - 0.25 * B))
, where:
The bands are:
- B is the Blue band
- G is the Green band
- RE1 is the Red Edge 1 band
- RE2 is the Red Edge 2 band
- R is the Red band
- N is the NIR band
- S2 is the SWIR 2 band
Also the processor computes an additional flags band called 'twi_flags' with the following bit coding:
| Bit Position | Description |
|---|---|
| Bit 0 | The computed value for TWI is NAN or is Infinite |
| Bit 1 | The computed value for TWI is less than -1 (minus one) |
| Bit 2 | The computed value for TWI is greater than 1 (one) |