Skip to content

Commit

Permalink
Updated changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
metasim committed Sep 7, 2022
1 parent e6ad9a9 commit b53d0f9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@

- <https://github.com/georust/gdal/pull/303>

- Added ability to delete no-data when `None` is passed to `RasterBand::set_no_data(&mut self, no_data: Option<f64>))`

- <https://github.com/georust/gdal/pull/308>


## 0.13

- Add prebuild bindings for GDAL 3.5
Expand Down
6 changes: 2 additions & 4 deletions src/raster/rasterband.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,15 +443,13 @@ impl<'a> RasterBand<'a> {
pub fn set_no_data(&mut self, no_data: Option<f64>) -> Result<()> {
let rv = if let Some(no_data) = no_data {
unsafe { gdal_sys::GDALSetRasterNoDataValue(self.c_rasterband, no_data) }
}
else {
} else {
unsafe { gdal_sys::GDALDeleteRasterNoDataValue(self.c_rasterband) }
};

if rv != CPLErr::CE_None {
Err(_last_cpl_err(rv))
}
else {
} else {
Ok(())
}
}
Expand Down

0 comments on commit b53d0f9

Please sign in to comment.