You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's implicit within the value range of possible output. The maximum value that can be represented by 3 position base 256 is:
256 ** 3 = 16777216
3.4028234663852886e+38 is the max/min value of float32, and probably is a nodata value.
There is no way to encode this very large absolute value within the smaller above range. In addition, there isn't any concept of transparent (yet) in this kind of encoding, and no clear path forward.
In order to handle this, you should:
Decide on a "fill" pixel value for these nodata areas -- probably 0
Set these pixels to the desired value
That said -- thanks for the heads up on documentation. Some docstrings have been written in the code, I should generate some basic api docs on those.
Workaround: you can automatically change nodata values to some other value, for example 0 or base value.
To do that, in encoders.py function data_to_rgb, just before first statement of data = data.astype(np.float64) add this line: data[data < 0] = 0
This changes all negative values to 0.
While processing a tif with very large no data value, i get this error:
ValueError: Data of 3.4028234663852886e+38 larger than 256 ** 3
A little unexpected since there is no documentation of this limitation.
The text was updated successfully, but these errors were encountered: