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

Added Rasterband::set_no_data accepting Option<f64>. #308

Merged
merged 3 commits into from Sep 12, 2022

Conversation

metasim
Copy link
Contributor

@metasim metasim commented Sep 7, 2022

  • I agree to follow the project's code of conduct.
  • I added an entry to CHANGES.md if knowledge of this change could be valuable to users.

Closes #275

pub fn set_no_data_value(&mut self, no_data: f64) -> Result<()> {
let rv = unsafe { gdal_sys::GDALSetRasterNoDataValue(self.c_rasterband, no_data) };
self.set_no_data(Some(no_data))
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If backward compatibility weren't an option, I would have changed this signature of this to accept Option<f64> over creating a new method and delegating to it. Should we consider a breaking change here?

Copy link
Member

Choose a reason for hiding this comment

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

I think it's fine to change the API, we're only on 0.13.

@metasim
Copy link
Contributor Author

metasim commented Sep 8, 2022

@lnicola FYI: Went with breaking change approach.

@lnicola
Copy link
Member

lnicola commented Sep 12, 2022

bors r+

@bors
Copy link
Contributor

bors bot commented Sep 12, 2022

Build succeeded:

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.

Provide ability to delete no_data value.
2 participants