[gdal-dev] Storing mask as part of the *.ovr file

Denis Rykov rykovd at gmail.com
Thu Apr 23 01:27:13 PDT 2020


Thanks! Could you please explain the meaning of INTERNAL_MASK_FLAGS_1=2? I
couldn't find it in the documentation.

On Thu, Apr 23, 2020, 12:44 AM Even Rouault <even.rouault at spatialys.com>
wrote:

> > But if I do:
>
> >
>
> > gdal_translate rgbmask.vrt rgb_with_external_msk.vrt -mask none -b 1 -b
>
> > 2 -b 3 -of VRT
>
>
>
> I guess in the above you meant without "-mask none", so
>
>
>
> "gdal_translate rgbmask.vrt rgb_with_external_msk.vrt -b 1 -b 2 -b 3 -of
> VRT"
>
>
>
> Well, that's a consequence of the behaviour of the 'auto' mode of -mask in
>
> https://gdal.org/programs/gdal_translate.html#cmdoption-gdal-translate-mask
>
> This is admitedly not super intuitive as the example I gave before lacked
> the "-mask none" when generating rgb_with_external_msk.vrt
>
>
>
> As you copy all non-mask input band, and mask is in auto mode, and thus
> copied too, this is equivalent to
>
>
>
> gdal_translate rgbmask.vrt rgb_with_external_msk.vrt -of VRT
>
>
>
> and the VRT driver is then smart enough to detect that its source is a
> VRT, so it is an equivalent of a single "cp" of the original VRT.
>
>
>
>
>
>
>
> --
>
> Spatialys - Geospatial professional services
>
> http://www.spatialys.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200423/0b2be8e3/attachment.html>


More information about the gdal-dev mailing list