Skip to content
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

readfile: support GDAL int8 dtype #1083

Merged
merged 4 commits into from
Sep 8, 2023
Merged

readfile: support GDAL int8 dtype #1083

merged 4 commits into from
Sep 8, 2023

Conversation

yunjunz
Copy link
Member

@yunjunz yunjunz commented Sep 3, 2023

Description of proposed changes

This PR adds the support of reading int8 type for files in GDAL format, as suggested by @scottstanie in #1081.

  • add the correction int8 conversion between GDAL and NumPy in DATA_TYPE_GDAL2NUMPY/NUMPY2GDAL

  • add numpy_to_gdal_dtype() from dolphin

  • add gdal_to_numpy_dtype() from dolphin

I did not replace the usage of dict conversion with the two functions above yet, because cint16/32 is supported by GDAL but not in numpy yet, thus, the dict conversion may be more generic at the moment for translation purposes.

Reminders

+ add the correction int8 conversion between GDAL and NumPy in DATA_TYPE_GDAL2NUMPY/NUMPY2GDAL

+ add numpy_to_gdal_dtype() from dolphin

+ add gdal_to_numpy_dtype() from dolphin
@yunjunz yunjunz requested a review from scottstanie September 3, 2023 14:06
@yunjunz yunjunz merged commit b19ff4b into insarlab:main Sep 8, 2023
4 checks passed
@yunjunz yunjunz deleted the gdal_int8 branch September 8, 2023 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mintpy can't load int8 types from GDAL
2 participants