Skip to content

Convert NODATA ByteConstantTile and ShortConstantCellType: unexpected result #3525

Closed

Description

@bossie

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.

Activity

  1. pomadchin commented on Oct 24, 2023

    @pomadchin
    Member

    Thanks for reporting!

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

  2. moradology commented on Oct 25, 2023

    @moradology
    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

  3. jdries commented on Oct 10, 2024

    @jdries
    Contributor

    @moradology I did a quick PR, I can expand it a bit further if you believe this general direction is fine.
    We'd like to solve this one as it's a fairly important issue for correctness.

  4. changed the title [-]convert NODATA ByteConstantTile: unexpected result[/-] [+]Convert NODATA ByteConstantTile and ShortConstantCellType: unexpected result[/+] on Oct 28, 2024
  5. self-assigned this
    on Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions