<div dir="ltr">I see this note about<div><br></div><div>GDALTranslateOptionsSetMetadataOptions()<br></div><div><br></div><div>GDALTranslateOptionsAddMetadataOptions()<br></div><div><br></div><div>which don't seem to exist. Is that just an outdated comment? </div><div><br></div><div><a href="https://github.com/OSGeo/gdal/blob/8122e2c39f72317a803cd24ee1fb5d6a44a97596/apps/gdal_translate_lib.cpp#L200-L201">https://github.com/OSGeo/gdal/blob/8122e2c39f72317a803cd24ee1fb5d6a44a97596/apps/gdal_translate_lib.cpp#L200-L201</a><br></div><div><br></div><div>Thanks!  </div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 20, 2023 at 6:40 PM Even Rouault <<a href="mailto:even.rouault@spatialys.com">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>Sounds OK to me<br>
    </p>
    <div>Le 20/09/2023 à 02:32, Michael Sumner a
      écrit :<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">Thanks Even,  could add a  AttachDomainMetadata
        here that expected "-dmo DOMAIN:META-TAG=VALUE"
        <div><br>
        </div>
        <div><a href="https://github.com/OSGeo/gdal/blob/a4b57c22606be2258196a933d310f301e3ece93f/apps/gdal_translate_lib.cpp#L2625" target="_blank">https://github.com/OSGeo/gdal/blob/a4b57c22606be2258196a933d310f301e3ece93f/apps/gdal_translate_lib.cpp#L2625</a><br>
        </div>
        <div><br>
        </div>
        <div>I'll try that, or is it too much over-reach?  </div>
        <div><br>
        </div>
        <div>Ultimately it's for vrt:// con so could do</div>
        <div><br>
        </div>
        <div>vrt://{dsn}?dmo=DOMAIN:META-TAG=VALUE</div>
        <div><br>
        </div>
        <div>Cheers, Mike</div>
        <div><br>
        </div>
        <div><br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Wed, Sep 20, 2023 at
          10:19 AM Even Rouault <<a href="mailto:even.rouault@spatialys.com" target="_blank">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>Not from cli. From the API, it is
              dataset.SetMetadataItem(key, value, domain)<br>
            </p>
            <div>Le 20/09/2023 à 02:14, Michael Sumner a écrit :<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">
                <div>When we add metadata with -mo can we somehow
                  specify the DOMAIN it would be added to, or be
                  instantiated with? </div>
                <div><br>
                </div>
                <div>gdal_translate gcore/data/float32.tif
                  /tmp/add_md.vrt -mo PHONY=important<br>
                </div>
                <div><br>
                </div>
                <div>I would like to tweak that so that the item was in
                  a new domain, i.e. </div>
                <div><br>
                </div>
                <div><br>
                </div>
                <div>  <Metadata><br>
                      <MDI key="AREA_OR_POINT">Area</MDI><br>
                    </Metadata><br>
                    <Metadata domain="IMAGE_STRUCTURE"><br>
                      <MDI key="INTERLEAVE">BAND</MDI><br>
                    </Metadata><br>
                </div>
                <div>  <Metadata domain="MY_NEW_DOMAIN"><br>
                           <MDI key="PHONY">important</MDI><br>
                    </Metadata><br>
                </div>
                <div><br>
                </div>
                <div>Is that possible from cli? </div>
                <div><br>
                </div>
                <div>Thank you</div>
                <div><br>
                </div>
                <div><br>
                </div>
                <span class="gmail_signature_prefix">-- </span><br>
                <div dir="ltr" class="gmail_signature">Michael Sumner<br>
                  Software and Database Engineer<br>
                  Australian Antarctic Division<br>
                  Hobart, Australia<br>
                  e-mail: <a href="mailto:mdsumner@gmail.com" target="_blank">mdsumner@gmail.com</a></div>
              </div>
              <br>
              <fieldset></fieldset>
              <pre>_______________________________________________
gdal-dev mailing list
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
            </blockquote>
            <pre cols="72">-- 
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
          </div>
        </blockquote>
      </div>
      <br clear="all">
      <div><br>
      </div>
      <span class="gmail_signature_prefix">-- </span><br>
      <div dir="ltr" class="gmail_signature">Michael Sumner<br>
        Software and Database Engineer<br>
        Australian Antarctic Division<br>
        Hobart, Australia<br>
        e-mail: <a href="mailto:mdsumner@gmail.com" target="_blank">mdsumner@gmail.com</a></div>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
gdal-dev mailing list
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
    </blockquote>
    <pre cols="72">-- 
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </div>

</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">Michael Sumner<br>Software and Database Engineer<br>Australian Antarctic Division<br>Hobart, Australia<br>e-mail: <a href="mailto:mdsumner@gmail.com" target="_blank">mdsumner@gmail.com</a></div>