Geographic Information Systems Asked by Matt Goodman on May 21, 2021
I am using the "Feature Class to Feature Class" tool to copy a feature class from an enterprise geodatabase to file geodatabase, but I would like to strip the output feature class (and its geodatabase) of all related domains and descriptions. I would like the attributes of the destination feature class to only contain the actual codes, not the descriptions.
I acknowledge that this behavior can be accomplished by exporting to a shapefile with the right environment settings, but I am not interested in using this method because of other factors (for example: truncation of field name lengths).
I know that my question is similar to Using CopyFeatures_management without copying source GDB domains to 'in_memory' workspace?, except I’m not dealing with an in-memory feature class, so I suspect there might be different answers possible.
I’m ideally looking for a solution that simply drops the domains upon export. If that’s not possible, I might be interested in a solution that uses python code to remove/delete domains after the destination feature class is already in-place, but there are a lot of domains and fields utilizing them, and I haven’t seen any nice tidy code that
Is there a simpler way to do this, that I’m not thinking of?
I think you are going to have copy the feature class then retrospectively remove the domain from the field and the workspace. You can review the tools that will achieve this by looking at An overview of the Domains toolset page.
You could try to automate this through ModelBuilder but I suspect in your case you will have better control over the looping you will need to do using Python. If you review the appropriate tools help pages there are sample codes that practically do it for you, you just need to adapt it to your file structure.
Answered by Hornbydd on May 21, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP