<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">Le 12/01/2022 à 00:29, Even Rouault a
      écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:6f4d50d4-2b86-1609-bd61-fc63713253e8@spatialys.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <p><br>
      </p>
      <div class="moz-cite-prefix">Le 12/01/2022 à 00:23, Carl Godkin a
        écrit :<br>
      </div>
      <blockquote type="cite"
cite="mid:CAE=8km=Jk+fVX=HM4O1UicF2oT6Z91pzF8g_nd506U+WX+W4Tg@mail.gmail.com">
        <div dir="ltr">Hi,<br>
          <div><br>
          </div>
          <div>I'm trying to figure out if there's a way to set the unit
            type for a raster band from any of the application
            programs.  A few seem to copy it from input to output bands,
            but I would like to assign it from the command line if
            possible.</div>
          <div><br>
          </div>
          <div>I have searched for SetUnitType()
            and GDALSetRasterUnitType() calls in the GDAL 3.4.0 source
            and don't see it anywhere but I thought perhaps I'd
            overlooked something.</div>
        </div>
      </blockquote>
      <p>python -c "from osgeo import gdal; ds = gdal.Open('my.tif',
        gdal.GA_Update); ds.GetRasterBand(1).SetUnitType('my unit')"<br>
      </p>
    </blockquote>
    <p>Actually, more simple with
      <a class="moz-txt-link-freetext" href="https://gdal.org/programs/gdal_edit.html#cmdoption-units">https://gdal.org/programs/gdal_edit.html#cmdoption-units</a>:<br>
    </p>
    <p>gdal_edit.py my.tif -units "my unit"<br>
    </p>
    <blockquote type="cite"
      cite="mid:6f4d50d4-2b86-1609-bd61-fc63713253e8@spatialys.com">
      <p> </p>
      <p><br>
      </p>
      <blockquote type="cite"
cite="mid:CAE=8km=Jk+fVX=HM4O1UicF2oT6Z91pzF8g_nd506U+WX+W4Tg@mail.gmail.com">
        <div dir="ltr">
          <div><br>
          </div>
          <div>Thanks very much,</div>
          <div><br>
          </div>
          <div>carl</div>
          <div><br>
          </div>
          <div><br>
          </div>
        </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" moz-do-not-send="true">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" moz-do-not-send="true">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" moz-do-not-send="true">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
      <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>