Tiling with resampling=lanczos adds border to COG edges #622
showcaseearth
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
While using Titiler (AWS with 0.11.6) and experimenting with parameters to find the best output for my use case, I noticed that using any
tiles/endpoints withresampling=lanczosadds a border to the edges of the rendered pixels at low to mid zoom levels. It is most obvious on straight edges (pictured below), but the easiest public example I have is from OAM. Adjusting other parameters did not seem to help, nor did I see any other common resampling methods produce a similar effect at any zoom level.Opening here to discuss whether this is expected and where the root issue might be, given this is the most likely relevant dependency of Titiler.
I am building an app which often showcases historic maps and images with other discrete details, so lanczos yielded the best quality results at lowest zoom level for a given image. In the meantime, using a higher scale also works and this issue is probably a very low priority, but it would be a nice-to-have to be able to use lanczos.
I'll also note that I successfully use lanczos resampling without a similar border on the preview endpoint– a really awesome feature of Titiler btw!
Examples
Example using
cog/tiles/15/18272/12136@1x.png?TileMatrixSetId=WebMercatorQuad&url=https%3A%2F%2Foin-hotosm.s3.us-east-1.amazonaws.com%2F649d03872fb3a800012c9e6d%2F0%2F649d03872fb3a800012c9e6e.tif&resampling=lanczos, with another nonpublic rectangular example below to better illustrate.lanczos vs nearest

Beta Was this translation helpful? Give feedback.
All reactions