-
Notifications
You must be signed in to change notification settings - Fork 184
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
Writing non-byte number types #103
Comments
Currently, the TIFF writing is currently only capable of dealing with Byte data, other datatypes such as Float 32 will probably be supported at some point in the future. @DanielJDufour do you already have plans for that functionality? |
Awesome, @energyaccessexplorer ! I'm glad to see that it's working for Uint8Array. Unfortunately, geotiff.js (and specifically the geotiffwriter.js doesn't support writing anything other than Uint8Arrays of values. However, adding support for writing a Float32 Raster would be super valueable. Want to work on it? :-) You would have to adjust a few lines in this area of the code: https://github.com/geotiffjs/geotiff.js/blob/master/src/geotiffwriter.js#L255 where the values are being written. I believe the metadata writing functions could stay the same, but I'm not 100% sure. |
@DanielJDufour. I submitted a pull request. #106 |
@m0ose , awesome! I'm looking at your PR now! |
Hello! I am trying to write a TIF file with a Float32 raster.
This works like a charm:
when
raster
is a Uint8Array, but if I pass a Float32Array, the resulting file shows:Type=Byte
(0-255) according togdalinfo
.I have peeked at this with no luck. Is wriing Float32 TIF supported? Am I missing something on
metadata
?Thank you for geotiff!
The text was updated successfully, but these errors were encountered: