3

I am using ArcGIS 10.2.2 for Desktop?

I would like to combine multiple feature classes (same geometry) into a single feature class. The catch is that all of the feature classes have identical fields within them except one, which is unique to that feature class.

Is there a way I can combine these features classes and preserve all of the identical fields with the data correlated to them, while combining the unique field from all of the classes into a new field that just uses the value of the unique field?

I have tried both the append and merge processes. Append unfortunately does not bring any attribution if its not the same field name and merge brought everything, creating a new field for every unique field.

  • What does your non-identical field look like on a couple of tables? I suspect the solution will be altering that field to the same name and data type but how easy that will be to do will vary. – PolyGeo Jan 8 '16 at 23:29
  • If the Feature is named X, the field name is X. The data within the field is always a string. It is also always the second field within the feature if that means anything. – Confused Jan 8 '16 at 23:32
  • As a new user be sure to take the tour as a general introduction to this site and its help center. As people request clarifications it is almost always best to use the edit button to revise your question so that any potential answerers get all the information in the question; they may not have time/inclination to read a comment trail as well. – PolyGeo Jan 8 '16 at 23:36
5

You want Merge. In the Field Mapping dialog, right-click the first unique field where you want all unique fields to be, click "add input field" and select another unique field. Do this multiple times. Now all unique fields will be in the first unique column. This is equivalent to renaming all unique fields to be the same.

3

Unless I am miss-understanding the issue, it does sound like Merge is probably actually the geoprocessing tool you are looking for, but you may just not be using the "Field Map" option to get the results you are after.

I would say try: open Merge tool and add all the feature classes you want to merge as input datasets. Then set the output dataset parameter to the new output feature class/shape file you want created. Next, you will adjust the settings in the "Field Map" section (this is where you will get the fields set how you are wanting). By default, it will have added all the common fields and mapped that field for each dataset, as presumably you desire. However, it will also add each unique field as you point out in your question. What you need to do is right click on each of these unique fields it has added in the Field Map section and click the Delete option. Then, at the top right of the Field Map section you should see a button with a big + in it. Click that button and specify the field properties for the field you want all the unique fields merged into (ex: if you want all the unique fields merged into a single new Text field named MergeUnique, then you would make the field name "MergeUnique", set the field type to Text with the correct field length, and such as that). Click OK to add the new field. Then, you will right click on that new field (which should show up at the bottom of the Field Map list) and select Add Input Field. In the resulting dialog box, you will select the UniqueField from the first feature class and click OK. Then, repeat this Add Input Field step for the unique field from each input feature class. Now you're ready to run it.

Note: If you spend some time getting to know the "Field Map" options, you can do some pretty powerful field manipulation with it. And the Field Map works similarly in the Append tool (assuming you have the Schema Type parameter set to No Test).

  • what if there are 1000s of unique fields? It would take too long manually right clicking and deleting each field. Shame there is no batch delete field option in the merge tool. Sure, I could batch delete the fields using the delete field tool, but that would require me to merge the dataset with the 1000s of unique fields first. It would take forever for that to complete! – Theo F Dec 14 '17 at 21:39
  • @TheoF See the ArcGIS documentation linked to in a comment under klewis answer. Messing with Field Mapping in ArcPy can be a little confusing if you don't stop and think through/plan out what you're doing, but it's really powerful and should be ideal for situations like that where the project's too large to perform manually reasonably. – John Dec 15 '17 at 15:33
2

Make a new identical field name in each featureclass and field calculate the unique field values over. Delete the unique fields and merge.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.