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

Provide ability to enable NoData while preserving underlying storage type. #1674

Closed
metasim opened this issue Oct 17, 2016 · 4 comments
Closed
Milestone

Comments

@metasim
Copy link
Member

metasim commented Oct 17, 2016

Many GeoTIFF files from USGS are encoded with an implicit NoData value (zero). Upon reading, the only way to enable NoData is to make a full in-memory copy via convert. Further, to do that, conversion you have to match on the storage type to figure out which NoData variant to use. So wee need the ability to:

  1. Select the NoData type corresponding to a given NoNoData type.
  2. Perform NoData conversions in a way that doesn't require copying underlying pixel values when they aren't going to be changing.
@lossyrob lossyrob added this to the 1.0 milestone Oct 18, 2016
@echeipesh
Copy link
Contributor

To rephrase the problem: the metadata on the GeoTIFF files is invalid (or unspecified). Our best guess is to say that unspecified NoData means there is no NoData value.

We can't really make the guess any better but we can provide a way to change the cellType label on Tile. If we implement Tile.withCellType(ct: CellType): Tile method (and all the related place like multiband tiles and RDD interfaces) we should be good.

@metasim
Copy link
Member Author

metasim commented Oct 22, 2016

Our best guess is to say that unspecified NoData means there is no NoData value.

My understanding from reading the spec is that that is indeed the correct meaning.

Just to be clear, this request is to allow for one to "override" that in a copy-free way in cases where the source data provider has not used this tag, but has perhaps communicated the notion of a no-data value via some other means (i.e. data product users' manual). Any notion of "guessing" is not the intent here.

@lossyrob
Copy link
Member

My vote is for other semantics besides withCellType. That doesn't make it clear that this is not a conversion. interpretAs(cellType) feels more clear to me

@metasim
Copy link
Member Author

metasim commented Nov 5, 2016

Guys, this is fantastic. Thanks so much for adding this feature!

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

No branches or pull requests

4 participants