Duplicate fields when exporting a feature class with sybtypes to a shapefile

2283
10
05-14-2013 08:04 PM
MichaelFifield
New Contributor
For some reason whenever I export a feature class to a shapefile I have been getting duplicate fields appearing at the end of the attribute table of the exported shapefile. The fields that are duplicating themselves are the fields that have subtypes. This is occurring for all feature classes that I export that have subtypes. It does not occur to feature classes without subtypes. Whenever a field is duplicated it is headed with 'd_(field name)'.

For example: I export a feature with the following fields that each have subtypes:

DATA_SRCE
ENV_VALUES
CAP_METH

In the exported shapefile they appear as duplicates at the end of the attribute table as this:

d_DATA_SRC
d_ENV_VALU
d_CAP_METH

Has anyone had a similar problem? Or might know why this is happening?
0 Kudos
10 Replies
DaleHoneycutt
Regular Contributor
These fields (that start with "d_") contain the description of your subtype.  This was added due to numerous requests to add the subtype description (if one exists) to exported shapefiles.  Shapefiles don't support subtypes, so we export both the subtype code and description as regular fields.

You can control whether these fields get written by setting the Transfer Field Domain Descriptions environment setting.
0 Kudos
MichaelFifield
New Contributor
Hi there,

Thank you very much for replying to my problem, much appreciated.

I am using ArcGIS version 10.0. Is there a way of changing this environmental setting, as you proposed, in 10.0?

Thanks
0 Kudos
RichardFairhurst
MVP Honored Contributor
Hi there,

Thank you very much for replying to my problem, much appreciated.

I am using ArcGIS version 10.0. Is there a way of changing this environmental setting, as you proposed, in 10.0?

Thanks


Environmental settings are in all versions of desktop since geoprocessing first began, so it is in your version.  There is an option button at the bottom of every tool that says "Environments..."  (the buttons at the bottom of every tool are "OK", "Cancel", "Environments...", "Show Help>>/<<Hide Help", and "tool Help").  The option you need is seen when you press the Environments button and expand the Fields group and is called "Transfer field domain description".  Uncheck that option if you do not want the added fields.
0 Kudos
MichaelFifield
New Contributor
Hi there,

Apologies if I'm missing something, but all I can see when I expand the 'Fields' drop down in 'Environmental Settings' is a tick box for 'Maintain fully qualified field names'. I am thinking this tick box for 'Transfer field domain description' you are referring to may have only become available in version 10.1? If so, does anyone know of any other way of performing the same function in version 10?

Cheers
0 Kudos
DaleHoneycutt
Regular Contributor
You're not missing anything.  I don't have the definitive answer for you because we're all gone for the day (except me, apparently).  What service pack are you on?  It turns out that we put this into one of the service packs w/o exposing the environment.  I'll know more tomorrow.  In the meantime, can you just delete the fields on the output with Delete Field?
0 Kudos
MichaelFifield
New Contributor
As far as I know we are just using the basic 10.0 version i.e. we haven't had any updates since initially upgrading to 10.0.

Yeah you're right, I can just delete the fields easy enough. It's just a problem that's been bugging me for quite some time now so would like to try and resolve it.

Thanks for your help
0 Kudos
curtvprice
MVP Esteemed Contributor
Michelle, sounds like your fix is to update to 10.1, or delete the fields -- or avoid using shapefiles, which are most useful today as a transfer format. (GDB feature classes support null values, domains, subtypes, and process and draw faster, among other benefits.)

Service packs are available to you - even if you aren't up to date on maintenance, so I highly recommend you update to 10.0 SP 5.
0 Kudos
DaleHoneycutt
Regular Contributor
For those of you keeping score at home, we added subtype and domain descriptions when exporting geodatabase features to shapefiles beginning with 10.0SP4 and refined the algorithm (there were cases where writing the descriptions could be really slow) at 10.0SP5.   We added the  environment setting at 10.1.

Only certain tools write the domain description.  For example, the Feature Class To Feature Class and Table To Table tools write the description, but Feature Class To Shapefile and Copy Features do not write the domain description. 

So, how can you determine which 10.0 tools write the domain description?  By looking at the online 10.1 tool documentation.  If the 10.1 tool documentation does not list the Transfer Field Domain Descriptions environment, then the 10.0 tool doesn't write the domain description.

Tools that write the domain description:

  • Feature Class To Feature Class

  • Table To Table


Tools that DO NOT write the domain description:

  • Feature Class To Shapefile

  • Copy Features

  • Copy Rows


I apologize for the confusion.
0 Kudos
JerodSperry
New Contributor II
I'm using 10.5 sp 5 and I'm finding that Feature Class to Feature Class will not write descriptions. Instead it will add the domain table to the output GDB as to satisfy the domain link in the field. I created a blank PGDB, used FC to FC with a domain linked FC as the input and a new layer as the output in the blank PGDB. After successful completion I see domain tables in my output PGDB and a Select By Attributes in ArcMap reveals that the layer is in fact referencing domain codes.

Can ESRI confirm this behavior in 10.0 SP5? As I understand the post above, the environment variable is not available in 10.0 but the functionality was expected to have been built into the FC to FC geoprocessing tool. Is that correct?

Thanks,
Jerod
0 Kudos