<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>There's a whole discussion starting at comment
      <a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/pull/7256#issuecomment-1433318699">https://github.com/OSGeo/gdal/pull/7256#issuecomment-1433318699</a>
      about how the old approach implicitly assuming same georeferencing
      for MS and PAN bands could be wrong for some data products, which
      could lead to increasing errors on right and bottom edges of
      images. It was decided that it was better for pansharpening to
      require having explicit geotransform in its inputs rather than
      making possibly incorrect guesses.</p>
    <p>Even<br>
    </p>
    <div class="moz-cite-prefix">Le 15/07/2023 à 16:13, Ferdinand a
      écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CAAYM6-9=XFJL7yv9fyUQpJpKmEP71dP-qqM16FkAPn67YQCTEA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hi Evan, 
        <div><br>
        </div>
        <div>Thanks for the response, I'll give it a go. <br>
          As you are on the ticket I mentioned, I assume the rationale
          behind the change was to remove the implicit assumption of
          overlap? <br>
          Was there also a subpixel shift then when doing it the "old"
          way? </div>
        <div><br>
        </div>
        <div>Cheers,</div>
        <div><br>
        </div>
        <div>Ferdi</div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Fri, Jul 14, 2023 at
          10:50 PM Even Rouault <<a
            href="mailto:even.rouault@spatialys.com"
            moz-do-not-send="true" class="moz-txt-link-freetext">even.rouault@spatialys.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div>
            <p>Ferdinand,</p>
            <p>you can for example use "gdal_edit.py -ro -a_ullr X1 Y1
              X2 Y2 your.tif" to create a geotransform in a sidecar
              .aux.xml file.  If the pan and ms images have the same
              extent, you could possibly just use -a_ullr 0 0 1 -1
              (untested though). This hypothesis is not totally true as
              there's some subpixel shift for those products between the
              pan and ms bands if I remember well, so you might need to
              tune that a bit to get optimal results, but generally
              assuming same extent should give you already a decent
              result.<br>
            </p>
            <p>Even<br>
            </p>
            <div>Le 14/07/2023 à 17:36, Ferdinand a écrit :<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">Hi all, <br>
                <br>
                We do stereo photogrammetry on Pleiades/PNeo images, and
                in one case we run our algorithms on pansharpened
                images. <br>
                <br>
                Our workflow therefore was that we would pan-sharpen the
                images and then run our stereo processing (using the
                panchromatic RPC model for the pansharpened image). <br>
                <br>
                However, with the change in this PR: <a
                  href="https://github.com/OSGeo/gdal/pull/7373"
                  target="_blank" moz-do-not-send="true"
                  class="moz-txt-link-freetext">https://github.com/OSGeo/gdal/pull/7373</a> which
                was integrated into release 3.7.0, this is no longer
                possible. gdal_pansharpen.py now gives: `<span>RuntimeError:
                  Panchromatic band has no associated geotransform`. <br>
                </span><br>
                What is the recommended workflow for this now? We can't
                orthorectify the images first, as we need the raw
                row/column information in the image in order for the
                photogrammetry processing to work. <br>
                <br>
                Is there some other way to add a geotransform that does
                not require warping the image? 
                <div><br>
                </div>
                <div><br>
                </div>
                <div>Cheers,</div>
                <div><br>
                </div>
                <div>Ferdi </div>
              </div>
              <br>
              <fieldset></fieldset>
              <pre>_______________________________________________
gdal-dev mailing list
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">gdal-dev@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
            </blockquote>
            <pre cols="72">-- 
<a href="http://www.spatialys.com" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
          </div>
        </blockquote>
      </div>
    </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>