Skip to content

#3144: MinResample / MaxResample: preserve NODATA correctly for double cell … - #3155

Merged
echeipesh merged 1 commit into
locationtech:masterfrom
Kapernikov:rebased_vanilla
Nov 16, 2019
Merged

echeipesh merged 1 commit into
locationtech:masterfrom
Kapernikov:rebased_vanilla

Conversation

@kervel

@kervel kervel commented Nov 15, 2019 •

Copy link
Copy Markdown
Contributor

Overview

The current code set NODATA for nodata cells, but NODATA is only valid for Int cell types. Double.NaN or doubleNODATA should be used for double cells
See #3144

Checklist

  • docs/CHANGELOG.rst updated, if necessary
  • Module Hierarcy updated, if necessary
  • docs guides update, if necessary
  • New user API has useful Scaladoc strings
  • Unit tests added for bug-fix or new feature

Demo

Optional. Screenshots/REPL

Notes

Closes #3144

@kervel kervel changed the title [WIP] #3144: MinResample / MaxResample: preserve NODATA correctly for double cell … #3144: MinResample / MaxResample: preserve NODATA correctly for double cell … Nov 15, 2019
if (isData(v)) math.max(currentMax, v) else currentMax
}
if (doubleMax == Double.MinValue) NODATA else doubleMax
if (doubleMax == Double.MinValue) doubleNODATA else doubleMax

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😨

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not okay ?

…type.

The current code set NODATA for nodata cells, but NODATA is only valid for Int cell types. Double.NaN or doubleNODATA should be used for double cells
See #3144

Signed-off-by: Frank Dekervel <[email protected]>
@kervel

kervel commented Nov 15, 2019

Copy link
Copy Markdown
Contributor Author

(oops i broke the tests, now the tests are fixed)

@echeipesh
echeipesh merged commit 4b918e0 into locationtech:master Nov 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pyramid.fromLayerRDD fails to respect NODATA values with ResampleMethods.Max

3 participants