Calculating a Regional NDVI

Educational Objective
The fight against famine and diseases, as a consequence of poor agricultural practices, has been won rather successfully with the help of a method called precision agriculture (precision farming). As ecological and mostly economic reasons drove the development of this technology in industrial nations, low cost approaches in developing countries were an attempt to have an impact on health risks and to support disease control. Precision farming makes use of GPS and GNSS data, which enable the farmer to locate his position in the field and create maps of them in order to implement several spatial variables such as crop yield, organics matter content or the moisture level. Especially one important variable which needs to be taken into account is the Normalized Difference Vegetation Index which allows scientists to analyze changes in the health and density of Earth’s vegetation as viewed from space. With this knowledge farmers are able for example, to determine where on their field which amount of fertilizers needs to be spread, in order to be sufficient. Consequently, there will be no redundant fertilizer spread and farmers can manage their operations more economically and ecologically viable. In developing countries precision farming has the potential to solve critical problems such as crop failure or kidney insufficiency, which is a disease most likely related to the use of pesticides and herbicides. However, precision farming as practiced in industrial nations, has relatively high investment and operating costs, which are resources developing countries do not have. Therefore, the lack of knowledge and shortage of money to apply the knowledge on agricultural processes calls for a low cost approach. The NDVI, with only two channels of information coming from the Moderate Resolution Imaging Spectroradiometer (MODIS) instruments on NASA’s Terra and Aqua satellites, is a very practicable and easily usable measurement. Since all maps and NDVI measurements of the whole globe are made publicly available by the NASA, the idea is to spread the knowledge and functionalities of NDVI maps, and make them accessible for people all over the world who want to help with and work on projects which demand demand low cost approaches. The objective of this thesis is to develop a page in Wikiversity, offering a tutorial on how to calculate the NDVI for a specific region, and to give insights to subsequent steps in spatial analysis. It is intended to use only open-source software to make the work available to anybody and provide a tool that can also be used in developing countries, in order to, for example minimize health risks as a result of the application of fertilizer.

Technical Procedure
The chlorophyll pigments in plant leaves absorb visible light in the wavelength range of 0.4 to 0.7 µm, which is then used in the process of photosynthesis, and they reflect near-infrared light in the range of 0.7 to 1.1 µm. Thus, the more leaves a plant has, that are actively doing photosynthesis, the more these wavelengths are affected. The NDVI is identified as the difference-sum ratio of red (visible) and infrared wavelengths.
 * $$NDVI=\frac{NIR-VIS}{NIR+VIS}$$

The NDVI-value ranges from minus one (-1) to plus one (+1); the higher the NDVI value, the more likely it is for the vegetation in that pixel to be dense and healthy. Conversely, the lower the NDVI value, the vegetation in that pixel does probably consist of tundra, desert or alike greenery.

Application
The information of a plant’s health is of great importance for people and institutions related to agriculture, forestry and similar areas. Due to the steadily increasing world population and the demand for agriculture to ensure sufficient food production, technology is needed to make available land and plants more efficient. More than 6 billion people rely on agriculture as a source of food. Moreover, the global population is expected to increase by 50% within the next 40 years. Although the yield of many crops has increased in the last century, neither the future growth nor the environmental impacts such as, for example a sudden decrease in a crop’s resistance against diseases can be predicted. Since most of the world’s high quality land is already used for the aforementioned purpose, the need for technology to support farmers and industry to manage their land in a non-destructive /-intrusive way becomes more significant. Furthermore, innovative technology is required to assist farmers with the management of pollutants and the inevitable increase in pesticide usage.

