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

write_tiff crashes with complex data and geotag #1911

Open
brandy125 opened this issue Nov 11, 2024 · 2 comments
Open

write_tiff crashes with complex data and geotag #1911

brandy125 opened this issue Nov 11, 2024 · 2 comments
Assignees

Comments

@brandy125
Copy link

I am getting this error when trying to write a geotiff with complex data and geotag:

GDL> a=complex(dist(500),dist(500))
GDL> geo={modelpixelscaletag:[0,0,0]}
GDL> write_tiff,'test.tif',a,/complex,geo=geo
% UPDATEGEOTAGSINIMAGE: test.tif is not existing or is not a TIFF file!
% Error occurred at: UPDATEGEOTAGSINIMAGE   339 /usr/local/share/gnudatalanguage/lib/utilities/updategeotagsinimage.pro
%                    WRITE_TIFF         467 /usr/local/share/gnudatalanguage/lib/write_tiff.pro
%                    $MAIN$          
% Execution halted at: $MAIN$          
GDL> 
@brandy125
Copy link
Author

Thanks @GillesDuvert for the patch.

Unfortunately I am not able to read the file back:

GDL> a=complex(dist(500),dist(500))
GDL> geo={modelpixelscaletag:[0,0,0]}
GDL> write_tiff,'test.tif',a,/complex,geo=geo
GDL> b=read_tiff('test.tif',geo=geon)
Unsupported PIXEL_TYPE: 0
% TIFF_READ: Failed to read TIFF image with defined parameters
% Error occurred at: READ_TIFF           27 /usr/local/share/gnudatalanguage/lib/read_tiff.pro
%                    $MAIN$          
% Execution halted at: $MAIN$          

@GillesDuvert GillesDuvert reopened this Nov 25, 2024
@GillesDuvert
Copy link
Contributor

hm I'm afraid libtiff does not read complex values. And we basically use libtiff FOR READING (witing, I did that directly in a GDL procedure) . I cannot figure if the current libtiff does or not read complex values. The documentation says nothing. Adding @rexso for comment and action if possible.

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

No branches or pull requests

3 participants