Frank, thanks for your usual quick reply.<br><br>As I have thousands of files, anything manual was not an option (of course one could implement your suggestion with sed), so I went the way reading in both files and stealing one file&#39;s GCPs with GetGCPs() and write the whole shebang out again -- this also works of course with metadata, noDataValue etc.
<br><br>Ludwig<br><br><div><span class="gmail_quote">On 25/06/07, <b class="gmail_sendername">Frank Warmerdam</b> &lt;<a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Ludwig M Brinckmann wrote:<br>&gt; I have a set of files with GCPs and a set of files that are the result<br>&gt; of processing the first, which lack the GCPs. The files are GeoTiffs and<br>&gt; they have the same shape.<br>
&gt;<br>&gt; Is there a simple way of getting the GCPs out of the first files and to<br>&gt; attach them to the other?<br>&gt;<br>&gt; (Simple means simpler than programmatically reading in the georef&#39;ed<br>&gt; file and the non-georef&#39;ed, extracting the GCPs and rewriting the second
<br>&gt; set, now with GCPs)<br><br>Ludwig,<br><br>There is no really simple way of doing this.<br><br>If I had to do it, I would utilize VRT files.&nbsp;&nbsp;Basically I would:<br><br>1) gdal_translate -of VRT original.tif original.vrt
<br>2) gdal_translate -of VRT result.tif result.vrt<br>3) copy the GCPs section of original.vrt to result.vrt in a text editor.<br>4) gdal_translate result.vrt result_with_gcps.tif<br><br>If you only want to do it a very few times this approach should be ok.
<br>This general approach of using VRT files so that various kinds of metadata<br>can be copied/modified/etc can be applied to many similar problems.<br><br>Best regards,<br>--<br>---------------------------------------+--------------------------------------
<br>I set the clouds in motion - turn up&nbsp;&nbsp; | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a><br>light and sound - activate the windows | <a href="http://pobox.com/~warmerdam">http://pobox.com/~warmerdam
</a><br>and watch the world go round - Rush&nbsp;&nbsp;&nbsp;&nbsp;| President OSGeo, <a href="http://osgeo.org">http://osgeo.org</a><br><br></blockquote></div><br>