Select to view content in your preferred language

Domains: add option to preserve domains and/or domain value and/or domain description to ALL GP tools

624
5
12-04-2024 11:31 PM
Status: Open
Labels (1)
nadja
by
Frequent Contributor

Dealing with feature classes in gdb with domains is less than satisfying at the moment. "export features" keeps the domains and offers in environnments the possibility to "transfer field domain descriptions". Unfortunately latter option does not work for the data I'm working with (https://s.geo.admin.ch/yrr98brihwkd).

As soon as I use a gp tool like "clip" or "dissolve" which creates a new output layer I lose all domains and the result contains only the domain values. 

My workaround: python script to add a field with the domain description to the attribute table. but thats cumbersome and takes way too much time for big data.  

Thus I suggest that each geoprocessing tool preserves the domains or at least gives (a working!) option to keep domain value, domain description or both in the output data. 

5 Comments
AlfredBaldenweck

This absolutely makes sense if the output is getting placed in the same geodatabase as the input.

Perhaps it could be implemented as an environment setting?

BSBlagojevic

Yes! It would be great!

Kevin_MacLeod

does this Env setting even work for anyone else? I have been waiting patiently for years. Support logged it as a BUG.  At Pro 3.4 it just... doesn't work. This (Problem: Coded Value Domain Descriptions Are Not Included When Exporting Data in ArcGIS Pr) does not work for Export Features.  Wastes a lot of time. I enable transfer domain descriptions and field information in the Environment for Export to Shapefile and... doesn't work. Would move this up on priority as it has to be something simple somewhere since it's supposed to work and is broadly applicable. (I imagine almost everyone uses domains)  Also doesn't work in ArcMap if the Env setting is checked. I remember Feature Class to Feature Class it worked in Pro early versions... I think. But they have taken that too out. And I just tried it in ArcMap, no dice there either. 

Kevin_MacLeod

Even tried a longshot... upload to AGOL, then download as SHP. Also failed. 

jetemple

@Kevin_MacLeod @nadja 

I've had success when running a Union by ensuring that 'Transfer Geodatabase Field Properties' within the Geodatabase Advanced section if the Environments tab was checked.

It seems this isn't an available option in all GP tools, including Export Features and Clip, but is available in Pairwise Clip.

A quick test shows that it also retains/copies across the domains when exporting to a GDB that didn't previously have said domains.

tl;dr - might solve some instances, but not all.