Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tooling] Add GFW DIST alerts with driver classification #66

Closed
01painadam opened this issue Dec 20, 2024 · 3 comments
Closed

[Tooling] Add GFW DIST alerts with driver classification #66

01painadam opened this issue Dec 20, 2024 · 3 comments
Assignees

Comments

@01painadam
Copy link
Collaborator

01painadam commented Dec 20, 2024

Goal

See https://landandcarbon.projects.earthengine.app/view/beta-land-disturbance-alert-classification-system#lon=-51.33205213832403;lat=-29.8785949661847;zoom=16;

Note: the conversion of natural lands alerts are already pre-filtered by the SBTN natural lands map

Solution Hints

We can use the current DIST alerts layer we are currently using, applying further filtering based on the datasets below to aggregate by the different drivers.

In the example below, confmask is a confidence filter, selecting for alerts where VEG-DIST-COUNT >= 2 AND VEG-ANOM-MAX > 50

Also, natLands_binary filters for Natural lands using ee.Image('WRI/SBTN/naturalLands/v1/2020').select('natural') (again, similar to the current tooling) and is applied to Wildfires and Conversion to avoid erroneous alerts.

See https://code.earthengine.google.com/06f83955d12f278414f8c53655abdd6d

Wildfire

var wf_collection = ee.ImageCollection.fromImages(
  [ee.Image('projects/wri-dist-alert-drivers/assets/wildfire/dist-alert-wildfire-africa-nov2023-oct2024_v01'), 
  ee.Image('projects/wri-dist-alert-drivers/assets/wildfire/dist-alert-wildfire-europe-nov2023-oct2024_v01'),
  ee.Image('projects/wri-dist-alert-drivers/assets/wildfire/dist-alert-wildfire-latam-nov2023-oct2024_v01'),
  ee.Image('projects/wri-dist-alert-drivers/assets/wildfire/dist-alert-wildfire-ne-asia-nov2023-oct2024_v01'),
  ee.Image('projects/wri-dist-alert-drivers/assets/wildfire/dist-alert-wildfire-north-am-nov2023-oct2024_v01'),
  ee.Image('projects/wri-dist-alert-drivers/assets/wildfire/dist-alert-wildfire-se-asia-oceania-nov2023-oct2024_v01')]
);

var wildfire = wf_collection.mosaic()
                  .neq(0)
                  .updateMask(confmask)
                  .updateMask(natLands_binary);

Crop Cycle

  [ee.Image('projects/ee-jamesmaccarthy-wri/assets/dist-alert-crop-cycle-africa-nov2023-oct2024-tiles-all'), 
  ee.Image('projects/ee-jamesmaccarthy-wri/assets/dist-alert-crop-cycle-europe-nov2023-oct2024-tiles-all'),
  ee.Image('projects/ee-jamesmaccarthy-wri/assets/dist-alert-crop-cycle-latam-nov2023-oct2024-tiles-all'),
  ee.Image('projects/ee-jamesmaccarthy-wri/assets/dist-alert-crop-cycle-northam-nov2023-oct2024-tiles-all'),
  ee.Image('projects/ee-jamesmaccarthy-wri/assets/dist-alert-crop-cycle-seasia_oceania-nov2023-oct2024-tiles-all'),
  ee.Image('projects/ee-jamesmaccarthy-wri/assets/dist-alert-crop-cycle-neasia-nov2023-oct2024-tiles-all')]
);

var crop_cycle = cc_collection.mosaic().updateMask(confmask);

Flooding

  [ee.Image('projects/ee-jamesmaccarthy-wri/assets/dist-alert-flooding-africa-nov2023-oct2024-tiles-all'), 
  ee.Image('projects/ee-jamesmaccarthy-wri/assets/dist-alert-flooding-europe-nov2023-oct2024-tiles-all'),
  ee.Image('projects/ee-jamesmaccarthy-wri/assets/dist-alert-flooding-latam-nov2023-oct2024-tiles-all'),
  ee.Image('projects/ee-jamesmaccarthy-wri/assets/dist-alert-flooding-northam-nov2023-oct2024-tiles-all'),
  ee.Image('projects/ee-jamesmaccarthy-wri/assets/dist-alert-flooding-seasia-oceania-nov2023-oct2024-tiles-all'),
  ee.Image('projects/ee-jamesmaccarthy-wri/assets/dist-alert-flooding-neasia-nov2023-oct2024-tiles-all')]
);

var flooding = fl_collection.mosaic()
                            .updateMask(confmask)
                            .updateMask(crop_cycle.unmask(2).neq(1))
                            .updateMask(wildfire.eq(0).unmask(1));

Conversion

  [ee.Image('projects/wri-dist-alert-drivers/assets/conversion/dist-alert-conversion-africa-nov2023-oct2024_v01'), 
  ee.Image('projects/wri-dist-alert-drivers/assets/conversion/dist-alert-conversion-europe-nov2023-oct2024_v01'),
  ee.Image('projects/wri-dist-alert-drivers/assets/conversion/dist-alert-conversion-latam-nov2023-oct2024_v01'),
  ee.Image('projects/wri-dist-alert-drivers/assets/conversion/dist-alert-conversion-ne-asia-nov2023-oct2024_v01'),
  ee.Image('projects/wri-dist-alert-drivers/assets/conversion/dist-alert-conversion-north-am-nov2023-oct2024_v01'),
  ee.Image('projects/wri-dist-alert-drivers/assets/conversion/dist-alert-conversion-se-asia-oceania-nov2023-oct2024_v01')]
);

var conversion = cv_collection.mosaic()
                      .updateMask(confmask)
                      .updateMask(natLands_binary)
                      .updateMask(crop_cycle.unmask(2).neq(1))
                      .updateMask(wildfire.unmask(2).neq(1));

There are some alerts that remain unclassified. The data layers get merged together hierarchically, fire is the highest, then flooding, then crop cycles, then conversion. So, if a pixel is classified as wildfire and conversion, then the final classification is wildfire.

@01painadam 01painadam changed the title Add GFW DIST alerts with driver classification [Tooling] Add GFW DIST alerts with driver classification Jan 7, 2025
@01painadam
Copy link
Collaborator Author

@yellowcap confirming that we can apply the new Wildfire, Crop cycle, and Flooding layers on top of the current DIST alerts tool. Wildfire, Crop cycle, and Flooding are all simple binary masks that apply to alerts in the range Nov 2023 - Oct 2024 (something to bare in mind for the demo).

Note that the demo below also filters on confidence and natural lands.

It would be nice to follow the styles here

@01painadam
Copy link
Collaborator Author

Decision: anything outside of the driver time range are "unclassified"

@yellowcap
Copy link
Collaborator

Integrated in #101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants