Open rafaqz opened 4 months ago
How about inverting it? Instead of "cf" call it "raw". If raw=false, offset and scale are applied, if raw=true, offset and scale are NOT applied?
And raw=true would be the default?
Maybe "navalue" instead of "maskingval"?
Currently I've got scaled=true
as the default instead of cf
. raw
might suggest the missing value is also not transformed?
Main concern with navalue
is it sounds like R, and isn't really used in julia
Yes, you are right that with "raw" one may expect that data were not touched at all.
Indeed, "navalue" originates from my heavy R usage! And I agree NA is not very julia way.
Point taken:)
Thanks for the input though, good to have all the options to choose from
Coming back to this I like how short and obvious raw=true
is!
But to mean no scaling and no masking - so it will override everything else.
Attention: Patch coverage is 82.84251%
with 134 lines
in your changes missing coverage. Please review.
Project coverage is 81.79%. Comparing base (
570fd17
) to head (54056cb
). Report is 9 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR standardises cf and missingval behaviour accross all sources.
New keywords are:
cf=true
: applyoffset
andscale
if the are not zero and one.maskingval=missing
this is the value the missingval will be converted to if there is one.I don't like either of these names! if you can think of anything better please suggest something.
@felixcremer @meggart this is the new diskarrays object that does 2-way cf and missingval/maskingval conversions
https://github.com/rafaqz/Rasters.jl/compare/cf?expand=1#diff-1478a88a8bdcffcf7f556cc1865dbe18d69b5c03f75b4481e1f5889e8a6b6b73