<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Andrew,</p>
    <p>no, there's no such support in GDAL itself. That could
      potentially be done using VRT and pixel functions, but I'm not
      sure that would qualify as "optimal", and that would require a bit
      of setup. You're probably better instantiating your for(y: ...)
      for (x: ...) loop manually with the operation you want to apply<br>
    </p>
    <p>xtensor (<a class="moz-txt-link-freetext" href="https://xtensor.readthedocs.io/en/latest/operator.html">https://xtensor.readthedocs.io/en/latest/operator.html</a>)
      (in a nutshell, this is similar to numpy but in C++) could
      potentially be used in combination of GDAL, but I don't think we
      want to drag this dependency in GDAL itself</p>
    <p>Even<br>
    </p>
    <div class="moz-cite-prefix">Le 06/05/2024 à 20:43, Andrew Bell via
      gdal-dev a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CACJ51z3dagQ=cPQ2OyFoJjRSUO95DmXjQBq_qFkpGKt2PhQ0Xw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hi,
        <div><br>
        </div>
        <div>Is there any support in the library for applying some
          arithmetic operations to all entries in a block? For example,
          can I optimally subtract or add some scalar to every entry?<br
            clear="all">
          <div><br>
            Thanks,<br>
            <br>
          </div>
          <span class="gmail_signature_prefix">-- </span><br>
          <div dir="ltr" class="gmail_signature"
            data-smartmail="gmail_signature">Andrew Bell<br>
            <a href="mailto:andrew.bell.ia@gmail.com" target="_blank"
              moz-do-not-send="true" class="moz-txt-link-freetext">andrew.bell.ia@gmail.com</a></div>
        </div>
      </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>