[gdal-dev] MrSID mask band support

Even Rouault even.rouault at mines-paris.org
Thu Feb 17 16:48:12 EST 2011


Le jeudi 17 février 2011 22:23:43, Brian Claywell a écrit :
> On Tue, Feb 15, 2011 at 1:19 PM, Even Rouault
> 
> <even.rouault at mines-paris.org> wrote:
> >> 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 ...
> 
> The basics of the patch were easy enough (23 lines): I initialize the
> overview manager near the end of MrSIDDataset::Open(), and implemented
> MrSIDDataset::IBuildOverviews() to simply print a warning, as Frank
> suggested.
> 
> As to your last comment about masks of the overviews and overviews of
> the masks, Even, the behavior as it stands after this patch is that 1)
> the masks of the overviews are coming back as GMF_ALL_VALID, and 2)
> overviews of the masks are non-existent. I believe this is consistent
> with the current behavior of, e.g., adding a per-dataset mask to a
> GeoTIFF file that already has overviews. If that's sufficient, I'll
> create a ticket and submit the patch as-is -- otherwise, I'm open to
> suggestions.

I think it must be OK as it is. Actually 
GDALDefaultOverviews::IBuildOverviews() will build overviews of the mask if 
the mask already exists, but yes, creating a mask after building the overviews 
will not lead to automatic building of the overviews of the mask. Those are 
really very specialized cases that could be improved later. Actually, you can 
run IBuildOverviews() on the .msk file and the overviews of the mask should be 
usable.

> 
> -b


More information about the gdal-dev mailing list