Select to view content in your preferred language

Domains after Spatial Join

678
3
10-16-2013 08:29 AM
TomKearns
Frequent Contributor
I have a program which uses a spatial join to join a point featureclass with sevral attributes (all with domains and coded values) to a line featureclass.  After the join, when I view the table of the output featureclass the coded values are set to the codes, not the descriptions.  Once I view the Domains (in the subtypes menu in the Feature Class Properties), the descriptions are present after clicking the Domains radio button.

Is there a way to keep the domains so they show the descriptions instead of the coded values after the spatial join?

A workaround would be fine.  I noticed if I selected all records and pasted them back into my origional featureclass the domains showed properly.  I do not know how to copy to clipboard and paste to another featureclass within python though. 

Thanks
Tags (2)
0 Kudos
3 Replies
MikeMacRae
Frequent Contributor
You could try listing out your domains using List Domains after you do the spatial join.

If you need to copy the features, try using You can copy features using CopyFeatures_management
0 Kudos
TomKearns
Frequent Contributor
Thanks. 

My goal was to have the table read properly, the codes refer to events on routes.  It would juset be easier to query if the actual events were listed not just their numerical codes.

As for the CopyFeatures_Management, I guess I can try to select layer by attribute then delete all the records in the initial featureclass.  I wasn't sure if the CopyFeatures_Management tool could write to an already created featureclass.
0 Kudos
MikeMacRae
Frequent Contributor
The List Domains function allows you to list the code and it's associated description. See the example on the help page. They use the iteritems function to parse out the code and the description and then you can just grab the description for the each event and do something with it. Maybe just add a field and update it with the string value of the description using a cursor or a field calculator script?
0 Kudos