Open yaguzmang opened 2 months ago
@minotogna Just had a call with Pengcheng, and this functionality is covered by the ESTIMATE CUSTOM AGREEMENT AREA button, so there is no need to implement an extra feature. We can close this issue.
@yaguzmang @minotogna
Yes, it does work, as demonstrated in the call, but when I try it, there is an error:
@pengchenglai I will look into it
I was able to reproduce in the review platform (with another country):
It seems to be related to the allowed computations that can be done at the same time in GEE. After waiting for a bit, I made the request again and got back the result:
It might work for a country with a relatively smaller land area, but for medium-sized and larger countries, the same approach does not seem to work and might exceed the computational power regardless of the waiting time.
@yaguzmang
It might work for a country with a relatively smaller land area, but for medium-sized and larger countries, the same approach does not seem to work and might exceed the computational power regardless of the waiting time.
@pengchenglai @yaguzmang We need to talk on how to fix this . Maybe some big machine with cloud computing , but must be done outside the platform ?
We need to talk on how to fix this . Maybe some big machine with cloud computing , but must be done outside the platform ?
Would revising the way we calculate these areas be an option? From the documentation, if we adjust scales we could improve the speed:
"This silly example is just for demonstration. The purpose of this error is to ask you whether you really want to reduce 80300348117 (that's 80 billion) pixels."
Noting that changing the scale would affect accuracy.
@yaguzmang
Possible to try removing the validation of waiting time? Maybe it can help, like below:
var area1 = ee.Number(calculateArea(agreement6to9)).format('%,.2f').evaluate(function (result) { print('Agreement 6+ layers', result + ' ha')});
@yaguzmang @pengchenglai can I close this issue ?
@pengchenglai Unfortunately you last suggestion wouldn't fix the issue for big countries. The only options I see would be to have a cloud computing machine as Mino suggested, or reduce the accuracy significantly.
@yaguzmang I see the situation: if using cloud computing is not feasible, then we could consider reducing the resolution to the extent that a medium-sized country(in terms of land area), such as the DRC, could be computed to get a rough estimate.
From @pengchenglai:
TODO:Check how we currently calculate custom agreement areas.Implement a similar logic to calculate the aligned tree cover area percentage of selected layers.