<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    <p>Hi Jukka,</p>
    <p>from what I can see in
<a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/commit/b5128c1ff3ac6ad44b225284f5be1f728840e7b3">https://github.com/OSGeo/gdal/commit/b5128c1ff3ac6ad44b225284f5be1f728840e7b3</a>,
      this dates back to almost 20 years ago when SetGCPs() was
      initially implemented. And at that time, PAM didn't exist yet in
      GDAL :-)</p>
    <p>Please create a ticket about (and mention SetGeoTransform() and
      SetSpatialRef() have the same issue)</p>
    <p>Even<br>
    </p>
    <div class="moz-cite-prefix">Le 22/11/2021 à 14:49, Rahkonen Jukka
      (MML) a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:117489fa5a0545668985b0ce3fd3d02d@maanmittauslaitos.fi">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style>@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;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}span.Shkpostityyli17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}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]-->
      <div class="WordSection1">
        <p class="MsoNormal">Hi,<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><span lang="EN-US">I tried to add ground
            control points into a TIFF file with gdal_edit. I do not
            want to touch the TIFF so I used the read-only option and
            supposed that gcp would be written into .aux.xml file but
            that did not happen. Instead I got a message<br>
            <br>
            gdal_edit -ro -gcp 1 1 20 30 test.tif    <br>
            ERROR 6: test.tif: SetGCPs() is only supported on newly
            created GeoTIFF files.<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US">Without -ro gdal_edit
            adds ground control points into the TIFF without errors.
            What might be the meaning of the message about “newly
            created GeoTIFF” and is there some way to make gdal_edit to
            write ground control points into PAM file? I know that I can
            use gdal_translate and VRT as a workaround but PAM .aux.xml
            could be a bit better for my whole workflow.<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US">-Jukka Rahkonen-<o:p></o:p></span></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </body>
</html>