7.03.4 Merging Shapefiles in QGIS

Merging data can be necessary when you obtain vector data from multiple sources.  The data needs to be the same geometry type (i.e. all pints, all lines, or all polygons). Each layer should be the same underlying projection (check the layer properties).

Here you can see we have two shapefiles with different attribute tables:

merge1 merge2

  1. For good data management, ensure your input shapefiles (the ones you wish to merge) are located in the same folder.
  2. In QGIS, add the two shapefiles you wish to merge to your workspace.
  3. Click on Vector > Data Management tools > Merge Vector Layers
  4. Click on the dots indicated here to open a list of available layers for merging:
  5. Select the layers you wish to merge:
  6. Ensure that ‘Open output file after running algorithm‘ is checked.
  7. Click on the dots indicated here, click ‘Save to file’, navigate to your desired output folder, give your merged shapefile a name, and click Save:
  8. Your merged shapefile will appear in your table of contents and on the map:
    merge11Drag this layer to the top of your table of contents if necessary.
  9. Open your merged shapefile’s attribute table. You will see that any fields the two shapefiles had in common are now merged, while any unique fields have been added and left blank (NULL) or populated with a zero:
  10. Click on the Edit 19_EditMode icon to edit these blank cells and add any necessary data.
  11. Save 4_save your edits.