-
Notifications
You must be signed in to change notification settings - Fork 96
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 no_data_value_u64
, set_no_data_value_u64
, no_data_value_i64
and set_no_data_value_i64
to RasterBand
#520
Conversation
Can you resample those to 1x1 and maybe merge them into a single file? |
Just realized I should add the setters too. Not enough coffee this morning... |
Good idea, I was actually wondering if there's any way to set it. Might make sense to use a larger value then, like 2^62. |
How about a 1x2 so we can have a data value and a no-data value? |
I basically neglected to see these |
Doesn't seem necessary to me, but sure it doesn't matter. Could come in handy in the future, who knows? |
What are you referring to here? The comment sequence is confusing. |
I meant that about the second pixel with a valid value. I don't think it's needed to test these functions, but they could be useful in a simple warping/resampling test. |
/// [`GDALDeleteRasterNoDataValue`](https://gdal.org/api/raster_c_api.html#_CPPv427GDALDeleteRasterNoDataValue15GDALRasterBandH) | ||
#[cfg(all(major_ge_3, minor_ge_5))] | ||
pub fn set_no_data_value_i64(&mut self, no_data: Option<i64>) -> Result<()> { | ||
let rv = if let Some(no_data) = no_data { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, isn't this awkward...
Taking an Option
seemed like a good idea at the time. Now we have three ways to clear it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think there's value in keeping them consistent...
The alternative is to add GDALDeleteRasterNoDataValue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And now I think we should go for that (but in a separate PR).
…erNoDataValueAsUInt64`
401f4a3
to
34303ae
Compare
GetNoDataValueAsInt64
and GetNoDataValueAsUInt64
no_data_value_u64
, set_no_data_value_u64
, no_data_value_i64
and set_no_data_value_i64
to RasterBand
Please squash at the end! |
🤦 EDIT: nvm, my bad. |
CHANGES.md
if knowledge of this change could be valuable to users.Adds
RasterBand::no_data_value_u64
andRasterBand::no_data_value_i64
, etc.