-
Notifications
You must be signed in to change notification settings - Fork 4
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
correct veg/non logic in landcover veg frequency #176
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #176 +/- ##
===========================================
- Coverage 81.20% 81.20% -0.01%
===========================================
Files 50 50
Lines 4528 4522 -6
===========================================
- Hits 3677 3672 -5
+ Misses 851 850 -1 ☔ View full report in Codecov by Sentry. |
# implies any "wet" area potentially veg | ||
|
||
max_count_veg = expr_eval( | ||
"where((a<_v)&(b<_v), _v, b)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this < or <=?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strictly less, it's specific for the pattern of non-veg - veg - non-veg - veg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for confirming this
|
||
# consecutive observation of non-veg | ||
non_veg_data = expr_eval( | ||
"where(a<nodata, 1-a, nodata)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why it's 1-a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1: veg 0: non-veg. after flipping 1: non-veg, 0: veg, easier to use same function to calculate monthly median.
As the title. It removed the "likely water" -> non-veg, introduced consecutive observations of non-veg < threshold(2) -> veg. The earlier caused bare soil along water edges, where wo summaries don't have clear enough data to tell for sure if it's water, consequently it'll be non-water, non-water + non-veg -> bare soil. The absence of later would cause similar problem, where a water - veg - water - veg sequence would cause a pixel to be bare soil. It's very rare to have soil - veg - soil - veg sequence after the sanity check on the results of first implementation, and intuitively. The condition was also used in c2, though back to the time, there didn't seem to make any statistical difference to classify dry pixels either way. Now the pro of having the condition clearly out-weighted con, decide to introduce it now.