MarineSensitivity / server

server setup for R Shiny apps, RStudio IDE, R Plumber API, PostGIS database, pg_tileserv
MIT License
0 stars 0 forks source link

upgrade gdal and R using r2u to have unlimited GeoTIFF metadata #9

Open bbest opened 3 weeks ago

bbest commented 3 weeks ago

Problem with terra::writeRaster():

Metadata exceeding 32000 bytes cannot be written into GeoTIFF. Transferred to PAM instead.

https://github.com/OSGeo/gdal/issues/4116#issue-944780416

fix: https://github.com/OSGeo/gdal/commit/0e4f770d547b1b3424959bd239c230bb97fdf3e7

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

GDAL 3.5.0 - Overview of Changes

https://github.com/OSGeo/gdal/blob/v3.5.0/NEWS.md May 9, 2022

bbest commented 3 weeks ago

r2u, stars