From ae4f5ebe1373f48336a79ee6ecf461da7b1a73a7 Mon Sep 17 00:00:00 2001 From: Emma Ai Date: Mon, 2 Dec 2024 07:39:13 +0000 Subject: [PATCH] cover the edge cases of landcover level1 --- odc/stats/plugins/lc_veg_class_a1.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/odc/stats/plugins/lc_veg_class_a1.py b/odc/stats/plugins/lc_veg_class_a1.py index 98d13fb..18c2253 100644 --- a/odc/stats/plugins/lc_veg_class_a1.py +++ b/odc/stats/plugins/lc_veg_class_a1.py @@ -161,23 +161,26 @@ def l3_class(self, xx: xr.Dataset): }, ) - # all unmarked values (0) is terretrial veg - + # all unmarked values (0) and 255 > veg >= 2 is terretrial veg l3_mask = expr_eval( - "where(a<=0, m, a)", - {"a": l3_mask}, + "where((a<=0)&(b>=2)&(b