[gdal-dev] gdalbuildvrt and nulls again - now from Photoshop

Even Rouault even.rouault at mines-paris.org
Tue Jul 14 15:08:28 EDT 2009


Le Tuesday 14 July 2009 20:50:14 William Kyngesburye, vous avez écrit :
> Ah, yes, some of the images don't have nulls, and so I didn't save the
> transparency.
>
> Is it to generate the vrt with mixed rasters?  Maybe merge the vrts of
> one set of no-null rasters and one set of rasters with nulls in a text
> editor?
>
> Is there a technical reason (in the vrt format) that gdalbuildvrt
> can't mix 3-band (no nulls) and 4-band (nulls) rasters?

No, not really. You could create a VRT with 4 bands, and only add 3 bands as 
source when the dataset has only 3 bands. But I think that the 4th band will 
be filled with 0 (transparent) whereas you would generally expect 255 (full 
opacity), so there won't be any real interest in making gdalbuildvrt more 
clever in the current state of VRT capabilities. We would probably need 
something like a ConstantSource for that use case.

> Or is it just 
> rejecting the mismatches for simplicity?

That was the main reason actually. But you could file an enhancement ticket to 
track that need.

>
> -----
> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
> http://www.kyngchaos.com/
>
> "Time is an illusion - lunchtime doubly so."
>
> - Ford Prefect




More information about the gdal-dev mailing list