Custom ImageType for factory #255
-
Hi, I first want to thank you for the great collection of tools. I have started a discussion for this as I am not sure if the fix should be here or in rio_tiler. We are currently investigating using titiler for the next generation of our Global Wind Atlas portal, and it is going quite well. As part of this tool, we are loading numerical tiff files in the browser to handle styling on the client side. One limitation to this approach is that the Tiff files are not compressed, and also don't have the nodata information included in them. I have implemented a hack to add the compression to rio_tiler/profiles.py by copying an updated file to my docker container after installing it, and thereby adding compression to all generated Tiff Tiles. However, it would be nice to have a way to override these output profiles directly in TiTiler, e.g. by creating a new ImageType class that is added to the Factory, and could then allow for overwriting the profile function to provide whatever we would like. An even better option for us would be able to directly configure the profile argument, as we would like to be able to set nodata values, and perhaps the compression predictor based on the original data. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
👋 Hi @neda-dtu, This is an interesting use case. First the compression. By default all responses should be compressed using either brotli or gzip (if accepted by the client). I don't think there are one good solution. I've got an idea, I'll start a PR and we can continue the discussion there! |
Beta Was this translation helpful? Give feedback.
👋 Hi @neda-dtu,
This is an interesting use case.
First the compression. By default all responses should be compressed using either brotli or gzip (if accepted by the client).
I don't think there are one good solution. I've got an idea, I'll start a PR and we can continue the discussion there!