[gdal-dev] Storing mask as part of the *.ovr file
Even Rouault
even.rouault at spatialys.com
Wed Apr 22 15:44:07 PDT 2020
> 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/df12ad24/attachment.html>
More information about the gdal-dev
mailing list