- Fixed CI calculation: changed from NDVI (NIR-Red)/(NIR+Red) to correct NIR/Green-1 formula in: * process_single_tile() function * create_ci_band() utility function * Updated create_mask_and_crop() documentation - Renamed numbered shell scripts for clarity (matching R script numbering): * 01_run_planet_download -> 10_planet_download.sh * 02_run_ci_extraction -> 20_ci_extraction.sh * 03_run_growth_model -> 30_growth_model.sh * 04_run_mosaic_creation -> 40_mosaic_creation.sh * 09_run_calculate_kpis -> 80_calculate_kpis.sh * 10_run_kpi_report -> 90_kpi_report.sh - Archived obsolete shell scripts to old_sh/: * build_mosaic.sh, build_report.sh, interpolate_growth_model.sh * 05_run_dashboard_report.sh, 06_run_crop_messaging.sh * 11_run_yield_prediction.sh/ps1 * runcane.sh, runpython.sh, smartcane.sh, update_RDS.sh - Deleted test/debug files and temporary outputs: * analyze_*.R, benchmark_gpu_vs_cpu.py, convert_angata_harvest.py * debug_mosaic.R, examine_kpi_results.R, generate_sar_report.R * inspect_8band_structure.R, inspect_tif_bands.R * old_working_utils.R, predict_harvest_operational.R * run_kpi_calculation.R, run_report.R, simple_sar_test.R * data_validation_tool/, harvest_ci_pattern_analysis.png, kpi_debug.out - Enhanced harvest prediction: Added threshold tuning (0.40-0.45) and field type handling - Enhanced mosaic creation: Improved tile detection and routing logic
43 lines
1 KiB
Bash
Executable file
43 lines
1 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
end_date="2024-06-08"
|
|
offset=7
|
|
data_dir="chemba"
|
|
file_name_tif="week_03_2024.tif"
|
|
|
|
# Parse command line arguments
|
|
for arg in "$@"; do
|
|
case $arg in
|
|
--offset=*)
|
|
offset="${arg#*=}"
|
|
;;
|
|
--end_date=*)
|
|
end_date="${arg#*=}"
|
|
;;
|
|
--data_dir=*)
|
|
data_dir="${arg#*=}"
|
|
;;
|
|
--file_name_tif=*)
|
|
file_name_tif="${arg#*=}"
|
|
;;
|
|
*)
|
|
echo "Unknown option: $arg"
|
|
exit 1
|
|
;;
|
|
esac
|
|
shift
|
|
done
|
|
|
|
echo "offset: $offset"
|
|
echo "end_date: $end_date"
|
|
|
|
# Check if required arguments are set
|
|
if [ -z "$end_date" ] || [ -z "$data_dir" ] || [ -z "$offset" ] || [ -z "$file_name_tif" ]; then
|
|
echo "Missing arguments. Use: build_mosiac.sh --endate=2024-01-01 --offset=7 --data_dir=chemba --file_name_tif=week_03_2024.tif"
|
|
exit 1
|
|
fi
|
|
|
|
echo mosaic_creation.R $end_date $offset $data_dir $file_name_tif
|
|
|
|
cd ../r_app
|
|
Rscript mosaic_creation.R $end_date $offset $data_dir $file_name_tif |