This limitation came from the initial revision of metadata writing, in e86e2db, 20 years ago. There's no limitation in the TIFF spec nor in libtiff itself, to text tag data larger than 32 KB, so just remove it.
terra::gdal() # "3.4.1" on server
terra::gdal() # "3.5.3" on Mac
Problem with
terra::writeRaster()
:https://github.com/OSGeo/gdal/issues/4116#issue-944780416
fix: https://github.com/OSGeo/gdal/commit/0e4f770d547b1b3424959bd239c230bb97fdf3e7
GDAL 3.5.0 - Overview of Changes
https://github.com/OSGeo/gdal/blob/v3.5.0/NEWS.md May 9, 2022