eMapR / LT-GEE

Google Earth Engine implementation of the LandTrendr spectral-temporal segmentation algorithm. For documentation see:
https://emapr.github.io/LT-GEE
Apache License 2.0
198 stars 65 forks source link

Fix getChangeMap logic for year filter #23

Closed jdbcode closed 3 years ago

jdbcode commented 3 years ago

Closes #22

Changes the order of filtering and change identity selection. The current code identifies change segment first and then filters it. This flow order can result in missed change when the year filter is used and change identified as greatest/least, earliest/latest, fastest/slowest etc. The fix is to filter the segments first and then select by change identity.

jdbcode commented 3 years ago

I've done some testing to ensure that the changes WAI, but if you are aware of specific cases where the old implementation was incorrect, please test them. You can use the script mentioned here for testing - change parameters as needed (see docs for parameter defs).

jdbcode commented 3 years ago

Robert, if you are satisfied with the changes, please approve your review and merge.

jdbcode commented 3 years ago

🎉😃

jdbcode commented 3 years ago

Change synced to git-on-borg: https://earthengine.googlesource.com/users/emaprlab/public/+/42cceae74ff928d6909aee0a8b02f095a47da8a7/Modules/LandTrendr.js