Skip to content

Commit

Permalink
updated stats to return valid by default
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielJDufour committed May 12, 2024
1 parent 56c9e16 commit 8b5035f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stats/stats.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 8b5035f

Please sign in to comment.