<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>hopefully <a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/pull/7077">https://github.com/OSGeo/gdal/pull/7077</a> should answer
      your question. You'll note subtle differences of behavior between
      gdalwarp on one side and gdaladdo/gdal_translate on the other side</p>
    <p>Even<br>
    </p>
    <div class="moz-cite-prefix">Le 16/01/2023 à 13:32, Laurențiu Nicola
      via gdal-dev a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:e4578776-7185-4f76-a314-8f02c6688ee1@betaapp.fastmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <title></title>
      <style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style>
      <div style="font-family:Arial;">PPS: Looks like some
        experimentation is probably better than weeks of worrying :-).
        It looks like the input no data values are actually not included
        in the computation. But I'd still like to know how they are
        handled, if that's possible.<br>
      </div>
      <div style="font-family:Arial;"><br>
      </div>
      <div style="font-family:Arial;">Laurentiu<br>
      </div>
      <div style="font-family:Arial;"><br>
      </div>
      <div>On Mon, Jan 16, 2023, at 14:05, Laurențiu Nicola via gdal-dev
        wrote:<br>
      </div>
      <blockquote type="cite" id="qt" style="">
        <div style="font-family:Arial;">PS:<br>
        </div>
        <div style="font-family:Arial;"><br>
        </div>
        <div>On Mon, Jan 16, 2023, at 13:58, Laurențiu Nicola wrote:<br>
        </div>
        <blockquote type="cite" id="qt-qt" style="">
          <div style="font-family:Arial;"><br>
          </div>
          <ul>
            <li style="font-family:Arial;">the <span class="qt-qt-font"
                style="font-family:menlo, consolas, monospace,
                sans-serif;"><span class="font"
                  style="font-family:menlo, consolas, monospace,
                  sans-serif;"><span class="qt-font"
                    style="font-family:menlo, consolas, monospace,
                    sans-serif;"><span class="font"
                      style="font-family:menlo, consolas, monospace,
                      sans-serif;"><code
                        style="border-top-color:rgb(204, 204,
204);border-top-style:solid;border-top-width:1px;border-right-color:rgb(204,
                        204,
204);border-right-style:solid;border-right-width:1px;border-bottom-color:rgb(204,
                        204,
204);border-bottom-style:solid;border-bottom-width:1px;border-left-color:rgb(204,
                        204,
204);border-left-style:solid;border-left-width:1px;border-image-outset:0;border-image-repeat:stretch;border-image-slice:100%;border-image-source:none;border-image-width:1;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:rgb(246,
                        246,
246);background-position-x:0%;background-position-y:0%;background-repeat:repeat;background-attachment:scroll;background-image:none;background-size:auto;background-origin:padding-box;background-clip:border-box;font-family:menlo,
                        consolas,
monospace;font-size:90%;padding-top:1px;padding-right:3px;padding-bottom:1px;padding-left:3px;">-srcnodata</code></span></span></span></span>
              docs and <span class="qt-qt-font"
                style="font-family:menlo, consolas, monospace,
                sans-serif;"><span class="font"
                  style="font-family:menlo, consolas, monospace,
                  sans-serif;"><span class="qt-font"
                    style="font-family:menlo, consolas, monospace,
                    sans-serif;"><span class="font"
                      style="font-family:menlo, consolas, monospace,
                      sans-serif;"><code
                        style="border-top-color:rgb(204, 204,
204);border-top-style:solid;border-top-width:1px;border-right-color:rgb(204,
                        204,
204);border-right-style:solid;border-right-width:1px;border-bottom-color:rgb(204,
                        204,
204);border-bottom-style:solid;border-bottom-width:1px;border-left-color:rgb(204,
                        204,
204);border-left-style:solid;border-left-width:1px;border-image-outset:0;border-image-repeat:stretch;border-image-slice:100%;border-image-source:none;border-image-width:1;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:rgb(246,
                        246,
246);background-position-x:0%;background-position-y:0%;background-repeat:repeat;background-attachment:scroll;background-image:none;background-size:auto;background-origin:padding-box;background-clip:border-box;font-family:menlo,
                        consolas,
monospace;font-size:90%;padding-top:1px;padding-right:3px;padding-bottom:1px;padding-left:3px;">gdalwarpkernel.cpp</code></span></span></span></span>
              suggest that masked pixels are not included in the
              computation (unlike those of no data?)<br>
            </li>
          </ul>
        </blockquote>
        <div style="font-family:Arial;">The remark in the brackets is
          wrong, of course, since the docs are specifically about <code
            style="border-top-color:rgb(204, 204,
204);border-top-style:solid;border-top-width:1px;border-right-color:rgb(204,
            204,
204);border-right-style:solid;border-right-width:1px;border-bottom-color:rgb(204,
            204,
204);border-bottom-style:solid;border-bottom-width:1px;border-left-color:rgb(204,
            204,
204);border-left-style:solid;border-left-width:1px;border-image-outset:0;border-image-repeat:stretch;border-image-slice:100%;border-image-source:none;border-image-width:1;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:rgb(246,
            246,
246);background-position-x:0%;background-position-y:0%;background-repeat:repeat;background-attachment:scroll;background-image:none;background-size:auto;background-origin:padding-box;background-clip:border-box;font-family:menlo,
            consolas,
monospace;font-size:90%;padding-top:1px;padding-right:3px;padding-bottom:1px;padding-left:3px;">-srcnodata</code>
          . But I'm still unsure how these are handled in the code. I
          probably missed something, but I saw <a
href="https://github.com/OSGeo/gdal/blob/master/alg/gdalwarpkernel.cpp#L1225"
            moz-do-not-send="true">the checks</a> for a mask, but not no
          data.<br>
        </div>
        <div>_______________________________________________<br>
        </div>
        <div>gdal-dev mailing list<br>
        </div>
        <div><a href="mailto:gdal-dev@lists.osgeo.org"
            moz-do-not-send="true" class="moz-txt-link-freetext">gdal-dev@lists.osgeo.org</a><br>
        </div>
        <div><a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev"
            moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
        </div>
        <div><br>
        </div>
      </blockquote>
      <div style="font-family:Arial;"><br>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></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>