Precision Farming
Several studies (Ma et al. (1996), Shanahan et al. (2001) , Shanahan et al. (2003) , Solari et al. (2008) showed that the NDVI is a suitable index to evaluate the nitrogen status, the chlorophyll content, the green leaf biomass, as well as the grain yield of a plant. This predicts the NDVI to be an essential tool to support the management of a field. The challenge of meeting the global demand for food, while, at the same time, managing natural resources in a sustainable way, requires a focus on alleviating crop stress (Henik 2012). Therefore, Henik (2012, p. 7) notes, “[a]n understanding of the physiochemical impacts of plant stress and their spectral responses, through the use of remote sensing, can allow producers to make decisions that are agronomically sound[,] environmentally friendly, and economically feasible.” An early recognition of variability in plant growth on a given field makes it possible to identify factors such as nutrient availability, environmental limitations and/or other factors that could limit the yield (ibid.). The combination of global positioning systems and remote sensing techniques are the cornerstone of assessing spatial and temporal data on a scale that can be immediately processed when managing the field. Information about soil fertility, pest management/usage of pesticides and seasonal performance can be linked to spatial variation, and thus support decision-making related to crop production management. Both Verhulst et al. (2009) and Hatfield & Prueger (2010) have found out that the NDVI is a useful index to evaluate fertility management and practices such as tillage. Just like the other studies mentioned above, Henik (2012) worked with high resolution NDVI images using an active sensor, which emits irradiance and measures the reflectance. Those sensors cannot only be used for a pre-analysis of a field but also for instant action management. One way to do this is to mount sensors on agricultural machines, and to measure the wavelengths reflected from the crops in front of the vehicle. Wavelengths are analysed and set into spatial relation using GPS. The program then computes recommendations of amounts of fertilizer for a specific point on the field and subsequently spreads it automatically. Nevertheless, high resolution imagery for NDVI is a rather costly technology which is only economically feasible in countries, where there is already a high agricultural technology standard. Developing countries do not have the financial opportunities to afford high resolution NDVI imagery.

Risk Management
As mentioned before, satellite imagery is another way to remotely gather data of a specific area, in order to calculate the NDVI. Even though, the information obtained from satellites are available to anybody at no cost, the resolution is significantly lower than imagery obtained from active sensors used in precision farming. Currently, the maximum resolution of freely available satellite imagery is 30 meters as compared to a few centimetres down to millimetres of an active precision farming sensor. These low resolution images, however, are suitable for the management of several agricultural practices in developing countries. The motivation behind writing this thesis was the development of a low cost approach for precision farming to specifically decrease environmental and health problems in developing countries. Several studies (Held et al., 2016 ; Lorenz, 1985 ; Pawar et al., 2016 ; Medical International, 2013 ) have found a significant relation between the exposure to pesticides and health problems such as chronical diseases like kidney insufficiency. Those who spread out the pesticides on the field are particularly endangered. Besides rather basic improvements, such as spraying techniques, sufficient protection clothing and health hazard awareness, an overall reduction in pesticide usage is an efficient method for both health and environmental risk minimization. At this point, information about an area’s NDVI is helpful to give answers to the questions Is there a potential for pesticide and fertilizer reduction? and Where on the field can less pesticides and fertilizers be spread?. In order to explain how NDVIs can help minimize health and risk hazards on site, the capacity building programme, as wells as the idea of a living lab is introduced in the following chapter.

Calculation of the NDVI of Chichigalpa, Nicaragua
The example region for which the following NDVI calculations will be performed and on which the tutorial will be based on is Chichigalpa, Nicaragua. Romero (2010) portrayed the use of pesticides and correlated health issues such as chronic kidney insufficiency in the rural town of Chichigalpa. People working on the sugarcane plantations come in contact with pesticides, but even people who do not work in the sugar-company show symptoms of kidney insufficiency due to the infested groundwater. “People often drank from the nearby river since there was no other water source at hand. In the past workers dealt with pesticides and other agricultural poisons rather casual and wore no gloves or other protection at all”. Reasons for that were on the one hand no money to buy protection gear and on the other hand no awareness of what health risks those workers exposed themselves to. Providing the company with information about potential pesticide savings helps both the company economically and reduces the overall amount of pesticides used which subsequently reduces the soil and groundwater contamination. One great advantage of a living lab is that a solution to one problem can contribute positively to several other aspects which arise during the discussion with the people on site.



The following steps were executed using the GNU General Public License QGIS 2.12.1-Lyon, the http://earthexplorer.usgs.gov/ to find and download satellite images, and https://maps.google.com/ for coordinate classification. Each step will be explained in detail and illustrated for better understanding.

1.In order to download the satellite images it is necessary to create an account on http://earthexplorer.usgs.gov/. The registration is free of charge and takes only few minutes. 2.The first step is to define the location for which the satellite images should be searched for. Therefore, one can either put in the name of the region, the specific coordinates or use the map on the front page of the earthexplorer to define the location. In this example the name of the region “Chichipalga” is typed under the Address/Place tab (step 1). After hitting Show (step 2) more information appears where “Chichigalpa, Nicaragua” can now be selected (step 3). The coordinates appear and a red pointer shows where the location can be found on the map. After specifing from/until which date one want to search for images (step 4), hitting Data Sets (step 5) will direct to the next page.

3.This paragraph is about the selection of the right data set(s) for the search. Under Landsat Archive (step 6) the L8 OLI/TIRS (step 7) can be found. L8 OLI/TIRS stands for the Operational Landsat Imager and Thermal Infrared Sensors which are on board of the Landsat 8 Satellite. Why those images are necessary for the NDVI calculation will be explained in paragraph 5 of this chapter. After selecting the L8 OLI/TIRS one can move on to step 8 and select the Additional Criteria tab.

4.The next two steps are optional but help in pre-eliminating images that are not or very difficult to use for NDVI calculation. Amongst several other criteria the Cloud Cover and Day/Night Indicator can be defined. As mentioned earlier clouds can disturb the satellite images and lead to false NDVI values, therefore, the Cloud Cover should be ideally less than 30% / 20% (step 9). Another important point is to set the Day/Night Indicator to DAY (step 10) in order to remove all images shot at night, which are not usable for calculation. A hit on Results will list all of the suitable images on the next page.

5.The list of matching images will be displayed and under each image several options that can be selected appear. A Browse Overlay can be selected (a), which will show the satellite image laid over the map, to get an idea on what map content is covered by the image. In order to download (b) images it is important to be logged in (e). It is also possible to download multiple images at once, when selecting Bulk Download (c) for each image. If more than one data set has been selected previously it is possible to switch between the results of different data sets (d).

When a suitable image should be downloaded, multiple Download Options appear. For NDVI calculation the Level 1 GeoTIFF Data Product option has to be selected. GeoTiff contains next to the visible image, information about map projection, coordinate systems, datums and more to be able to give exact spatial reference for the file (Mahammad, Ramakrishnan 2003).

6.After downloading and extracting the compressed files eleven spectral band images and one metadata file can be used for further calculation. The metadata file is useful to determine the exact time when the image was taken, especially when multiple images have been downloaded. The following image gives an overview of the different spectral bands of the Landsat 8 and what information they carry. Important for the regular NDVI calculation are band 4 & band 5 as they contain the visible (red) and near infrared light. As mentioned before, this thesis will also compare other vegetation indices, and thus, will need band 2 with blue light information as well. 7.The actual NDVI calculation can be done with any geographic information system (GIS), for this example the GNU General Public Licensed software QGIS 2.12.1-Lyon is used. After downloading and opening the program the band layers can be implemented. The images of the layers appear and can now be inspected, as well as further processed. For the next step the Semi-Automatic Classification Plugin has to be installed.

8.The GeoTIFF data contains information for each pixel of the image. However, those information is stored as a digital number and need to be converted into reflectance value with a range of 0-1. A problem that was mentioned earlier concerning distortions of wavelengths while traveling through the atmosphere as well as the sun’s angle with respect to the earth and their distance can vary between images (TERRAINMAP Earth Imaging LLC, 2011). Without going into too much detail on how correction methods such as conversion to top of atmosphere (ToA) reflectance and dark object subtraction (DOS) atmospheric correction work, it is important to apply these corrections to each band before further processing. This thesis will focus on more atmospheric distortions in the chapter about other VI calculation.

9.After the conversion has been performed the corrected bands appear in the Layer Panel and can now be used for the actual NDVI calculation. This is done with the Raster Calculator, which can be found in the main tool bar of QGIS. The NDVI formula is applied to the red and infrared bands, which can be treated as any other number in this calculator. After choosing the output layer and calculating, the new NDVI layer appears in the Layer Panel and can be inspected.

10.Although, the NDVI layer is complete and can now be used, it is advised to modify the layout in such a way that high and low values of the index can easily be spotted. A pseudocolor to substitute the black/white layer can be applied in Layer Properties. In this example a linear color interpolation from white to green in 9 different classes was applied. The modified layer can now be printed or exported as image/pdf file using the Print Composer.

11.The Print Composer enables the user to support the NDVI map (a) with important and relevant information such as a descriptive header (c), a legend with corresponding NDVI values (d), a scale (e) to classify the distance on the map and a picture (b) to know where the study region is located.

Tutorial and Screencast Demo Data
It is important to provide tools for better understanding, that help anyone interested in easy reproduction of vegetation indices, such as tutorials including visual illustration like videos of the computer screen while explaining the use of a software(Screencast) made with the free software CamStudio 2.7.
 * These youtube clips show how to calculate NDVI-Maps with QGIS, calculate NDVI-Maps with ArcGis or how to use R as a tool for spatial analysis.
 * The following screencast by Jörg Rapp on the generation of GIS maps for application of agrochemicals with open-source also helps to understand the functioning of SAGA GIS.

Analysis with R
In order to compare NDVI values measured over one year or to check for similarities and differences among several different vegetation indices, an analysis with the free software R will be carried out and explained in this chapter.

Analysis of NDVI Values Over One Year
The following table lists the mean, standard deviation and variance of the NDVI of each month in 2014. With a value of ~0.345 the mean in May is the lowest compared to a value of ~0.695 in October, representing the highest monthly mean in 2014 in Chichigalpa. This data has been calculated with raster analysis tools in R.



Comparison Between NDVI, EVI, SAVI and AFRI
This chapter compares the outcomes of the different vegetation indices NDVI, EVI, SAVI and AFRI, and evaluates advantages as well as disadvantages of each. All five VIs were calculated for the same sector of Chichigalpa in December 2014. The Aerosol Free Vegetation Index 2.1 (AFRI 2.1) resulted in a value of ~0.7, which was the highest of all tested VIs. The lowest value with ~0.41 was computed by AFRI 1.6. The variance of all five VIs was between ~0.017 and ~0.029.