|
3 | 3 |
|
4 | 4 | 
|
5 | 5 | Project funded by NASA Applied Sciences Program and developed by ESOC and Earth Lab, CIRES - CU Boulder
|
| 6 | + |
| 7 | + |
| 8 | +## Fist Stage (Summer 2023) |
| 9 | +### Done by [Behzad Vahedi](mailto:[email protected]) |
| 10 | + |
| 11 | +Our project aims to extende the EarthLab’s "Fire Event Delineation for Python (FIREDpy)" library by updating it for Near-Real-Time (NRT) fire event perimeter mapping through the fusion of optical and radar remote sensing data. Our main motivations are twofold: to achieve closer-to-real-time temporal resolution and to improve the spatial resolution of the FIREDpy outputs. |
| 12 | + |
| 13 | +In the first stage of the project, we focused on answering two questions: |
| 14 | +- Is applying BRDF correction necessary to generated NRT fire perimeters? |
| 15 | +- How does fire affect the signal in Sentinel-2 and Landsat-8 images and how do these satellites compare? |
| 16 | + |
| 17 | +### BERDF Correction |
| 18 | +The flowchart below demonstrates the steps I took to answer the first question, with the caveat that I only tested BRDF on Sentinel-2 images (using the Sen2nbar package) since I couldn't find any python implementation of this correction for Landsat images. |
| 19 | + |
| 20 | +<img src="./images/Flowchart.jpg" width=800> |
| 21 | + |
| 22 | +__Now, let's go through the different steps in the flowchart__ |
| 23 | + |
| 24 | +The steps in the first row of this flowchart are done using the [FiredPy](https://github.com/earthlab/firedpy) package. This resulted in a shapefile of 20 fire events in the Americas which you can find in the [fire_events](./fire_events/) folder. |
| 25 | + |
| 26 | +Once the fire events are extracted, you need to __get pre- and post-fire image pairs__ for each event. This is done using the [optical_scenes.py](./scripts/optical_scenes.py) script. This script uses the footprint of the fire as well as its start and end date to search for optical images. It can download the images and/or save their footprints. You can run this script using the command below: |
| 27 | + |
| 28 | +`python optical_scenes.py --event_id "202" --satellite "sentinel"` |
| 29 | + |
| 30 | +or alternatively, |
| 31 | + |
| 32 | +`python optical_scenes.py -id "202" -s "sentinel"` |
| 33 | + |
| 34 | +In these commands, the value of the `event_id` (or `id`) argument must be the ID of the fire event for which satellite images are to be searched. This comes from the id field of the [fire events shapefile](./fire_events/Fire_events.zip). The value of the `satellite` (or `s`) argument must be the name of the satellite, either "sentinel" or "landsat". |
| 35 | + |
| 36 | +You can set or change the search criteria in the `config.py` file. These parameters are: |
| 37 | +- `max_cloud_cover`: Maximum cloud cover percentage. default: 40%. |
| 38 | +- `delta_days_landsat`: The number of days to use as a buffer before and after the fire event when searching for Landsat images. default: 70 days. |
| 39 | +- `delta_days_sentinel`: The number of days to use as a buffer before and after the fire event when searching for Sentinel-2 images. default: 40 days. |
| 40 | +- `download_scenes`: Whether to download images or not. default: False. __CAUTION: depending on the number of the images found, this could take a long time and might reqiure a huge amount of storage__ |
| 41 | +- `save_footprints`: Whether to save image footprints or not. default: False. |
| 42 | +- `update_json`: deprecated. |
| 43 | +- `data_dir`: The directory where the images and/or their footprints will be saved. See below for more information. |
| 44 | + |
| 45 | +#### Directory Organization |
| 46 | +`data_dir` is the directory where the you would want the images to be saved. Once you create this directory, extract (unzip) the `Fire_events.zip` there. This will (should) create a new subdirectory called Fire_events. Per each fire id you run the `optical_scenes.py` script for, a new subdirectory will be created within "Fire_events". Also, depending on what the `-s` parameter is, the corresponding subdirectory will be created within the fire_id folder where the footprints and images will be saved. |
| 47 | + |
| 48 | +<img src="./images/directory_tree.png" width="300"> |
| 49 | + |
| 50 | + |
| 51 | +#### Important Note: |
| 52 | +Before running the `optical_scenes.py` script, you should create separate accounts for Landsat and Sentinel API and set your username and password in the corresponidng variables in the `config.py` file. |
| 53 | + |
| 54 | +### Optical Signal Evaluation |
0 commit comments