This application is designed to calculate the Fraction of Absorbed Photosynthetically Active Radiation (FAPAR) value for given satellite images and geographical points. FAPAR is a crucial measurement for understanding the health and productivity of vegetation. The app scans directories for satellite scene data, processes images, and calculates FAPAR values based on specified geographic points. Results are drawn and exported for further analysis.
- Directory scanning for satellite image metadata
- Geographic to raster coordinate conversion
- Calculation of FAPAR values for specified points
- Statistical analysis of FAPAR values across scenes
- Visualization and model drawing of FAPAR data
- Configurable through a YAML file for flexible operation
#Installation
Clone the repository
git clone <repository-url>
Install required libraries Ensure you have Python 3 installed, then run:
pip install -r requirements.txt
This will install all necessary Python packages including numpy, pyproj, PIL, and matplotlib. Configuration Before running the application, configure it by editing config.yaml to specify the working directory, result filename, points of interest, and polygons if necessary.
To run the application, use the following command:
python main.py
Make sure your working directory (specified in config.yaml) contains the satellite scenes in subdirectories.
Initializes the application, scans the directory for scenes, and processes each scene to calculate FAPAR values. Outputs the results to a CSV file and draws a model based on these results.
ConfigLoader
: Parses configuration from config.yaml.
DirectoryScanner
: Scans the specified directory for satellite image metadata.
PixelMapper
: Converts geographic coordinates to raster coordinates and vice versa.
FaparCalc
: Calculates the FAPAR values for given points in a scene.
FaparModel
: Draws a model of FAPAR values over time.
The application uses a custom logger configured in lib.logger to log application activities and errors. Contributing
Contributions to the FAPAR Calculation Application are welcome. Please follow the standard fork, branch, and pull request workflow.