Uses TryFrom to convert into generic type
Resolves #2 (closed): Instead of multiplying the Ones array with the no_data_value
I first convert it to the type of the generic parameter, using try_from
. The returned type of no_data_value
is Option<f64>
so it seems that this value is always this type? At least that's what we have coming from the gdal type.
The function does not required the Mul
trait to be satisfied, but the TryFrom
, however we should be able to remove TryFrom<f32>
because of the described situation with gdal::raster::RasterBand::no_data_value
I need some help on the TODO
@spadarian how do I check that the resulting tile is 100% made of the no_data_value
?
Edited by Rodrigo Valin