[gdal-dev] GeoTiff writer refuses to set 42113 (NoData) from Python

Dustin Sims dustin.sims at belmont.tech
Thu Feb 11 09:44:59 PST 2021


Hey devs,

I have an issue where writing any GeoTiff from python results in

ERROR 1: TIFFSetField:Path/To/File: Unknown tag 42113

This happens regardless of warp or translate (the only two applicable tools for my use case)

However, running this through the CLI tools with the exact same inputs results in the NoDataValue being preserved, and no matching error output.
While I can use subprocess tools to run the CLI tool through python, I would very much prefer to use gdal.Warp() and the like.

I am unable to provide sample data, due to it being confidential. If I use gdal.Warp() or gdal.BuildVRT() to convert the input file to VRT, the NoData is preserved. Translating that to a GeoTiff  results in the above error and NoData is lost. Seems really strange that I am unable to write tag 42113, as that is one of the GDAL specific tags. Anyone have any advice on what I could do to resolve this?

GDAL version 3.2.1
GDAL-python 3.2.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210211/ce4be320/attachment.html>


More information about the gdal-dev mailing list