-
Notifications
You must be signed in to change notification settings - Fork 179
IospHelper cast error, Integer to Short #638
Comments
Fleshing this out a bit, the problem is not necessarily in IospHelper but possibly instead in the HDF-4 handler. It seems that the data are extracted as a short DataType, although the attribute _Unsigned = "true" suggests the data values would be better taken as int. But being valued as 65535, the fill value attribute is extracted as an int, and when IospHelper tries to save a copy of it, it tries to cast it to a short in order to match the DataType of the data array. Since an integer can't be cast to a short, the exception occurs. |
Can you send an example file? |
The file that's giving me trouble is available at https://dl.dropboxusercontent.com/u/826984/sample_data/NOAA11_AVHRR_198902_01.MOS_L2B_NSMC.HDF?dl=1 |
Possibly worth mentioning is that this problem seems to be the opposite of what is happening with an HDF-5 dataset as described in issue #593. |
Was this fixed by #642? |
Looks like it. The data in the sample file can now be read. There's still an problem with interpreting the data, but that's a result of how the attributes are specified and not pertinent to this actual issue/bug. |
Trying to work with an HDF-4 dataset that has a variable described in CDL as
When trying to retrieve the data via
Variable.read(int[], int[])
, I am getting a class cast error:The line where the exception occurs is attempting to cast the fillValue.
The text was updated successfully, but these errors were encountered: