From 8b5035f9f133997a1ef47cb6ad70ea7d9bd27355 Mon Sep 17 00:00:00 2001 From: DanielJDufour Date: Sun, 12 May 2024 10:33:14 -0400 Subject: [PATCH] updated stats to return valid by default --- src/stats/stats.core.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stats/stats.core.js b/src/stats/stats.core.js index f641f25..d96b11f 100644 --- a/src/stats/stats.core.js +++ b/src/stats/stats.core.js @@ -85,8 +85,8 @@ const stats = (georaster, geometry, calcStatsOptions, test, { debug_level = 0, i ); return QuickPromise.resolve(done).then(({ vrm }) => { - // check if the user wants the number of valid pixels returned - const want_valid = calcStatsOptions.stats ? calcStatsOptions.stats.includes("valid") : calcStatsOptions.calcValid === true; + // check if the user doesn't want the number of valid pixels returned + const want_valid = calcStatsOptions.stats ? calcStatsOptions.stats.includes("valid") : calcStatsOptions.calcValid !== false; const use_virtual_resampling = vrm[0] !== 1 && vrm[1] !== 1;