Select to view content in your preferred language

Using a Joins with Field Mapping

799
0
08-23-2011 10:26 PM
MalcolmParnell2
Deactivated User
So this is what I want to do:

  • I have a feature class (A) which I want to copy into another existing, empty feature class (B). Don't ask why; I just do.

  • B has coded domains which define the codes for certain attribute values from A.

  • For example, A has a attribute value of "California" which gets changed to a attribute code of "CA" in B.
  • So when I copy features from A to B, I want to remap the attributes: California -> CA.

Seems simple enough. (For those like me who better understand AML and coverages, I would create a relate to a LUT and then calc B.StateCode = A.relate//State  - not syntactically correct of course.)


I can unload a domain to a table using DomainToTable_management and then create a join from A to that table. Can I then use this as an input field for a FieldMap ?

[INDENT]
fldMap_IAF_ID = arcpy.FieldMap()
fldMap_IAF_ID.addInputField(inLayer, JoinedTable.JoinedField)[/INDENT]

From what I've tried it seems not.

Or am I going about the the entirely wrong way? Do I have to use an intermediate feature class and, if so, I still have the problem of updating a field in that based on the join.
Tags (2)
0 Kudos
0 Replies