<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>It turns out that I needed that feature, hence
      <a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/pull/5620">https://github.com/OSGeo/gdal/pull/5620</a><br>
    </p>
    <div class="moz-cite-prefix">Le 11/04/2022 à 19:33, Even Rouault a
      écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:bf1cce13-7435-52e4-4679-eb1d75fc72e8@spatialys.com">
      <p>Adam,</p>
      <p>I've just clarified the doc to explain that it is read-only for
        the FileGDB driver.</p>
      <p>The FileGDB SDK itself seems to have support for writing too,
        but this isn't implemented in the driver currently. Left as an
        exercise to the contributor as one says.<br>
      </p>
      <p>Even<br>
      </p>
      <div class="moz-cite-prefix">Le 11/04/2022 à 19:13, adamgutonski
        via gdal-dev a écrit :<br>
      </div>
      <blockquote type="cite"
cite="mid:vYVPa2jR3jCcv3vc1SgMWKxIOCM0mCX-K_kJH8pOAZnStxv4PAopeOpE9h5COKy5KjD2RFyIin287CiAS85bQKmeLvB6W-_q006I2DQzuUY=@protonmail.com">
        <div>I am wondering how can one add a coded field domain to a
          file geodatabase using the FileGDB driver and File GDB API? 
          Anytime I call AddFieldDomain it returns false:</div>
        <div><br>
        </div>
        <div><span>>>> coded_domain =
            ogr.CreateCodedFieldDomain("name", "desc", ogr.OFTString,
            ogr.OFSTNone, {1:'LOW'})</span>
          <div><span>>>> driver =
              gdal.GetDriverByName("FileGDB")</span></div>
          <div><span>>>> datasource =
              driver.Create(r'C:\output\test_domains.gdb', 0, 0, 0)</span></div>
          <div><span><b>>>>
                datasource.AddFieldDomain(coded_domain)</b></span></div>
          <div><span><b>False</b></span></div>
          <div><span><b><span>>>>
                  datasource.TestCapability(ogr.ODsCAddFieldDomain)</span><br>
                <span>False</span><br>
              </b></span></div>
        </div>
        <div><br>
        </div>
        <div>The documentation suggests that the FileGDB driver is
          capable of supporting domains as of 3.3: <span><a
              target="_blank" rel="noreferrer nofollow noopener"
href="https://gdal.org/drivers/vector/filegdb.html?highlight=domains#field-domains"
              class="moz-txt-link-freetext" moz-do-not-send="true">https://gdal.org/drivers/vector/filegdb.html?highlight=domains#field-domains</a></span></div>
        <div><br>
        </div>
        <div>I am using gdal version 3.4.2.</div>
        <div><br>
        </div>
        <div>Am I adding the domain incorrectly, or does this mean that
          domains are not supported with the FileGDB driver?</div>
        <div><br>
        </div>
        <div>Thank you,</div>
        <div>Adam Gutonski</div>
        <div class="protonmail_signature_block">
          <div class="protonmail_signature_block-proton"> </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 moz-txt-link-freetext" 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="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>