3

After processing a GeoTIFF, I want to include a note in the output GeoTIFF's header1. A keyword-value note like: "comment = image processed with software version x.y.z". Like we do with FITS files (https://docs.astropy.org/en/stable/io/fits/usage/headers.html#comment-history-and-blank-keywords) in astronomy.

Is that possible with GeoTIFF? If not, which GIS-compatible file format would allow me to do so?

  1. A file's header: metadata information about the file's content (i.e, data) encapsulated in the file itself (typically at the beggining of the file).

1 Answer 1

3

TIFF has tags for that purpose and you can edit them for example with gdal_edit https://gdal.org/programs/gdal_edit.html

-mo META-TAG=VALUE

Passes a metadata key and value to set on the output dataset if possible. This metadata is added to the existing metadata items, unless -unsetmd is also specified.

Example:

gdal_edit metadata.tif -mo "comment=image processed with software version x.y.z"

Check the result with gdalinfo

gdalinfo metadata.tif
...
Metadata:
  AREA_OR_POINT=Area
  comment=image processed with software version x.y.z
...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.