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": {}
  }
]
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to