[gdal-dev] question for scaling default

Michael Sumner mdsumner at gmail.com
Sat Aug 13 23:07:42 PDT 2022


Hello, I have a new driver candidate, it's natively a type Byte and is a
percentage (or fraction) floating point value when unscaled.  I have a
couple of questions. .

https://github.com/OSGeo/gdal/pull/6183

I'd like to have it unscale by default, with band type Float32 - but be
able to opt out of scaling, and return the raw Byte type. I think that is a
good default since most usage will want the fraction value, but
occasionally useful to obtain the raw codes that include some special out
of range values (>255).

I think I can work out how to do this, but is there a driver that already
provides this kind of behaviour that I can learn from?

Also, I feel like fraction (0, 1) is a more sensible data value than
percentage (0, 100), although I've used percentage in the past with these
data. Any thoughts, or examples that exist in GDAL?

Thanks very much, Mike



-- 
Michael Sumner
Software and Database Engineer
Australian Antarctic Division
Hobart, Australia
e-mail: mdsumner at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220814/788b28a9/attachment.htm>


More information about the gdal-dev mailing list