Re: Any way to get/set the raster band scale and offset?
toggle quoted messageShow quoted text
Raster scale and offset don't surface in Rasterio versions 1.0.9 and older only because no user has spoken up them. I'd be happy to add these for 1.0.10.
Hi! I am using rasterio to convert a number of geotiffs that were originally
created using GDAL. To preserve the image metadata I'm currently using a combination of
the 'profile', 'descriptions' and 'units' properties of DatasetBase as well as 'tags()'.
However, it is unclear to me how to get and set the 'Scale' and 'Offset' value for a raster band.
Since there is a 'units' property in 'DatasetBase', I would have expected there to be a 'scales' and 'offsets'.
Likewise, in 'DatasetWriterBase' there is a 'set_band_unit()', but no 'set_band_offset()' or 'set_band_scale()'.
The GDAL functions that I would normally use are:
Is there any way to access these values using rasterio?
Join email@example.com to automatically receive all group messages.