<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        mso-fareast-language:EN-CA;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-CA" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Thanks for the nudge. I implemented that code as a simple command line script a couple of months ago but neglected to put it anywhere
 someone else could use it. Fixed that today ;-)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><a href="https://gist.github.com/maphew/29a73ee7a4517663cef5081c15799fc3">https://gist.github.com/maphew/29a73ee7a4517663cef5081c15799fc3</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">```<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">'''Copy RPC metdata from IN raster to OUT raster</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">Adapted from @user7821537</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">https://gis.stackexchange.com/questions/264644/transfer-rpc-metadata-from-one-geotiff-to-another</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">'''</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#C586C0">import</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">
</span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">os</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#C586C0">import</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">
</span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">sys</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#C586C0">from</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">
</span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">osgeo</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">
</span><span style="font-size:10.5pt;font-family:Consolas;color:#C586C0">import</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">
</span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">gdal</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">gdal</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">.</span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">UseExceptions</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">()<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#C586C0">if</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">
</span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">len</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">(</span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">sys</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">.</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">argv</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">)
 < </span><span style="font-size:10.5pt;font-family:Consolas;color:#B5CEA8">3</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">:<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">   
</span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">print</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">(</span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">f</span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">"Usage:
</span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">{</span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">sys</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">.</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">argv</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">[</span><span style="font-size:10.5pt;font-family:Consolas;color:#B5CEA8">0</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">]</span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">}</span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">
 [in_file] [out_file]"</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">)<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">   
