0

I have three shapefiles (shp); A, B, and C, for example.

Each shp contains their data. I want to merge A and B into C. I did merge A into C, and it worked--let's call it D. But when I merged B and D (become E), data on B didn't replace data on D (unsubstituted).

What do I have to do?

7
  • 1
    Could you rephrase your question and differentiate between appending (adding data from one file to another, already existing, non-empty file) and merging (combining two files into a completely new one). Then it's easier to understand what you are trying to do. Also, neither of these operations will replace any data that you have already, only add to it.
    – Martin
    Commented Mar 16, 2016 at 8:47
  • 1
    merge doesn't imply substitution, and could be performed with A,B and C at the same time. Could you give more detail (if possible illustrated) about what you intend to do ? Maybe you need "union"
    – radouxju
    Commented Mar 16, 2016 at 8:48
  • 1
    @RatihKhairana I think you have here a slightly different problem, at least what you describe in your comment. For the same spacial data you need a join. For different attributes data you can use the merge I describe in my answer, check here for errors!
    – wittich
    Commented Mar 16, 2016 at 9:33
  • 1
    I'm leaning towards that you are looking for a spatial join rather than merging. Do you want to combine the geometries or just attribute data?
    – Martin
    Commented Mar 16, 2016 at 9:47
  • 1
    It seems that you're using the wrong terminology, so we're not sure what you need. Check out the ArcGIS overlay tools and see which one fits your needs: pro.arcgis.com/en/pro-app/tool-reference/analysis/…. To me, it sounds like the Update tool might be what you're looking for.
    – Tom
    Commented Mar 16, 2016 at 15:55

1 Answer 1

3

How to merge several Shapfiles

You can merge all three shapefiles at the same time. You may get problems when they have different attributes.

  1. Go to Geoprocessing -> Merge (s. ESRI help for merging)

  2. Add you three shapefiles and check the details in Field Map:

    merge example

    You can not have different attribute type! Either you give the attribute a different name or you change the type of it. There are two ways to do that in ArcGIS:

    1. Add a new temporary field (Add Field) copy all values with the Field Calculator. Delete the old field and create a again a new with the correct Name and Type and copy the values back or,

    2. Edit the .DBF file (eg. using OpenOffice or LibreOffice) and correct the field type. (eg. N = numberic value, C = text field, the number behind describes the length of the field, there are two numbers for an decimal value)

    enter image description here


Troubleshooting

If the merging process fails, it usually gives you an explanation what went wrong (eg. check the Results Geoprocessing -> Results), you may read it carefully and you will understand the problem.

arcgis results problem

1
  • 1
    You can also right-click in the Field Map area and add any field as input, the names doesn't have to be consistent (although it helps, since it then finds the connection automatically). The same limitations with field types still apply though.
    – Martin
    Commented Mar 16, 2016 at 9:49

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