Open LeopardTree opened 2 years ago
👋 @LeopardTree . Hello. Sorry for the late reply. I authored the GeoTIFF writer and happy to help debug.
64
?birch.tif
file? It would help with debugging.I ran into this issue as well working on another project. I think the main issue is this line: https://github.com/geotiffjs/geotiff.js/blob/master/src/geotiffwriter.js#L255, which assumes that your data is in 8-bit 0-255 integer range. Just confirming the limitation. It'll require some refactoring. I'll be able to do it, but I'm unlikely to find time till mid-september after FOSS4G at the earliest.
Hey.
Thx for the help. I've changed workplace now so it's not so relevant anymore. We used the library gdal-async instead to solve it.
Ty
Ludvig
Den lör 9 juli 2022 22:44Daniel J. Dufour @.***> skrev:
I ran into this issue as well working on another project. I think the main issue is this line: https://github.com/geotiffjs/geotiff.js/blob/master/src/geotiffwriter.js#L255, which assumes that your data is in 8-bit 0-255 integer range. Just confirming the limitation. It'll require some refactoring. I'll be able to do it, but I'm unlikely to find time till mid-september after FOSS4G at the earliest.
— Reply to this email directly, view it on GitHub https://github.com/geotiffjs/geotiff.js/issues/294#issuecomment-1179604177, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARIUPDQGWI4LMUPZX5JTHWTVTHQELANCNFSM5RQQ6M4A . You are receiving this because you were mentioned.Message ID: @.***>
Facing the same issue while trying to write float values into tif file.
I want to write a geotiff file from a file I've read with geotiff.js. According to the website are the writeArrayBuffer() method in Beta version so I know it's not so reliable, but I want to know if it's possible creating a geotiff file with it?
The .tif files I'll managed to create can't be opened in normal picture programs, only in qgis. The values get right for rasters with integer values. But for rasters with floating values the values get truncated. Tries to increase BitsPerSample to 32 but didn't work.
If someone knows how to do it would be great.
Here's the code for a greyscale image:
FileDirectory before WriteArrayBuffer:
FileDirectory after WriteArrayBuffer: