<div dir="ltr">Hi,<div><br></div><div>I have a GeoTIFF raster with internal mask. Is it possible to retain this mask while warping?</div><div><br></div><div>Mask is not retained now:</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>$ gdalinfo -json original.tif | jq .bands</div></div><div><div>[</div></div><div><div>  {</div></div><div><div>    "band": 1,</div></div><div><div>    "block": [</div></div><div><div>      3,</div></div><div><div>      2</div></div><div><div>    ],</div></div><div><div>    "type": "Byte",</div></div><div><div>    "colorInterpretation": "Gray",</div></div><div><div>    "mask": {</div></div><div><div>      "flags": [</div></div><div><div>        "PER_DATASET"</div></div><div><div>      ],</div></div><div><div>      "overviews": []</div></div><div><div>    },</div></div><div><div>    "metadata": {}</div></div><div><div>  }</div></div><div><div>]</div></div><div><br></div><div><div>$ gdalwarp --config GDAL_TIFF_INTERNAL_MASK YES original.tif destination.tif</div><div>Processing input file original.tif.</div><div>0...10...20...30...40...50...60...70...80...90...100 - done.</div></div><div><br></div><div><div>$ gdalinfo -json destination.tif | jq .bands</div><div>[</div><div>  {</div><div>    "band": 1,</div><div>    "block": [</div><div>      3,</div><div>      2</div><div>    ],</div><div>    "type": "Byte",</div><div>    "colorInterpretation": "Gray",</div><div>    "metadata": {}</div><div>  }</div><div>]</div></div></blockquote><div><br></div></div>