Hotspots Prep Script - wri/gfw-analysis GitHub Wiki

This script preps an AOI for input into the space time cube.

Before running the script, ensure all mosaic paths are correct. They should be currently set to mosaics on the server, and the tree cover density file should be remapped to 0-10=NoData and 11-100=1 to create an output with a threshold of 10%. If a greater tree cover threshold is required, remap the mosaic.

The script takes an AOI (indir) and creates a buffer to ensure there is no edge effect in the hotspot analysis. You should select a buffer distance slightly larger than the neighborhood size you will use in your hotspot analysis.

It then extracts the loss by the buffered AOI boundary and multiplies that output by the remapped tree cover density mosaic. This results in loss data for your buffered AOI at your specified threshold.

Finally, the script converts to point, reprojects into World Ekert IV, and calculates a date column needed for the emerging hotspot analysis.