Skip to content
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

is_nodata(NaN) when NaN is used as no-data value ? #361

Closed
soxofaan opened this issue Apr 1, 2022 · 2 comments · Fixed by #362
Closed

is_nodata(NaN) when NaN is used as no-data value ? #361

soxofaan opened this issue Apr 1, 2022 · 2 comments · Fixed by #362
Assignees
Labels
Milestone

Comments

@soxofaan
Copy link
Member

soxofaan commented Apr 1, 2022

In our geotrellis implementation IEEE754 NaN is used as no-data value for float raster cubes.

This creates a conflict in the definition of is_nodata(NaN):

"description": "Checks whether the specified data is missing data, i.e. equals to `null` or any of the no-data values specified in the metadata. The special numerical value `NaN` (not a number) as defined by the [IEEE Standard 754](https://ieeexplore.ieee.org/document/4610935) is not considered no-data and must return `false`.",

data is missing data, i.e. equals to null or any of the no-data values

=> is_nodata(NaN) = true

The special numerical value NaN as defined by IEEE Standard 754 is not considered no-data and must return false.

=> is_nodata(NaN) = false

@m-mohr
Copy link
Member

m-mohr commented Apr 4, 2022

Yeah, so this was meant to say that NaN is not implicitly also a no-data value as some may have understood it. Of course, it should possible that NaN is a nodata value if explicitly specified as such. I'll issue a PR to fix this.

m-mohr added a commit that referenced this issue Apr 4, 2022
@m-mohr m-mohr linked a pull request Apr 4, 2022 that will close this issue
@m-mohr
Copy link
Member

m-mohr commented Apr 4, 2022

See PR #362

@m-mohr m-mohr self-assigned this Apr 4, 2022
@m-mohr m-mohr added this to the 1.3.0 milestone Apr 4, 2022
@m-mohr m-mohr added the patch label Apr 4, 2022
m-mohr added a commit that referenced this issue Apr 19, 2022
* `is_nodata`: Clarified that `NaN` can be considered as no-data value only if it is explicitly specified. #361
@m-mohr m-mohr closed this as completed Apr 19, 2022
@m-mohr m-mohr modified the milestones: 1.3.0, 2.0.0 Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants