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 delete no_data value. #275

Closed
metasim opened this issue May 27, 2022 · 1 comment · Fixed by #308
Closed

Provide ability to delete no_data value. #275

metasim opened this issue May 27, 2022 · 1 comment · Fixed by #308
Assignees

Comments

@metasim
Copy link
Contributor

metasim commented May 27, 2022

Issue

There's no way to delete a no_data value in a RasterBand.

Commentary

Symmetry in the read vs. write is confusing. i.e. you can determine if there's no no_data value thanks to the return type Option<f64>:

pub fn no_data_value(&self) -> Option<f64> {

But the write method only accepts f64:

pub fn set_no_data_value(&mut self, no_data: f64) -> Result<()> {

Changing this parameter to Option<f64> would be a breaking change, but would improve the API. The other option is to have a fn delete_no_data(&mut self) -> Result<()> method which would be non-breaking, but less idiomatic on the Rust side.

@metasim
Copy link
Contributor Author

metasim commented May 27, 2022

This would be an easy PR to fix, but advice from the maintainers on the desired approach would be a prerequisite.

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 a pull request may close this issue.

1 participant