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:
- For good data management, ensure your input shapefiles (the ones you wish to merge) are located in the same folder.
- In QGIS, add the two shapefiles you wish to merge to your workspace.
- Click on Vector > Data Management tools > Merge Vector Layers
- Click on the dots indicated here to open a list of available layers for merging:
- Select the layers you wish to merge:
- Ensure that ‘Open output file after running algorithm‘ is checked.
- 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:
- Your merged shapefile will appear in your table of contents and on the map:
Drag this layer to the top of your table of contents if necessary.
- 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:
- Click on the Edit icon to edit these blank cells and add any necessary data.
- Save your edits.