[gdal-dev] Add coded field domains to file geodatabase
Even Rouault
even.rouault at spatialys.com
Sat Apr 16 09:55:40 PDT 2022
It turns out that I needed that feature, hence
https://github.com/OSGeo/gdal/pull/5620
Le 11/04/2022 à 19:33, Even Rouault a écrit :
>
> Adam,
>
> I've just clarified the doc to explain that it is read-only for the
> FileGDB driver.
>
> 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.
>
> Even
>
> Le 11/04/2022 à 19:13, adamgutonski via gdal-dev a écrit :
>> 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:
>>
>> >>> coded_domain = ogr.CreateCodedFieldDomain("name", "desc", ogr.OFTString,
>> ogr.OFSTNone, {1:'LOW'})
>> >>> driver = gdal.GetDriverByName("FileGDB")
>> >>> datasource = driver.Create(r'C:\output\test_domains.gdb', 0, 0, 0)
>> *>>> datasource.AddFieldDomain(coded_domain)*
>> *False*
>> *>>> datasource.TestCapability(ogr.ODsCAddFieldDomain)
>> False
>> *
>>
>> The documentation suggests that the FileGDB driver is capable of
>> supporting domains as of 3.3:
>> https://gdal.org/drivers/vector/filegdb.html?highlight=domains#field-domains
>>
>> I am using gdal version 3.4.2.
>>
>> Am I adding the domain incorrectly, or does this mean that domains
>> are not supported with the FileGDB driver?
>>
>> Thank you,
>> Adam Gutonski
>>
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/gdal-dev
> --
> http://www.spatialys.com
> My software is free, but my time generally not.
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
--
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220416/50ba7138/attachment.html>
More information about the gdal-dev
mailing list