About this Resource
    Resource Category:
  • Concepts
  • Methods
  • Datasets
  • Examples

Geo-Refer logo Geographical Referencing Learning Resources

Merging Shapefiles in ArcGIS

Sometimes, if the user has obtained shapefiles from different sources, or if they have had to download shapefiles separately for different parts of a study area, they may wish to combine them into one single shapefile for ease of analysis and mapping. A classic example is when working with data at the local authority district (LAD) and unitary authority (UA) level: from many data download services it is often not possible to download one single shapefile containing both sets of boundaries; rather, two separate shapefiles must be downloaded, one containing the boundaries for the LADs and one containing the UA boundaries. A typical example is shown below, where Figure 1a is the shapefile containing the 2001 LAD boundaries in Hampshire whereas Figure 1b is the shapefile containing 2001 UA boundaries that fall within the geographical extent of Hampshire (i.e. Southampton and Portsmouth UAs). Figure 1c shows the two sets of boundaries mapped together.

Local authority district boundaries within Hampshire 2001
Figure 1a: Local authority district boundaries within Hampshire 2001

Unitary authority boundaries within Hampshire 2001
Figure 1b: Unitary authority boundaries within Hampshire 2001

Unitary authority and local authority district boundaries mapped together but still as two separate shapefiles
Figure 1c: Unitary authority and local authority district boundaries mapped together but still as two separate shapefiles

If the user wishes to map these boundaries and/or join attribute data to them, they can continue to work with the two separate shapefiles, or it may be easier to combine them into one single shapefile. This process is known as "merging" within ArcGIS. Note that merging works best with shapefiles which are adjacent to one another but which do not overlap geographically. The process of combining shapefiles which overlap geographically is conceptually and practically different and usually better achieved by using tools such as Intercept and Union. Note that it is only possible to merge shapefiles which contain the same data type i.e. merge points with points; polygons with polygons. Any differences in fields, field names, types and definitions should also be considered prior to merging shapefiles: if the files contain the same fields and the field names, types and definitions are the same in each file (as in Figures 2a and 2b), the merge is likely to be simple and unproblematic, however if they contain different fields or if the same field has different definitions in different files (e.g. text strings of different lengths), the user will need to undertake some explicit mapping of fields in order to tell ArcGIS how to combine and present the fields in the output file. A shapefile's field names, types and definitions can be found by right-clicking on the relevant shapefile name in the Table of Contents panel, selecting Properties and then clicking on the Fields tab.

Attributes and field names, types and definitions for Hampshire local authority districts 2001
Figure 2a: Attributes and field names, types and definitions for Hampshire local authority districts 2001

Attributes and field names, types and definitions for Hampshire unitary authorities 2001
Figure 2b: Attributes and field names, types and definitions for Hampshire unitary authorities 2001

Using ArcToolbox ( ArcToolbox icon )

Within ArcGIS, the Merge tool is found within a set of tools referred to as ArcToolbox. ArcToolbox contains collections of useful tools, categorised by function, which carry out various functions and procedures within ArcGIS. Most tools operate through a wizard-like interface which guides the user through the relevant inputs, options and outputs for the specific tool. Depending on the specific installation of ArcGIS, ArcToolbox may or may not already be open within your ArcMap window. If it is not already visible, you can open ArcToolbox by clicking on the Show/Hide ArcToolbox Window button [see heading] on the main toolbar. This will open the ArcToolbox window (Figure 3), which you can drag, drop and anchor in various places around the ArcMap window.

ArcToolbox panel
Figure 3: ArcToolbox window

The Merge tool can be found within Data Management Tools >> General. Double-clicking on the tool opens up its dialog box (Figure 4).

Merge dialog window
Figure 4: Merge dialog box

The input datasets are those shapefiles which you wish to merge together. These can be selected using the browse button to the right of the input datasets box. You can select as many shapefiles as you wish as long as they are all of the same data type. You then need to specify a location and name for the output file which will be created.

ArcGIS will automatically read the fields, names and definitions from the input files and suggest a mapping for the fields for the output file, but you may amend these if you wish. More detailed information about how to do this and the possible operations available can be found in the ArcGIS Help pages. Basic Help for any tool can be invoked by clicking the Show Help button at the bottom of the Merge dialog box; more advanced Help can be obtained by clicking on the Help button at the top of the basic Help page.

Finally, click on OK and ArcGIS will merge the input files to create one single output shapefile containing your merged features (Figure 5). A status window will inform you when ArcGIS has completed the merge process. Click on Close when it has finished.

Merged shapefile – one single shapefile containing both LAD and UA authorities within Hampshire 2001
Figure 5: Merged shapefile - one single shapefile containing both LAD and UA authorities within Hampshire 2001

Copyright Attribution

ArcGIS® and ArcMap® are registered trademarks of Environmental Systems Research Institute, Inc. (ESRI). The software screen shots shown in this page are reprinted with permission from ESRI. The maps shown above are based on data provided through EDINA UKBORDERS with the support of the ESRC and JISC and uses boundary material which is copyright of the Crown.