-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Artifacts on edges of overlapping parts of vrt #11583
Comments
If you display both left.tf and right.tif in QGIS, you'll see they gray artifact. This is not a GDAL issue (at least not on the rendering side), but rather due to the lossy JPEG compression which alters colors in the transition between data and nodata. To avoid that, at generation time, one should possibly have to not strictly apply the mask, but keep pixels that are slighlty out of it, to preserve a full 16x16 JPEG DCT encoding units. But that might not be desirable in some cases where one really needs to "censor" strictly pixels out of the mask |
You are right, I did not notice that separate tiffs themselves have grayed edges. Just the lanczos resampling surprised me. Feel free to close the issue if there is nothing to fix/improve on gdal side. Thank you! |
@rouault BTW i am creating those tiffs from RGBA zstd compressed geotiffs like this: This creates that grayed edge. Should I report it as a separate issue? Or is it a feature? My intent is to nicely render a) slightly overlapping geotiffs; b) touching geotiffs. My source is jpeg-compressed geotiffs (without mask or alpha) and a separate mask for each. I want to use vrt so when just one geotiff updates (new aerial imagery for some area) then I don't need to reprocess all parts. |
there's nothing we can do in that use case from RGBA to RGB+mask+JPEG since the data has already been censored. What could potentially be done is convert RGB with a vector mask to RGB+mask+JPEG in a more colorful preserving way, but that would be quite involved and definitely not something I would tackle on maintenance funds. I would rather suggest you use other compression methods such as WEBP or JPEGXL which deal more nicely with alpha. |
I see. Thank you for your suggestions, I will try it 🙂. |
Fixed per #11585 |
What is the bug?
If I create a vrt from two overlapping masked geotiffs then there are artifacts on the edge of the overlap.
left.tif.gz
right.tif.gz
gdalbuildvrt final.vrt left.tif right.tif
causes grayed line:gdalbuildvrt -r lanczos final.vrt left.tif right.tif
causes gray/black line:Steps to reproduce the issue
Build vrt of attached files (use lanczos resampling for the most obvious result) and render it.
Versions and provenance
GDAL 3.11.0dev-badc1cd714, released 2025/01/05
Linux bono 6.11.10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.11.10-1 (2024-11-23) x86_64 GNU/Linux
Additional context
No response
The text was updated successfully, but these errors were encountered: