A client of ours is changing their spatial data format from MITAB to ESRI GDB. They use domains in their GDB and we don’t have an ESRI licence so am unable to read these in correctly with the domains exposed. I have requested the XML to go with it as per what I found in other threads.
Is the best way to give it geometry to pop on a map a FeatureMerger with the XML and GDB, matching on an ID they have?
I can’t help but think this is a poor way of doing it (it took forever as it’s a large dataset when I tested it), but without the ESRI licence I think I’m a bit stuck for options. Wondering if someone has a better solution.
Using FME Form 2024.1
Thanks!
Hello,
Thanks for posting to the community! What you could try is using FME to extract those domains in the XML to CSV tables, that could be then used in the main workspace with SchemaMappers. Let us know if this helps!
Best!
Really, your solution is to upgrade your FME licence to be Esri capable! Then you just tick a box.
I was trying to help a user using QGIS to get the domain tables. The latest QGIS can see the domains in the filedatabase, but does not list them conveniently. But they are there in a long XML string which is a bit hard to unpack in QGIS. Could be done in FME I suppose.
It would be possible for your client to export the domains to tables so you could more easily join the values back with a relate to save you parsing the XML dump. Domains rarely change so it would not need to be dynamic. I would ask them for the tables rather than the XML dump.
I have tried another approach. With GDAL you can use ogrinfo to extract the domain. This can be called using a python caller transformer. FME uses GDAL so it is already installed. The only difference is you pay for an upgrade for Safe to do it, or you get down and dirty with a bit of python code and DIY. Here is a starter on how to do it:
https://blog.fiorino.fr/index.php/2022/05/11/fme-python-api-working-with-rasters-and-gdal/
I just opened a shell and ran the command to demonstrate:
D:> ogrinfo -so ecosystem_current.gdb -fielddomain EcosystemCode
INFO: Open of `ecosystem_current.gdb'
using driver `OpenFileGDB' successful.
Domain EcosystemCode:
Type: coded
Field type: Integer
Split policy: default value
Merge policy: default value
Coded values:
0: BF
1: EF
2: EF.1
3: EF.2
4: EG
5: ES
6: EW
7: PLW
8: PLW.1
9: PLW.2
…