GeoTIFF / geoblaze

Blazing Fast JavaScript Raster Processing Engine
http://geoblaze.io
MIT License
181 stars 28 forks source link

NaN values cause unexpected results #208

Open avmey opened 1 year ago

avmey commented 1 year ago

Describe the bug If a raster contains NaN as a value (usually as the no-data value), geoblaze.sum() returns [NaN]

To Reproduce

import geoblaze from "geoblaze";

const test = async () => {
    const sum = await geoblaze.sum([Any tif with NaN as no-data value]);
    console.log(sum); \\ outputs [NaN]
};

test();

Expected behavior Expect geoblaze to ignore NaN no-data values and return normal sum.