home     syllabus    calendar     lectures    manuals     data lib.   questions     FAQ 

 

Lab 5. Cleaning and merging shape files

When you are mapping in the field, you will be adding data from your iPAQs to the Field Camp computers.  You may wish to combine your work with that of field teams in adjacent areas.  To do this, you will need to merge shapefiles and account for small differences where you drew lines.  This exercise will help you with the mechanics of the operation, using polygon shapefiles as an example.  Polyline shapefiles are handled the same way as polygon shapefiles.  Point shapefiles are much easier to merge – you simply need to delete points, if required.

This exercise does not cover how to decide which lines should be moved.  That is part of the field work and depends on individual circumstances.  This will be covered at Field Camp.

 

Working with Polygons

 

            The first step is to determine whether the shapefiles you are merging have the same atttibutes.  Check this using ArcCatalog.  Right click to see the columns and their definitions.  You can add or edit the columns.  You can also rename columns here.  This is the menu interface for editing:

 

 

 

 

Once you have checked your column names, you should start up ArcGIS and add the two shapefiles to merge.  As mentioned in class, if you are mapping in Area 1, you should merge your data with Area 2 and vice versa.  If you are mapping in Area 3, you should merge you data with Area 4 and vice versa.  We can latter merge the best versions together to get a final map for Field Camp.     The following image represents my example of two shapefiles with similar units.  Following along with your data to see how to merge data.

 

            A closer look (below) shows that the boundary between the red and blue shapefiles is inexact.  You need to change the editing function from Create New Feature to Modify.  Once you do this, you can move vertices (the corners that you originally digitized).  To do this, double click on the polygon.  The vertices should be visible as black triangles.

 

 

            You need to left click over this and then, holding down the button, move the mouse to where you want this moved to.  The important thing to do first, however, is to set you Editing Snapping  options (Snapping, under the editing menu) so that one shape file snaps to the other shapefiles’ vertices, edges, and ends.

 

 

            If you have both checked, as above, your new vertices will snap to the nearest feature.  You should see how this behaves before deciding on which shape (or both shapes) you should be snapping to.

            You will notice that one polygon may overshoot a polygon in the other shapefile.  You will need to move the layers up or down in the table of contents.  When moving layers in the table of contents, the Display tab should be selected, not the Source tab.

            Once you are through snapping the features together so that there is no overlap, you will need to merge the shapefiles into a single shapefile.  This is accomplished using the Merge function in the Geoprocessing Wizard (found under the Tools menu).

 

 

 

            Click on Next to get to the next page.  On this new page, click on the two shapefiles.  Notice that You have a “Use fields from” field.  This is useful if you have different field names in your shapefiles.  Click on Finish to complete the process.

 

            Next you need to dissolve the polygons.  Notice that the Cmi and Smi units from each of the shapefiles is separated by a line.  The dissolve function creates a new polygon from polygons that have a common boundary but have similar attributes on either side.  Again, this is part of the Geoprocessing Wizard (found under the Tools menu).

 

       

Once you click next, you see the new window.  Select the merged shapefile and select the attribute which is common (in this case it should be unit, or the name you used to specify the unit.  Click on next to see the next window.

 

 

            This window appears.  You should not click any of the buttons.  Just click on finish.

 

            You new shapefile should look similar to this (the lines separating similar units is missing):