-
Notifications
You must be signed in to change notification settings - Fork 29
/
pyeo_colab.ini
158 lines (134 loc) · 7.18 KB
/
pyeo_colab.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# Edit the variables below and save before running the pipeline
[run_mode]
# flag for linear or parallel processing of the raster and vector processing pipeline
do_parallel = False
# wall_time_hours and qsub_processor_options are currently hardcoded to 24 hours, at line 495 of acd_national.py
qsub_processor_options = nodes=1:ppn=16,vmem=64Gb
wall_time_hours = 3
watch_time_hours = 3
watch_period_seconds = 60
# needs to be in the format "nodes=1:ppn=16,vmem=64Gb"
[forest_sentinel]
# aoi_name: The name of this area of interest. No spaces.
aoi_name=Molo
# Baseline composite creation: Image acquisition dates for the initial cloud-free composite
composite_start=20200101
composite_end=20201231
# Change detection: Image acquisition dates in the form yyyymmdd
start_date=20240401
end_date=20240630
# EPSG code for Kenya - north of equator and east of 36øE is EPSG:21097
# See https://epsg.io/21097 and https://spatialreference.org/ref/epsg/21097/
epsg=21097
# Cloud cover threshold for imagery to download
cloud_cover=25
# Certainty value above which a pixel is considered a cloud from sen2cor
cloud_certainty_threshold=0
# path to the trained machine learning model on your mounted Google Drive
model=/content/drive/MyDrive/pyeo_pars/my_model.pkl
[environment]
# pyeo_dir needs to be an absolute path
pyeo_dir = /content/pyeo
# tile_dir needs to be an absolute path
tile_dir = /content
# Relative paths are relative to pyeo_dir/
integrated_dir = ./integrated
roi_dir = ./roi
roi_filename = molo.shp
geometry_dir = ./geometry
s2_tiles_filename = kenya_s2_tiles.shp
log_dir = /content/drive/MyDrive/pyeo_files
log_filename = pyeo_log.log
credentials_path = /content/drive/MyDrive/GY7709-2024-25/credentials.ini
# environment_manager = [venv, conda, pip]
environment_manager = pip
conda_directory = /home/h/hb91/miniconda3
conda_env_name = pyeo_env
# Path to the sen2cor preprocessor script, L2A_Process. Usually in the bin/ folder of your sen2cor installation.
sen2cor_path = /home/h/hb91/Sen2Cor-02.10.01-Linux64/bin/L2A_Process
[raster_processing_parameters]
do_tile_intersection = True
# **************************************************************************************************************************
do_build_composite = True
do_classify = True
do_change = True
do_raster = True
chunks = 10
do_skip_existing = True
do_quicklooks = True
do_delete = False
do_zip = True
do_all = False
# do_build_prob_image, consider removing
do_build_prob_image = False
# do_update, consider removing
do_update = False
# do_dev, consider removing
do_dev = True
# **************************************************************************************************************************
# ***** STEP 4 SETUP GENERAL RASTER PROCESSING PARAMETERS *****
# download_source = scihub is now depracated
download_source = dataspace
# granules below this size in MB will not be downloaded
faulty_granule_threshold = 300
# list of strings with the band name elements of the image file names in "" string notation
# the wavebands specified here must match those used to build the random forest model specified in the Classify section below
band_names = ["B02", "B03", "B04", "B08"]
# file name pattern to search for when identifying band file locations in "" string notation
resolution_string = "10m"
# spatial resolution of the output raster files in metres. Can be any resolution. Recommended: 10,20 or 60.
output_resolution = 10
# **************************************************************************************************************************
# ***** STEP 4a DOWNLOAD REFERENCE IMAGES AND BUILD A MEDIAN COMPOSITE *****
# set buffer in number of pixels for dilating the SCL cloud mask (recommend 10 pixels of 10 m) for the composite building
buffer_size_cloud_masking_composite = 10
# maximum number of images to be downloaded for compositing, in order of least cloud cover
download_limit = 3
# **************************************************************************************************************************
# ***** STEP 4b: DOWNLOAD CHANGE DETECTION IMAGES FOR THE REQUIRED DATE RANGE *****
do_download = True
# set buffer in number of pixels for dilating the SCL cloud mask (recommend 30 pixels of 10 m) for the change detection
buffer_size_cloud_masking = 20
# **************************************************************************************************************************
# ***** STEP 4c: CLASSIFIY THE COMPOSITE AND CHANGE DETECTION IMAGES *****
# list of strings with class labels starting from class 1. Must match the trained model that was used.
class_labels = ["primary forest", "plantation forest", "bare soil", "crops", "grassland", "open water", "burn scar", "cloud", "cloud shadow", "haze", "sparse woodland", "dense woodland", "artificial"]
# if sieve is 0, no sieve is applied. If >0, the classification images will be sieved using gdal and all contiguous groups of pixels smaller than this number will be eliminated
sieve = 0
# **************************************************************************************************************************
# ***** STEP 4d: DETECT CHANGES AND BUILD RASTER REPORTS *****
# find subsequent changes from any of these classes. Must match the trained model that was used.
change_from_classes = [1, 2]
# to any of these classes. Must match the trained model that was used.
change_to_classes = [3,4,5,7,11,12,13]
# **************************************************************************************************************************
# ***** STEP 5: VECTOR ANALYSIS OF TILE RASTER REPORTS *****
[vector_processing_parameters]
level_1_filename = gadm41_KEN_1.json
# vectorisation currently hardcoded to use level_1_filename
level_2_filename = gadm41_KEN_2.json
level_3_filename = gadm41_KEN_3.json
do_delete_existing_vector = True
do_vectorise = True
# ***** STEP 6: INTEGRATE VECTOR ANALYSES TO NATIONAL SCOPE *****
do_integrate = True
# **************************************************************************************************************************
# ***** STEP 7: FILTER NATIONAL SCOPE VECTORISED FOREST ALERTS *****
do_filter = False
# If there are any strings within counties_of_interest list, filtering by county will be attempted
counties_of_interest = [] # DO NOT USE, THIS IS DEPRACATED. Use admin_areas_of_interest instead
# Counties_of_interest = ["Kwale", "TransNzoia"]
admin_areas_of_interest = []
minimum_area_to_report_m2 = 120
# **************************************************************************************************************************
# ***** STEP 8: FILTER NATIONAL SCOPE VECTORISED FOREST ALERTS *****
# MANUAL ASSESSMENT OF ALERTS BY KFS STAFF AND FLAGGING FOR ALERTS FOR IN-PERSON INVESTIGATION BY RANGERS
# **************************************************************************************************************************
# ***** STEP 9: AUTOMATED DISTRIBUTION OF FILTERED ALERTS BY MESSAGING (E.G. WHATSAPP) *****
[alerts_sending_options]
do_distribution = False
email_alerts = True
email_list_file = /content/drive/MyDrive/GY7709-2024-25/email_list.txt
whatsapp_alerts = False
whatsapp_list_file = /content/drive/MyDrive/GY7709-2024-25/whatsapp_list.txt
# **************************************************************************************************************************