</span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">sys</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">.</span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">exit</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">(</span><span style="font-size:10.5pt;font-family:Consolas;color:#B5CEA8">1</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">)<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">infile</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"> =
</span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">sys</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">.</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">argv</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">[</span><span style="font-size:10.5pt;font-family:Consolas;color:#B5CEA8">1</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">]
        </span><span style="font-size:10.5pt;font-family:Consolas;color:#6A9955"># source filename and path</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">output</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"> =
</span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">sys</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">.</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">argv</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">[</span><span style="font-size:10.5pt;font-family:Consolas;color:#B5CEA8">2</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">]
        </span><span style="font-size:10.5pt;font-family:Consolas;color:#6A9955"># destination file</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">data_in</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"> =
</span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">gdal</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">.</span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">Open</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">(</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">infile</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">,
</span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">gdal</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">.</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">GA_ReadOnly</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">)<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">data_out</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"> =
</span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">gdal</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">.</span><span style="font-size:10.5pt;font-family:Consolas;color:#DCDCAA">Open</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">(</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">output</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">,
</span><span style="font-size:10.5pt;font-family:Consolas;color:#4EC9B0">gdal</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">.</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">GA_Update</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">)<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#6A9955"># get the RPCs from the first file ...</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">rpcs</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"> =
</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">data_in</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">.GetMetadata(</span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">'RPC'</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">)<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#6A9955"># ... write them to the second file</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">data_out</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">.SetMetadata(</span><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">rpcs</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">
 ,</span><span style="font-size:10.5pt;font-family:Consolas;color:#CE9178">'RPC'</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4">)<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#6A9955"># de-reference the datasets, which triggers gdal to save</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">data_in</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"> =
</span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">None</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#9CDCFE">data_out</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"> =
</span><span style="font-size:10.5pt;font-family:Consolas;color:#569CD6">None</span><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:14.25pt;background:#1E1E1E"><span style="font-size:10.5pt;font-family:Consolas;color:#D4D4D4"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">```<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:#1F497D">-Matt</span><i><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p></o:p></span></i></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> gdal-dev <gdal-dev-bounces@lists.osgeo.org>
<b>On Behalf Of </b>ni hao<br>
<b>Sent:</b> January 4, 2022 3:00 PM<br>
<b>To:</b> gdal-dev@lists.osgeo.org<br>
<b>Subject:</b> Re: [gdal-dev] RPCs in GeoTIFF<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<table class="MsoNormalTable" border="0" cellpadding="0">
<tbody>
<tr>
<td style="background:white;padding:.75pt .75pt .75pt .75pt">
<pre><strong><span style="font-family:"Courier New";color:black">*** External email: Do not click on links or attachments except from trusted senders. ***<o:p></o:p></span></strong></pre>
<pre><strong><span style="font-family:"Courier New";color:black">******************************************************************************************</span></strong><span style="color:black"><o:p></o:p></span></pre>
<pre><span style="color:black"><br><br><o:p></o:p></span></pre>
</td>
</tr>
</tbody>
</table>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">Hi list,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt"><a href="https://gis.stackexchange.com/questions/264644/transfer-rpc-metadata-from-one-geotiff-to-another">https://gis.stackexchange.com/questions/264644/transfer-rpc-metadata-from-one-geotiff-to-another</a>
<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">The above link showed me how to do it.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">thanks.<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-size:10.0pt">
<hr size="2" width="98%" align="center">
</span></div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> gdal-dev <<a href="mailto:gdal-dev-bounces@lists.osgeo.org">gdal-dev-bounces@lists.osgeo.org</a>>
 on behalf of ni hao <<a href="mailto:ni_hao88@hotmail.com">ni_hao88@hotmail.com</a>><br>
<b>Sent:</b> January 3, 2022 2:03 PM<br>
<b>To:</b> <a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a> <<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>><br>
<b>Subject:</b> [gdal-dev] RPCs in GeoTIFF</span><span style="font-size:10.0pt"> <o:p>
</o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt"> <o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">Hi list,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">I use gdal-2.4.4.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">I use gdalwarp to orthorectify RADARSAT-2 images with RPCs (in product.xml).<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">Now I have done some manipulation and save the result in GTiff (e.g., apply Sigma0 LUT).<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">How can I copy the
<span style="background:yellow">RPC </span>Metadata from product.xml into GTiff, so I can use <span style="background:white">gdalwarp RPC orthorectification</span>? <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black;background:white">What are the Python commands to call ?</span><span style="font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">Do I have to use VRT?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">Thank you!<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">ds=gdal.Open(r"C:\RADARSAT-2\2008Feb10\product.xml")
<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">ds.GetMetadata(domain='RPC')<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">{'HEIGHT_OFF': '1.400000000000000e+02', 'LINE_NUM_COEFF': '1.045003883698053e-03 -3.909147136274753e-05 9.670521993287788e-09 -1.540774061983927e-08 -1.230034082454030e-01 2.994775580755049e-08
 3.800851793724760e-08 -7.321141763443381e-04 -3.070513868102579e-08 -3.263789159357597e-08 -1.074590548649705e+00 -1.422870424040082e-07 2.625729922759320e-07 3.515681824455183e-04 1.737795244565543e-08 -1.191967212586014e-06 -6.679635986447045e-04 9.917030647189506e-09
 1.183063120029544e-06 9.020179141273994e-07', 'SAMP_SCALE': '1759', 'LONG_OFF': '-5.586200000000000e+00', 'SAMP_DEN_COEFF': '1.000000000000000e+00 -3.873791825160030e-04 -1.654041698986790e-06 1.045768201431545e-08 -7.357169048971613e-04 -5.663646053748347e-06
 -2.270764362304154e-08 -7.511863551214131e-07 -3.061984244257416e-07 1.247909289740085e-07 1.555977062556944e-03 2.290649610770613e-06 1.138900631680699e-09 -4.788174308312700e-07 1.913987966778219e-07 -5.724932691905833e-08 5.283021826505342e-06 -2.470297385173699e-08
 -5.008669473258436e-08 1.486018900494917e-08', 'ERR_BIAS': '5.000000000000000e-01', 'SAMP_NUM_COEFF': '1.448914459955711e-03 3.107453606755890e-02 -1.362345055216650e-05 -5.545316452513627e-08 1.177884096135199e+00 2.873729811978911e-04 -1.989082475494487e-06
 -1.041938833100005e-03 8.430382868139787e-06 -1.570423196668063e-06 -2.556805573684327e-01 -1.724821081109771e-05 4.713416494967566e-07 -9.676787333902578e-04 -2.144746372053350e-06 8.115347578419969e-07 1.767758474109092e-04 2.353735909723349e-07 -6.444353128930045e-06
 2.385344654290232e-07', 'LONG_SCALE': '1.859000000000000e-01', 'LINE_DEN_COEFF': '1.000000000000000e+00 -9.804190622020718e-08 -2.386942243966555e-07 1.801605395896790e-08 4.160880031382031e-04 -2.095235371483683e-08 -1.659952797934781e-08 -9.496784414468805e-07
 4.758902993568164e-08 5.402628711262573e-08 4.472124981058622e-04 1.370099419045734e-08 -1.785667248922995e-08 7.981478756298640e-07 -7.327071351551446e-09 2.253346171933004e-07 1.637317283006711e-06 -5.178220338393535e-08 1.880261293686099e-06 5.550513900110941e-06',
 'SAMP_OFF': '1705', 'LAT_SCALE': '2.073000000000000e-01', 'LAT_OFF': '3.590580000000000e+01', 'LINE_SCALE': '4229', 'LINE_OFF': '4227', 'ERR_RAND': '1.000000000000000e-01', 'HEIGHT_SCALE': '5.010000000000000e+02'}<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
</div>
</div>
</body>
</html>