[gdal-dev] gdalwarp and internal transparency masks

Denis Rykov rykovd at gmail.com
Sat Jul 21 05:40:54 PDT 2018


Hi,

I have a GeoTIFF raster with internal mask. Is it possible to retain this
mask while warping?

Mask is not retained now:

$ gdalinfo -json original.tif | jq .bands
[
  {
    "band": 1,
    "block": [
      3,
      2
    ],
    "type": "Byte",
    "colorInterpretation": "Gray",
    "mask": {
      "flags": [
        "PER_DATASET"
      ],
      "overviews": []
    },
    "metadata": {}
  }
]

$ gdalwarp --config GDAL_TIFF_INTERNAL_MASK YES original.tif destination.tif
Processing input file original.tif.
0...10...20...30...40...50...60...70...80...90...100 - done.

$ gdalinfo -json destination.tif | jq .bands
[
  {
    "band": 1,
    "block": [
      3,
      2
    ],
    "type": "Byte",
    "colorInterpretation": "Gray",
    "metadata": {}
  }
]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20180721/be7995f2/attachment.html>


More information about the gdal-dev mailing list