From: Dirk S. <st...@la...> - 2013-10-17 08:54:06
|
Hello everyone, I have a short question about keeping all metadata of a GeoTiff, which was modified by GeoTools. I am using GeoTools to read a GeoTiff input stream, modify it and finally write it to an output stream. First, the input is read by the GeoTiffReader, then the GridCoverage2D is modified and finally the GeoTiffWriter writes the modified GridCoverage2D to an output stream. It is important that the input and output streams have exactly the same metadata. Unfortunately, I did not find any method or way to copy all metadata of the input to the output. The GeoTiffWriter just offers the method "setMetadataValue" which allows to set single metadata values. As the value parameter can only be a string, it is impossible to set more complex tiff tags (e.g. XResolution). Can anyone help me, if there is a way to keep all metadata of a GeoTiff, which was modified by GeoTools? Thanks for any help. Kind regards, Dirk |