<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>When gdal_translate reads in a GeoTIFF .tif file and writes out a .ppm file, the user receives a warning message saying that the georeferencing metadata is not being copied into the output .ppm file, and is being lost. When gdal_translate reads in a .tif file with TIFF tag 700 XMP metadata, and TIFF tag 33723 IPTC metadata, and writes out a .tif or .jp2 file, the user receives no warning that this metadata is not being copied, and so I was surprised to later learn that the XMP and IPTC metadata had been lost by gdal_translate.</div><div><br></div><div>I suggest that for GDAL 1.7 consideration be given to at least notifying the user via a warning message that any input .tif file with TIFF tag 700 XMP metadata, and TIFF tag 33723 IPTC metadata, and TIFF tag 34665 EXIF metadata will lose that metadata and not have it copied to the output file. Hopefully, a future GDAL release of gdal_translate will preserve TIFF tag 700 XMP metadata, and TIFF tag 33723 IPTC metadata, and the widely used TIFF tag 34665 EXIF metadata that supports GPS metadata.</div><div><br></div><div>The&nbsp;Kakadu applications kdu_compress and kdu_expand,&nbsp;which are available for free for Win32, Mac OS X, Linux, and Solaris,&nbsp;support conversions between TIFF/GeoTIFF .tif files and JPEG2000/GeoJPEG2000 .jp2 while preserving TIFF tag 700 XMP metadata, TIFF tag 33723 IPTC metadata, and TIFF tags 33550, 33922, 34264, 34735, 34736, 34737 georeferencing metadata.</div><div>Greg</div><br><div><div>On Sep 8, 2009, at 5:32 PM, Even Rouault wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Selon Greg Coats &lt;<a href="mailto:gregcoats@mac.com">gregcoats@mac.com</a>&gt;:<br><br><blockquote type="cite">I have one .tif that has tag 700 XMP metadata, and has a tag 33723<br></blockquote><blockquote type="cite">IPTC metadata, but does not have tags 33550, 33922, 34264, 34735,<br></blockquote><blockquote type="cite">34736, 34737 georeferencing metadata. I have a second .tif that has<br></blockquote><blockquote type="cite">does not have tag 700 XMP metadata, nor does it have tag 33723 IPTC<br></blockquote><blockquote type="cite">metadata, but it does have 33550, 33922, 34264, 34735, 34736, 34737<br></blockquote><blockquote type="cite">georeferencing metadata. I want to add the tags that provide<br></blockquote><blockquote type="cite">georeferencing metadata in the second .tif, to the first .tif. As<br></blockquote><blockquote type="cite">shown below, I first tried using geotifcp, and then tried<br></blockquote><blockquote type="cite">gdal_translate, but while the resulting .tif does have the<br></blockquote><blockquote type="cite">georeferencing tags it originally lacked, the resulting .tif is<br></blockquote><blockquote type="cite">without the tag 700 XMP metadata, and without the tag 33723 IPTC<br></blockquote><blockquote type="cite">metadata that it originally had. How can georeferencing tags be added<br></blockquote><blockquote type="cite">to a .tif, withOUT removing preexisting tag 700 XMP metadata, and<br></blockquote><blockquote type="cite">withOUT removing preexisting tag IPTC 33723 metadata?<br></blockquote><blockquote type="cite">listgeo 18stj940125.tif &gt; 18stj940125_listgeo.txt<br></blockquote><blockquote type="cite">geotifcp -s -r 1 -c none -f msb2lsb -g 18stj940125_listgeo.txt<br></blockquote><blockquote type="cite">tif_withXMP700_withIPTC33723_withoutGeo.tif<br></blockquote><blockquote type="cite">tif_withXMP700_withIPTC33723_withGeo.tif<br></blockquote><br>Those 700 XMP and 33723 IPTC tags are not handled by the GTiff driver neither in<br>read nor in write mode, so that explains why gdal_translate doesn't copy them.<br>You could probably try the 'tiffset' utility to set them afterwards. Or hack<br>geotifcp.c to add support for those 2 tags. The tags[] array looks like an<br>interesting place where to hack that in.<font class="Apple-style-span" color="#006312"><font class="Apple-style-span" color="#144FAE"><br></font></font></div></blockquote></div></body></html>