From c0eae9c3cf383680edfd48b4872ff02622ba69d2 Mon Sep 17 00:00:00 2001 From: Daniel Thiex Date: Tue, 11 Feb 2025 09:36:47 +0100 Subject: [PATCH] fix broken Planet Scope NDVI script --- planet/planetscope/ndvi/eob.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/planet/planetscope/ndvi/eob.js b/planet/planetscope/ndvi/eob.js index 124198f0..b0491975 100644 --- a/planet/planetscope/ndvi/eob.js +++ b/planet/planetscope/ndvi/eob.js @@ -288,11 +288,12 @@ function evaluatePixel(sample) { } const indexVal = sample.dataMask === 1 ? ndvi : NaN; + const clear = sample.dataMask && sample.clear; return { default: visVal, index: [indexVal], - eobrowserStats: [ndvi, sample.clear], + eobrowserStats: [ndvi, !clear], dataMask: [sample.dataMask], }; }