[DONE] should we rescale the non byte data automatically? #308
Locked
vincentsarago
started this conversation in
Feature Request
Replies: 2 comments
-
FYI, I'm going to move forward with this! |
Beta Was this translation helpful? Give feedback.
0 replies
-
This was done in rio-tiler directly |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Right now when a user wants to create png/jpeg/webp image (part/tile/preview) from a non byte data, GDAL will throw an error complaining about data type note being supported by the image driver and thus the server returns 500
I'm 50/50 convinced we should at least return a black image by rescaling the data from the min/max value of the datatype( https://github.com/mapbox/rasterio/blob/b17b2e330e2ba5d15043ff2045dcfec912c38ed2/rasterio/dtypes.py#L63-L71)
How to
add 👇
here https://github.com/developmentseed/titiler/blob/master/titiler/core/titiler/core/factory.py#L339
cc @geospatial-jeff @kylebarron
Beta Was this translation helpful? Give feedback.
All reactions