[gdal-dev] MrSID mask band support

Even Rouault even.rouault at mines-paris.org
Tue Feb 15 14:19:01 EST 2011


Le lundi 14 février 2011 21:52:05, Brian Claywell a écrit :
> I'm attempting to use CreateMaskBand() on a MrSID dataset with GDAL
> 1.8.0 and receiving the error that "CreateMaskBand() is not supported
> on this dataset." I presume this is because mask band support was
> implemented using the GDALDefaultOverviews manager, and since MrSID is
> a multi-resolution format, the overview manager is never initialized.

Yes most likely. The mask band support was added in RFC15, much later than 
overview support and the initial MrSID driver.

Your remark made me wonder why there wasn't a GDALDefaultMaskBand manager to 
deal with the mask band support, but closer inspection of the code shows that 
there's a small intersection of functionnality : if you have both external 
overview and mask support, if you have a mask and you build overviews, you'll 
need to build the overviews of the mask ...

> 
> Is there a way to make mask bands work with MrSID datasets out of the
> box? Barring that, since the MrSID driver reimplements the
> overview-related virtual functions to bypass the default overview
> manager, would there be any harm in initializing the overview manager
> when a MrSIDDataset object is created?

Yes I think this should be harmless. But I'm not too sure of what will happen 
if you try to get the overviews of the mask, or the mask of the overviews ...

Why not trying and report how successfull you were ?


> 
> -b


More information about the gdal-dev mailing list