-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gnarly results that I can't explain #207
Comments
I'm also not entirely sure whether
|
So, I've found the area in the dataset explorer and these are indeed "correct" values (although they're obviously gibberish). Is there a way to filter these out somehow? I couldn't find an appropriate API for it, but I'm assuming that's because I'm a dum-dum :D. |
Hey, sorry about that. Nothing you've done wrong. There's just often weirdness when dealing with no data values and Float 32 numbers. There's a bit of discrepancy between the No Data Value provided in the GeoTIFF metadata ( Fortunately though, there's two workarounds possible. The easiest is to pass in a new filter function to the stats call: const filter = value => value !== undefined && value !== -3.3999999521443642e+38;
geoblaze.stats(gsoc, geometry, undefined, filter); The filter function is undocumented functionality, so I can't commit to maintaining that specific function param in the future. So if you go this route, I'd recommend locking your geoblaze version in your package.json (if you haven't already). Alternatively, another solution, which is guaranteed to work into the future is to correct the noDataValue after parsing like so: import parseGeoRaster from "georaster";
const georaster = await parseGeoRaster(url);
georaster.noDataValue = -3.3999999521443642e+38;
geoblaze.stats(georaster, geometry); This is guaranteed to work because it's using georaster's public API, which I will always do my best to maintain. Let me know if this helps. Happy to provide more assistance. Also, thank you so much for alerting me to this issue and this great dataset. Now with a publicly available geotiff file in hand, I'll be able to write some tests and starting thinking about how to solve this issue in the future. |
Describe the bug
Hey hey! I'm working with a dataset called GSOC to calculate soil organic carbon for a geometry. There's some geometries that are producing... interesting :D results for us. If I run
geoblaze.stats
on the geometry, it gives me these results:That
-3.3999999521443642e+38,
doesn't seem right, and I have no idea what's causing that...To Reproduce
Expected behavior
I'm not sure to be honest. QGIS doesn't give me values like this when loading the dataset and looking up the coordinates...
Any help at all understanding what's happening here would be greatly appreciated <3
The text was updated successfully, but these errors were encountered: