To initiate a Raster Calculation, go to the Analysis menu and select Raster Calculator - Apply Formula (NDVI, NDWI, etc) to Image/Grid Layer(s).
Click OK and the Set up Apply Formula Operation window will appear.
Add Predefined Formula
The Normalized Difference Vegetation Index (NDVI) is a commonly used vegetation indices derived from the Near-Infrared (NIR) and RED channels of remotely sensed imagery. NDVI is an index of vegetation’s photosynthetic activity, or ‘greenness’. Vegetation indices are based on the observation that different surfaces reflect different types of light differently.
The NDVI is calculated by determining the ratio of red and near infrared bands from a remotely-sensed image on a per-pixel basis to use as the normalized difference between red and near infrared bands in an image.
An alternate method of calculation uses the NIR and Short Wave Infrared (SWIR) channels [(NIR-SWIR)/(NIR+SWIR)]. The amount of water present in vegetation primarily affects the spectral reflectance in the SWIR channel. The information about vegetation contained in the SWIR channel is unique. NDWI should be considered as an independent vegetation index.
NBR = (NIR-SWIR)/(NIR+SWIR)
The Normalized Burn Ratio calculation is used to highlight burned areas and to estimate severity of fire. Burned areas reflect high in shortwave infrared (SWIR) and low in near infrared (NIR) and will therefore have a low NBR value. Similar to NDVI, healthy vegetation will have a high NBR value. The band numbers (B4, B6) are based on Landsat 4-5 band designations, but the formula may be used for any imagery by specifying the NIR band as B4 and the SWIR band as B6 in the subsequent dialog.
NBR [Normalized Burn Ratio]: NIR=B4, SWIR/Thermal=B6
NBRI (Landsat 8 OLI): NIR=B5, SWIR/Thermal=B7
NBRI (Landsat 5 TM): NIR=B4, SWIR/Thermal=B7
NBRI (Sentinel 2 MSI): NIR=B8, SWIR/Thermal=B12
NPCRI = (Red-Blue)/(Red+Blue)
The Normalized Pigment Chlorophyll Ratio Index (NPCRI) is a numerical indicator which can be used to determine crop and/or vegetation chlorophyll content. This formula is usually found within application in precession agriculture. For example, crops with low Nitrogen content can have a high carotenoid to chlorophyll ratio. Using the red and blue spectral bands, NPCRI captures the information needed to quantify chlorophyll and Nitrogen. This formula can also be used with red and blue spectral bands from various satellites.
NPCRI (Landsat 8 OLI) : Red=B4, Blue=B2
NPCRI (Landsat 5 TM) : Red=B3, Blue=B1
NPCRI (Sentinel 2 MSI) : Red=B4, Blue=B2
NDSI =(Green-SWIR) / (Green+SWIR)
The Normalized Difference Snow Index (NDSI) is a numerical indicator that shows snow cover over land areas. The green and short wave infrared (SWIR) spectral bands are used within this formula to map the snow cover. Since snow absorbs most of the incident radiation in the SWIR while clouds do not, this enables NDSI to distinguish snow from clouds. This formula is commonly used in snow/ice cover mapping application as well as glacier monitoring.
NDSI (Landsat 8 OLI) : Green=B3, SWIR=B6
NDSI (Landsat 5 TM) : Green=B2, SWIR=B5
NDSI (Sentinel 2 MSI) : Green=B3, SWIR=B11
NDGI = (NIR-Green)/(NIR+Green)
Normalized Difference Glacier Index (NDGI) is used to help detect and monitor glaciers by using the green and red spectral bands. This equation is commonly used in glacier detection and glacier monitoring applications.
NDGI (Landsat 8 OLI) : NIR=B3, Green=B4
NDGI (Landsat 5 TM) : NIR=B2, Green=B3
NDGI (Sentinel 2 MSI) : NIR=B3, Green=B4
NDMI = (NIR - SWIR) / (NIR+SWIR)
The Normalized Difference Moisture Index (NDMI) that is used in combination with other vegitation indexes (NDVI and/or ADVI) associated with vegetation moisture. This formula uses the near infrared (NIR) and short wave infrared (SWIR) to capture the variations of moisture in vegetated areas. NDMI is applicable in applications looking at drought monitoring and subtle changes in vegetation moisture conditions. NDMI can also be used to determine fuel moistures for wildfire hazard assessments.
NDMI (Landsat 8 OLI) : NIR=B5, SWIR=B6
NDMI (Landsat 5 TM) : NIR=B4, SWIR=B5
NDMI (Sentinel 2 MSI) : NIR=B8, SWIR=B11
AVI = [NIR * (1-Red) * (NIR-Red)] 1/3
Advanced Vegetation Index (AVI) is similar to NDVI which uses the red and near-infrared spectral bands to monitor crop and forest variations over time. With the multi-temporal combination of the AVI and the NDVI allows for the discrimination of different types of vegetation and extract phenology characteristics.
AVI (Landsat 8 OLI) : NIR= B5, Red=B4
AVI (Landsat 5 TM) : NIR=B4, Red=B3
AVI (Sentinel 2 MSI) : NIR=B8, Red=B4
BSI = ((Red+SWIR) - (NIR+Blue)) / ((Red+SWIR) + (NIR+Blue))
The Bare Soil Index (BSI) combines blue, red, near infrared (NIR), and short wave infrared (SWIR) bands to capture soil variations. These bands are used in a normalized manner, with the SWIR and red bands being used to quantify the soil mineral composition, while the blue and NIR bands are used to enhance the presence of vegetation. This numerical indicator can be used for soil mapping and crop identification.
BSI (Landsat 8 OLI) : Red= B6, SWIR=B4, NIR=B5, Blue=B2
BSI (Landsat 5 TM) : Red=B5, SWIR=B3, NIR=B4, Blue=B1
BSI (Sentinel 2 MSI) : Red=B11, SWIR=B4, NIR=B8, Blue=B2
SI = [(1-Red)*(1-Green)*(1-Blue)]1/3
Canopy Shadow provides essential information about tree and plant arrangements. The characteristics of canopy shadow are associated by the total spectral radiance that is reflected from the canopy. Shadow Index (SI) is calculated using the red, blue, and green bands in a way that simulates the amount of energy not reflected back to the sensor. The main application for this is in forestry and crop monitoring, and can be combined with AVI and BSI to understand vegetation status.
SI (Landsat 8 OLI) : Red=B2, Green=B3, Blue=B4
SI (Landsat 5 TM) : Red=B1, Green=B2, Blue=B3
SI (Sentinel 2 MSI) : Red=B2, Green=B3, Blue=B4
Add Custom Formula
The Add Custom Formula allows the user to input the raster or 'band math' for custom calculations. Bands should be specified as B1 for Band 1, B2 for Band 2, and so forth. See Custom Formula Reference
Set up Output Grid Settings
up Output Grid Settings allows the user
to specify the bit depth of a shaded single band grid of the new band,
or to create a Multi-Band image as output. The Shader option
can be used to specify that a predefined or custom Shader should be applied
to the image, rather than the default NDVI shader.
Use 'Z' in the equations for the elevation when providing a formula for
terrain layers (B1 will also work). The selected input layers must be
either all elevation or all raster imagery and the appropriate mode (i.e.
from grids or from imagery).
If all inputs are grids then the output can only be a single band/ formula targeting a grid format.
Custom Formulas allow you to generate new bands for a raster image based on formulas that are not already predefined in Global Mapper. Formulas are mathematical expressions that can combine numbers, band values, or elevations to compute new band values. They may use standard mathematical operators like +, -, *, /, ^ (power), comparison and relational operators, and functions like LOG, LOG10, MIN, and MAX to produce new values.Operands
- Numbers - Here are some examples of numbers:
- 1234e-3 (scientific notation; the result is 1.234)
- 123,456 (European notation; the result is 123.456)
Band values - Band values refer to a specific raster band in an image. Allowable band references (again, the names below are case-insensitive):
- red or R: Red band
- green or G: Green band
- blue or B: Blue band
- B#, where # is an integer greater than zero: a numbered band, e.g., B3
- elev or Z: Elevation pseudo-band for use with terrain layers (in which
case, B1 is equivalent)
Formulas use various mathematical and logical operators to form a result, similar to spreadsheet formulas. They are (in order of precedence, low-to-high):
- OR : logical OR: both operands are treated as boolean values and a boolean value is returned (1 if either of the operands are non-zero, or 0 otherwise).
- AND : logical AND: both operands are treated as boolean values, and a boolean value is returned (1 if both of the operands are non-zero, or 0 otherwise).
- =, <>, ~= : comparison operators: equals, not equals, and case-insensitive string comparison, respectively.
- <, <=, >, >= : relational operators: less than, less than or equal to, greater than, and greater than or equal to, respectively.
- +, - : additive operators: plus and minus, respectively.
- *, / : multiplicative operators: times and divide, respectively. The operands are assumed to be numeric.
- ^ : exponentiation
- +, -, NOT : unary operators: plus, minus, and logical NOT respectively. The operands for unary plus and minus are assumed to be numeric; the operand for unary NOT is assumed to be boolean.
You may also use parentheses to specify order of operations. In the absence of
parentheses, higher precedence operations are performed before lower precedence operations. That is, in the
formula "B1 + r * 3", the result is the value of 'B1' plus the product of 'r' and '3' (equivalently "B1 + (r * 3)").
The calculator provides several built-in functions to aid in calculation of values. Note that function names are case-insensitive; that is, log is the same as LOG
- LOG( expression ) : Natural logarithm. The expression parameter is assumed to be a numeric value.
- LOG10( expression ) : Base 10 logarithm. The expression parameter is assumed to be a numeric value.
- MAX( expression1, expression2 ) : Maximum value of a expression1 and expression2.
- MIN( expression1, expression2 ) : Minimum value of a expression1 and expression2.
- IF( expression, expression2, expression3 ) : Evaluate expression, and if it is true, return expression2; otherwise return expression3
- SIN( expression ) : Return the sine of an expression, assumed to be expressed in radians.
- COS( expression ) : Return the cosine of an expression, assumed to be expressed in radians.
- TAN( expression ) : Return the tangent of an expression, assumed to be expressed in radians.
- SIN_DEG( expression ) : Return the sine of an expression, assumed to be expressed in degrees.
- COS_DEG( expression ) : Return the cosine of an expression, assumed to be expressed in degrees.
- TAN_DEG( expression ) : Return the tangent of an expression, assumed to be expressed in degrees.
- ASIN( expression ) : Return the arc sine (inverse sine) of an expression, assumed to be expressed in radians.
- ACOS( expression ) : Return the arc cosine (inverse cosine) of an expression, assumed to be expressed in radians.
- ATAN( expression ) : Return the arc tangent (inverse tangent) of an expression, assumed to be expressed in radians.
- SQRT( expression ) : Square root. The expression parameter is assumed to be a numeric value greater or equal to 0.
- AND( expression list ) : Return true (1) if all of the comma-separated list of expressions are non-zero, otherwise return false (0).
- OR( expression list ) : Return true (1) if any of the comma-separated list of expressions are non-zero, otherwise return false (0).