The increased demand for food due to rapid population growth has been identified as a global concern that calls for innovative approaches to achieve sustainable agriculture (FAO, 2017). Remote sensing offers an improved, reliable and timely way of crop monitoring and planning. The spectral and multi-temporal resolutions enable the study of the rapidly changing phenological differences in a cost-effective way. Using satellite imagery and vegetation indices (the arithmetic combination of spectral bands that relate to vegetation) has proved to be an efficient source of reliable data for farmers to make informed decisions at different scales. Some of the globally adopted vegetation indices to monitor vegetation indices include the Normalized Difference Vegetation Index (NDVI), Enhanced Vegetation Index (EVI), and Green Chlorophyll Index (GCI).
NDVI is very popular and useful in monitoring the greenness or chlorophyll content in crops. NDVI is a ratio computed using the red band and the Near-infrared band. The values of NDVI range from 1 to -1, where 1 indicates very healthy vegetation and -1 means dead vegetation. NDVI cancels out the topography effects because of the similarities between the visible region and the Near-infrared region, however; it is prone to errors caused by canopy structural variations and plant physiognomy. Therefore, the need for EVI to compensate for that error. EVI helps to detect stress and changes because of drought and it is computed from the blue, red, and near-infrared bands with some constants. GCI is like NDVI but it uses the green reflectance of vegetation and NIR spectral bands to estimate the amount of chlorophyll present in the vegetation. This web application uses Sentinel 2 images to compute the vegetation indices.
The objective of this web application is to provide an easy access and friendly interface for farmers, agronomists and relevant stakeholders with reliable data at their reach to assess crop health, guide them to make informed decisions and reduce the amount for fertilizers.
This project used sentinel-2 satellite images and boundaries of a few selected study areas in polygon geojson format. Sentinel-2 is the land monitoring mission from the EU Copernicus Programme that consists of the constellation of twin satellites Sentinel-2A and 2B. They provide fine-resolution optical imageries with global coverage and a revisit time of 5 days with satellite constellation. (Earth Online European Space Agency, 2014). Sentinel 2 images have a range of spatial resolutions, but we used the bands with 10m resolutions in this project.
The backend was developed using python. The downloading and processing of images are carried out by functions in the main file. The “app.py” file is the flask application created to extract data from the database. The front end, which enables the visualization of the results was developed using HTML, CSS and JavaScript. The web map interface incorporates Leaflet, which is an open-source JavaScript library.
First thing is to create the environment in your computer for that you have to install Miniconda, pgAdmin, and VS code.
Miniconda : https://youtu.be/oHHbsMfyNR4
pgAdmin : https://youtu.be/0n41UTkOBb0
VS Code : https://youtu.be/JPZsB_6yHVo
After installaltion you have to open the Anaconda prompt and run the line of code to create the environment. Note: Downlaod our full folder "Crop-Health-Monitoring" and make sure you are creating the environment in our downloaded folder.
conda create -n project
project is the name of the environment, then you have to activate your project with this command.
conda activate project
Then, you have to run that line of code to in all teh libaraies which we need to run that app.
conda install --file requirements.txt -c conda-forge
Follow these steps to run the app.
- Give the path for two geoJSON files of same study area one in WSG84 Coordinate system (to search the images for that area )and other in projected Coordinate system (To clip the images) according to the UTM zone for that particular place.
- Check the update the ending and starting date (This app currently is not working for offline images).
- Ensure you have login credentials. If not register on Sentinel Hub to get that.Copy your credentials into the required python files.
- Update the credentials of the database and table in the required python files (main.py and app.py)
- Run the "main.py"
Untitled.video.-.Made.with.Clipchamp.mp4
main.py file did these steps
- Create the folders in your C drive to put the downloaded images, Cliped images and processed Indices.
- Look the S2 images for your study area according to your given time period then download the specific bands (Band-2348) instead of whole image and put them in the folder "download" (main.py will create that folder automatically)
- Getting the specifc metadata for downloaded image and upload that data in database.
- Clip the bands with your uploaded geoJSON files (Study area) put these clip bands in the folder "processed"(main.py will create that folder automatically)
- Calculate the indices and put these indices in the folder "indices" (main.py will create that folder automatically)
Open the db.sql file in pgAdmin 4 (Crop-Health-Monitoring/database/) and run this file.
Note: If you change the table name or database name, you have to change also in main.py
This sql file will create the database, create the postgis extension for the database and table for the metadata of the S2 Imgaes.
The downloaded, processed bands and indices are stored on the local Disk and can be visualized using any suitable software application. The image metadata are contained in the PostgreSQL dB. The image metadata and the footprint of the images can be visualized using the web map interface.
Follow these steps to visualized this web map
-
Update the credentials of the database in app.py file(Crop-Health-Monitoring/App/app.py)
-
Run the app.py file and open the localhost link.
Untitled.video.-.Made.with.Clipchamp.2.mp4
The web map interface functionalities include an attribute pop-up when clicking on the footprint polygon, a button to display attributes/metadata, and a quick URL to view the sentinel images.
We will update this web app
- Calculate the indices from multiple images
- Displaying the indices in web app
- Centralized database system.
- Multi-temporal vegetation indices analysis and comparison in web dashboard.
Web visualization of multi-temporal indices line plot. It is pertinent to state that this app is developed for educational and research purposes. Future updates will be made if it will be suitable for commercial purposes
-
Abran Idrees : He earned a bachelor's degree in Space Science from the university of the Punjab, Lahore, Pakistan and now he is pursuing a master's degree in Geospatial Technologies at NOVA IMS, Universidade NOVA de Lisboa, Portugal.
-
Joao Maria Telo Abreu Jardine Neto : He earned a bachelor's degree in Spatial Planning from Instituto de Geografia e Ordenamento do Território, Portugal and now he is also pursuing a master's degree in Geospatial Technologies at NOVA IMS, Universidade NOVA de Lisboa, Portugal.
-
Lukumon Olaitan Lateef : He holds a bachelor’s degree in surveying and geoinformatics from the Federal University of Technology, Akure in Nigeria and now he is also pursuing a master's degree in Geospatial Technologies at NOVA IMS, Universidade NOVA de Lisboa, Portugal.
Food and Agriculture Organization of the United Nations (2017). The future of food and agriculture - Trends and challenges. Agricultural productivity and innovation (pp. 46–47), Rome: FAO. Matsushita, B., Yang, W., Chen, J., Onda, Y., & Qiu, G. (2007). Sensitivity of the Enhanced Vegetation Index (EVI) and Normalized Difference Vegetation Index (NDVI) to Topographic Effects: A Case Study in High-density Cypress Forest. Sensors, 7(11), 2636–2651. MDPI AG. Retrieved from http://dx.doi.org/10.3390/s7112636 Updates