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

convert NODATA ByteConstantTile: unexpected result #3525

Open
bossie opened this issue Oct 23, 2023 · 2 comments
Open

convert NODATA ByteConstantTile: unexpected result #3525

bossie opened this issue Oct 23, 2023 · 2 comments
Labels

Comments

@bossie
Copy link

bossie commented Oct 23, 2023

Describe the bug

A NODATA ByteConstantTile that is converted to its own CellType, is no longer NODATA.

To Reproduce

import geotrellis.raster.{ByteConstantTile, byteNODATA}

val t = ByteConstantTile(byteNODATA, cols = 1, rows = 1)
assert(t.isNoDataTile)
assert(t.convert(t.cellType).isNoDataTile) // boom

Expected behavior

Seeing as the CellType doesn't change, this should be a no-op and the tile should remain NODATA.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

  • Java version: openjdk version "1.8.0_382"
  • Scala version: 2.12.15
  • GeoTrellis version: 3.6.0

Additional context

Add any other context about the problem here.

@pomadchin pomadchin added the bug label Oct 24, 2023
@pomadchin
Copy link
Member

pomadchin commented Oct 24, 2023

Thanks for reporting!

There is a bug in the NoData conversion. 👍 nice catch; wondering if any other cellTypes might be affected.

@moradology
Copy link
Contributor

Looked into this a small amount yesterday and it appears to be related to NoData in particular, so I'd guess this can happen in other contexts. Going to see about addressing this today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants