wri / gfw_forest_loss_geotrellis

Global Tree Cover Loss Analysis using Geotrellis and SPARK
MIT License
10 stars 8 forks source link

GTC-2889 Remove code in FCD related to geometry diffs and intermediate results #241

Closed danscales closed 3 months ago

danscales commented 3 months ago

GTC-2889 Remove code in FCD related to geometry diffs and intermediate results

We've been ignoring geometry diffs (location id == -2) for a long time, and we never pass in any intermediate results.

By removing this code, we avoid computing the centroid of each location geometry, inserting it into the feature id, then removing it from the feature id without having used it at all.

Move the only remaining code from combineGridResults() into the main function. Also, we had a duplicate call to data.withUpdatedCommodityRisk() in combineGridResults(), so got rid of that (already called data.withUpdatedCommodityRisk() in main analysis code above).

The test change was just a change in order of categories within a single result, which is no actual change of the results.