-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: Support integer data types for netCDF _Unsigned convention #6352
Comments
From file referenced in corteva/rioxarray#574:
|
no. That would be quite horrible to have in the GDAL abstraction that remnant of a netCDF hack (or "implementation detail" if one wants to be more neutral) The right fix is here would be to expose short + _Unsigned=true as GDT_UInt16 |
That makes sense to me. Thanks for the clarification 👍. I will update the issue title. |
netCDF: handle variables of type NC_SHORT with _Unsigned=true as GDT_UInt16 (fixes #6352)
Thanks @rouault 👍 |
Related:
Currently, GDAL only checks for the unsigned type when the datatype is byte:
gdal/frmts/netcdf/netcdfdataset.cpp
Lines 626 to 702 in 8e4c84b
However, there are scenarios when the datatype is an integer (See: corteva/rioxarray#574). Thoughts on this?
Also, sometimes users want to convert this data to other formats. I didn't see a standard way to preserve the original data type while denoting that the data should be converted to unsigned in the GDAL metadata. Did I miss something?
The text was updated successfully, but these errors were encountered: