Skip to content
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

Mask for overlapped layers masks both of them #1148

Closed
drnextgis opened this issue Dec 14, 2018 · 2 comments · Fixed by #3303
Closed

Mask for overlapped layers masks both of them #1148

drnextgis opened this issue Dec 14, 2018 · 2 comments · Fixed by #3303

Comments

@drnextgis
Copy link
Contributor

drnextgis commented Dec 14, 2018

I'd like to mosaic two overlapped rasters with VRT (see attachments). Both of them has a mask. But result looks like this. Is it expected result?

image

gdalbuildvrt -input_file_list list.txt output.vrt

overlapped-rasters.zip

@rouault
Copy link
Member

rouault commented Dec 14, 2018

"expected" yes as some famous CPU founder claims that their chips work as intended despite having security holes :-)
So more seriously VRT doesn't do alpha-compositing. It just takes the alpha component of the last-appearing source.
gdalwarp is currently the tool to get the effect you want (so in a non virtual way)

@drnextgis
Copy link
Contributor Author

drnextgis commented Dec 14, 2018

In this particular case these rasters don't have an alpha bands but GDAL mask. Does it behave the same? I tried to create alpha band out of a mask with gdalwarp but faced with a problem, that I reported here #794

rouault added a commit to rouault/gdal that referenced this issue Dec 18, 2020
… to allow compositing of overlapping sources (fixes OSGeo#1148)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants