Introduction

In this tutorial, you will use several different methods in ArcGIS to construct a variety of sampling methods across Vashon Island. You will then connect these values to known soil properties to plan a pilot study measuring soil contamination on Vashon Island.

Part 1: Setting Up a GIS Project

Creating a new project folder

First, you will need to establish a project folder, where you will store all of the files associated with this lab assignment. When working in a public computer lab environment, we recommend saving your work on an external USB drive. For the purposes of illustration throughout these lab instructions, the project folder will be located directly on a USB drive, which is mapped as the F: drive, though your USB drive letter may vary. If you wish to nest your project folder inside other folders within the file organization scheme on your USB drive, ensure that no spaces or special characters are used anywhere along the entire file path of your project folder.

  1. Using Windows Explorer, navigate to the location where you would like to locate your project folder (likely the E: or F: drive).
  2. Create a new folder inside your selected location and name it “Vashon”. Remember not to use any spaces. Note the full file path of your Vashon folder.

Connecting to a project folder

Now that you have created a project folder for this lab, you will need to connect to it in the ArcGIS for Desktop environment.

  1. On the Desktop, click the Start menu and select All Programs>ArcGIS>ArcCatalog 10.5.
  2. On the Standard toolbar, click the Connect To Folder button.
  3. In the ‘Connect To Folder’ window, navigate to and select your Vashon folder, as shown on the following page, and click OK.

You should now see a connection to your project folder in the Catalog Tree, as shown below.

Creating a new project geodatabase

Now that you have your project folder established, you will need to create a new file geodatabase in which you can store all of the GIS files that you download and process for this lab.

  1. In the Catalog Tree, right-click your Project1 folder and select New>File Geodatabase.
  2. Rename the geodatabase from “New File Geodatabase” to “VashonIsland”, since that is the name of the region for which you will be gathering data.

Part 2: Obtaining a Map of Vashon Island

Downloading GADM data

Your project folder and geodatabase have been created, so you are ready to download your first set of online GIS data.

  1. In a web browser, go tohttp://www.gadm.org/.
  2. In the top menu bar, click Download.
  3. For ‘Country’, select United States.
  4. for ‘File format’, select ESRI file geodatabase.
  5. Click OK.
  6. Click Download.
  7. Click the arrow to the right of USA_adm_gdb.zip at the bottom of your web browser. 
  8. Select Show in Folder.
  9. Right-click USA_adm_gdb.zip.
  10. Select Extract All.
  11. Under ‘Select a Destination and Extract Files,’ navigate to your Project1 folder.
  12. Click OK.
  13. Click Extract.

This map will contain 3 feature classes (listed below).  While any will work, it will be easiest to find the island using USA_adm2 as you can pinpoint a specific county.

USA_adm0: National Boundary
USA_adm1: State Boundary
USA_adm2: County Boundary

Creating a new map document

Now you will create a new map document for your project. You will begin by opening ArcMap.

  1. In ArcCatalog, on the Standard toolbar, click the ArcMap button.

    Because you are beginning a new project, you want to open a new blank map template.
  2. In the ‘ArcMap – Getting Started’ window, ensure that My Templates and the Blank Map template are selected, as shown below.

    At the bottom of the ‘ArcMap – Getting Started’ window, notice the default geodatabase for this map is currently set to C:\Users\gistrain\Documents\ArcGIS\Default.gdb. The default geodatabase should be set to the geodatabase that will contain most of the data for the particular map document you are working on. In this case, you will want to use the VashonIsland geodatabase you created earlier.
  3. Next to the ‘Default geodatabase for this map:’ box, click the Browse button.
  4. In the ‘Default Geodatabase’ window, use the ‘Look in:’ drop-down menu to select your Project1 folder.

    This connection automatically appears, because any connections made in ArcCatalog are also available in ArcMap.
  5. Click once to select the VashonIsland geodatabase and click Add.

    If you accidentally double-click instead of single-click the VashonIsland geodatabase, you will need to click the Up One Level button to return to your Project1 folder and reselect the VashonIsland geodatabase.
  6. Ensure the ‘Default geodatabase for this map:’ box now says “…\Project1\VashonIsland.gdb” and click OK.

Adding feature data in ArcMap

You will now begin by adding the data you previously downloaded to your map document using ArcCatalog. If you have two computer monitors available, you may want to keep the standalone ArcCatalog application open on one monitor, so that you can drag and drop layers from ArcCatalog into ArcMap, but you can also open ArcCatalog directly from within ArcMap, which you will do now.

  1. On the top right side of the Map Display, click the Catalog tab to open the Catalog window.

    If you ever close the Catalog window, causing the Catalog tab to disappear, you can reopen it by clicking the Catalog button on the Standard toolbar or by clicking the Windows menu and selecting Catalog.

  2. On the Catalog toolbar, click the Go to Default Geodatabase button, which will take you directly to the VashonIsland geodatabase, which you specified as the default geodatabase upon opening ArcMap.
  3. Double-click Folder Connections>Project1>USA_adm.gdb to expand them.
  4. Drag the USA_adm2 shapefile into the Map Display.

Notice that the Catalog window automatically collapses to provide you with more room in the Map Display. If you do not want it to collapse, you can pin it open by toggling the Auto Hide feature using the pushpin button in the upper right corner of the Catalog window.

Isolating King County from the United States

While you could zoom into Vashon Island from an administrative boundary map of the entire country, the island will be much easier to find and the map will process more quickly if you first isolate King County, the county within which the island is located.

  1. Right-click on USA_adm2 in the table of contents.
  2. Select Open Attribute Table.
  3. Click the gray box next to OBJECTID 2974 (King, Washington). You should see a blue outline around this county on the map.
  4. Close the attribute table.
  5. Right-click USA_adm2.
  6. Click Data, and then Export Data.
  7. Keep the default settings in the Export Data dialog box, but rename the file as “King_WA.” Click OK.
  8. Add the exported data to the map as a layer.
  9. When you see the new layer appear, right-click on USA_adm2 and select remove.
  10. Right-click King_WA and select Zoom to Layer.

Separating Vashon Island from mainland King County

While you have cropped the map to a relatively small area, you still have mainland King County and Vashon Island together as a single object. You will use the singlepart to multipart tool to create a separate object for every polygon in the layer.

  1. On the Standard toolbar, click the ArcToolbox button.
  2. In ArcToolbox, double-click the Data Management Tools toolbox>Features toolset>Multipart to Singlepart tool.
  3. Drag King_WA from the Table of Contents into the ‘input features’ field.

    The Output Feature Class will automatically be named King_WA_MultipartToSinglepar.
  4.  Click OK.
  5. When you see the new feature class appear in the table of contents, right-click on King_WA
  6. Click Remove.
  7. Click the Select Features button at the top of the screen.
  8. Click on the island to the left of the King County.

     The island should become highlighted.
  9. Right-click King_WA_MultipartToSinglepar
  10. Select Data and then Export Data.
  11. Click the folder icon to the right of ‘Output Feature Class.’
  12. Rename the file “Vashon_Island.” Click OK.
  13. When asked if you want to add the exported data to the map as a layer, click Yes.
  14. Right-click King_WA_MultipartToSinglepar
  15. Select Remove.
  16. Right-click Vashon_Island and select Zoom to Layer.

Projecting Vashon Island

Because we are projecting a spherical surface onto a flat plane, areas to the far North and South tend to be relatively distorted in world maps.  To account for this, we will project Vashon Island into Washington State Plane, a projection that minimizes distortion in the state.

  1. On the Standard toolbar, click the ArcToolbox button.
  2. In ArcToolbox, double-click the Projections and Transformations toolbox à Project tool.
  3. Drag Vashon_Island from the Table of Contents into the ‘Input Dataset or Feature Class’ field.
  4. In the ‘Output Dataset or Feature Class’ field, rename the output feature class “VashonIsland.”
  5. Click the icon to the right of ‘Output Coordinate System.’
  6. In the ‘Search field,’ type “Washington.”
  7. Press Enter.
  8. Double-click Projected Coordinate Systems àState Plane àNAD 1983 (2011) (US Feet)
  9. Single-click NAD 1983 (2011) State Plane Washington North FIPS 4601.
  10. Click OK.
  11. Click OK

    A new layer, VashonIsland, will appear in the Table of Contents.
  12. In the Table of Contents, right-click Vashon_Island and click Remove.

Changing the projection of the data frame

Now that we have changed the projection of Vashon Island itself, we must also change the projection of the data frame.

  1. Click the View tab at the top of the window.
  2. Select Data Frame Properties.
  3. Click on the Coordinate System tab.
  4. In the ‘Search field,’ type “Washington.”
  5. Press Enter.
  6. Double-click Projected Coordinate Systems àState Plane àNAD 1983 (2011) (US Feet)
  7. Single-click NAD 1983 (2011) State Plane Washington North FIPS 4601.
  8. Click OK.

    A warning message will appear. 
  9. Click Yes.

Saving ArcGIS projects

At this point, it is a good idea to save your map document and to continue saving regularly.

  1. Click the File menu and select Save As….
    -OR-
    On the Standard toolbar, click the Save button.
  2. In the ‘Save As’ window, use the ‘Save in:’ drop-down menu to select the location of your project folder.
  3. Double-click your Project1 folder.

    You will save the map document here, directly inside your Project1 folder, but outside your VashonIsland geodatabase.
  4. For ‘File name:’, type “Project1Soil” and click Save.
  5. Click the Catalog tab.

    Notice the new Project1Soil map document you just saved is now visible.

    It is important to note that saving your map document, or ArcGIS project file, does not save a copy of all of the data layers referenced in your map document. All it saves is the file path location used to access this data, along with the particular layer symbologies you have chosen. Because of this, you must remember to transport your entire Project1 folder containing all of your data files and your map document with you. If you were to have only the map document with you and open it, your Table of Contents would appear correctly, but each layer would have a red exclamation point next to it, indicating that the data at the referenced file path is missing. Because of this, your Map Display would be completely blank. (This problem could be solved by clicking the red exclamation point and setting the data source to the correct file path.)

    At the top of the Table of Contents window, notice that the leftmost List By Drawing Order button is currently selected.

  6. At the top of the Table of Contents, click the List By Source button.

    The Source tab displays the full file path locations of all the data layers referenced in your map document. By default, the map document will store this full file path to all of your data files, F:\Project1\VashonIsland.gdb.
  7. At the top of the Table of Contents, click the List By Drawing Order button to return to the list of data layers.

    Unfortunately, if you use your USB drive on another computer, it may be assigned to a different drive letter, thereby changing the full file path to your data files. In order for your GIS project to open properly on other computers, you must tell the map document to store relative pathnames to its data sources. By storing relative pathnames, it communicates to the map document that the data is stored in the VashonIsland geodatabase stored in the same folder as the map document itself, but it doesn’t matter what that folder is called or what its file path is, as long as the map document and data are in the same location relative to each other.
  8. On the Main Menu, click the File menu and select Map Document Properties….
  9. Towards the bottom of the ‘Map Document Properties’ window, click the checkbox to Store relative pathnames to data sources and click OK.
  10. On the Standard toolbar, click Save again to store this setting in your map document.

Part 3: Creating a Random Sample

Creating random points

Next, you will create 30 random points on Vashon Island.

  1. On the Standard toolbar, click the ArcToolbox button.
  2. In ArcToolbox, double-click the Data Management Tools toolbox àSampling toolset à Create Random Points tool.
  3. Click the folder icon to the right of ‘Output Location.’
  4. SelectVashonIsland.gdb and click Add.
  5. For ‘Output Point Feature Class,’ type “SampleRandom.”
  6. For ‘Constraining Feature Class (optional),” click the drop down arrow and select VashonIsland.
  7. Scroll down. For ‘Number of Points [value or field] (optional),’ enter “30.”

  8. Click OK.

Creating a Stratified Sample

Next, you will create a stratified sample on Vashon Island based on soil type. First, you will need to download soil data for Vashon Island.

Downloading soil data

  1. Open a web browser.
  2. Go to www.arcgis.com.
  3. In the search box, type “SSURGO Downloader.” Press Enter.
  4. Scroll down and click, SSURGO Downloader by esri_landscape2.
  5. Select View Application on the upper-right corner of the page.
  6. In the search box, type “Vashon Island.” Press Enter.
  7. Click Zoom, and then click Vashon Island.
  8. Click Download. Click the download to open it.

Exporting data into your geodatabase

The soil data is currently in a geodatabase that will be difficult to find if you close the window.  You need to put it into your geodatabase so that you can access the feature class in the future.

  1. In the Table of Contents, right-click the Map Units layer and select Data>Export Data….

    Notice that, by default, the ‘Export Data’ window is set to export only the selected features using the coordinate system of the data source. Also notice that the output feature class defaults to Documents\ArcGIS\Packages\PugetSound_17110019_D3BE2644-70FB-4012-B52B-FA3CD4D81A05\v103\pugetsound_17110019.gdb\Export_Output. You need to redirect the file into your own geodatabase.

  2. Click the folder icon to the right of ‘Output Location.’
  3. Navigate to VashonIsland.gdb. Double-click the database.
  4. Rename the feature class “PugetSound_Soil.”
  5. Click Save.
  6. Click OK.
  7. When asked if you want to add the exported data to the map as a layer, click No.
  8. Close the ArcMap Document.

Clipping data to Vashon Island

  1. Open Project1Soil.mxd.

    Your document should look like this:

  2. In the Catalog window on the right side of the screen, navigate to VashonIsland.gdb.
  3. Double-click on VashonIsland.gdb.
  4. Drag the PugetSound_Soil feature class into the workspace.

    Because the two maps are not in the same projection, Geographic Coordinate Systems Warning will appear. You will fix this later.

  5. Click Close.
  6. In the Geoprocessing tab, select Clip.
  7. DragPugetSound_Soil into the ‘Input Features’ Field.
  8. DragVashon_Island into the ‘Clip Features’ Field.
  9. Rename the output feature class “VashonIsland_Soil.”
  10. Click Environments…
  11. Click Output Coordinates.
  12. Under ‘Output Coordinate System,’ select Same as “VashonIsland.”
  13. Click OK.

  14. Click OK.

    You will see VashonIsland_Soil appear in the Table of Contents.

  15. Right-click PugetSound_Soil.
  16. Select Remove.

Dividing the island into categories

In order to make a stratified sample, you need to divide the island into categories, and then use the total are of each category to find how many points to select from each region. We chose to make our categories based on farmland class, but you can stratify based on whatever category you choose.

  1. Double-click VashonIsland_Soil from the Table of Contents.
  2. Click the Symbology tab àShow Categories à Unique Values.
  3. Under ‘Value Field,’ select Farmland Class.
  4. Click Add All Values.
  5. Click OK.

Combining farmland categories

Now, we have 5 different categories. However, the categories ‘All Areas are Prime Farmland’ and ‘Farmland of statewide importance’ are redundant, so we want to combine them into a single category.

  1. Right-click on VashonIsland_Soil à  Click Open Attribute Table.
  2. Click on Table Options in the upper left corner à  Click Add Field…
  3. In ‘Name’ type “Strata”, and in ‘Type’ click the drop down menu and select Text.
  4. Click OK.
  5. Click on Table Options in the upper left corner à  Click Select by Attributes…
  6. For ‘Method,’ scroll until farmlndcl. Double click farmlndcl.  Click In, then click (). Click Get Unique Values, and then select All areas are prime farmland. Type a comma, and then click Get Unique Values again and select Farmland of statewide importance.
  7. Click Apply.
  8. Scroll all the way to the right in the Attribute Table. Right-click on Strata à  Click Field Calculator…

    A warning will display when you open Field Calculator. This warning just means that the calculation you perform cannot be undone.

  9. When the pop-up appears, click Yes.
  10. In ‘Strata=’, type “”prime farmland”” in quotation marks
  11. Click OK.

  12. Click on the white space on the map to clear the selection.
  13. Repeat steps 5-11 for Not prime farmland, Prime farmland if drained, and Prime farmland if irrigated individually. Keep the category names when using Field Calculator.

Dissolving farmland categories

Now, we would like to combine all areas of the same type into a single unit

  1. Click the Geoprocessing tab à Dissolve.
  2. Select VashonIsland_Soil for ‘Input Features’.
  3. Rename the output feature class “Strata” in your geodatabase.
  4. Select Strata for ‘Dissolve_Field(s)’.
  5. Click OK.
  6. In the Table of Contents, right-click Strataà Properties à the Symbology tab.
  7. In ‘Show,’ click Categories.
  8. In ‘Value Field’, Strata should already be selected. Click Add All Values. If you would prefer, you can change the colors under ‘Color Ramp’. Otherwise, click OK.

Calculating the proportion of total area in each category

Next, you will find what proportion of the island each farmland class fills.

  1. Right-click on Strata à  Click Open Attribute Table.
  2. Click on Table Options in the upper left corner à  Click Add Field…
  3. In ‘Name’ type “Proportion”, and in ‘Type’ click the drop down menu and select Double.
  4. Click OK.
  5. Right-click Shape_Areaà Statistics.
  6. Copy the value of ‘Sum’. This value is the total area of Vashon Island.
  7. In the Attribute Table, right-click on Proportion à  Click Field Calculator…
  8. For ‘Fields:’, double-click Shape_Area. Click the division symbol, and then paste the total area you copied earlier.
  9. Click OK.
  10. Repeat steps 1-2.
  11. In ‘Name’ type “Points”, and in ‘Type’ click the drop down menu and select Short Integer.
  12. Click OK.
  13. In the Attribute Table, right-click on Pointsà  Click Field Calculator…
  14. For ‘Fields:’, double-click Proportion. Click the multiplication symbol, and then type “30”. This will give you the number of points that should be in each type of farmland.
  15. Click OK.

Creating points proportional to the area for each category

Next, you will create random points, using the proportion of area to determine the proportion of points that should be in each area.

  1. On the Standard toolbar, click the ArcToolbox button.
  2. In ArcToolbox, double-click the Data Management Tools toolbox àSampling toolset à Create Random Points tool.
  3. Click the folder icon to the right of ‘Output Location.’
  4. Select VashonIsland.gdb and click Add.
  5. For ‘Output Point Feature Class,’ type “SampleStratified”
  6. For ‘Constraining Feature Class (optional),” click the drop down arrow and select Strata.
  7. Scroll down. For ‘Number of Points [value or field] (optional),’ select ‘Field,’ click the drop down arrow and select Points.
  8. Click OK.


Creating a Systematic Sample

Next, you will create a grid of points evenly spaced across the island. 

Calculating grid size

To do this, you need to divide the area of the island by the number of points you want to create to find the distance between each point.

  1. Right-click Vashon_Island_Project.
  2. Select Open Attribute Table.
  3. Scroll to the right until you see the Shape_Area Field.
  4. Record the value under Shape_Area.

    This is the total area of the island.  You will use this area to calculate how large your grid should be.

  5. Divide the total area by the number of points you want to select.

    This gives you the area occupied by each point. To find the distance between points, you need to take the square root of this value.

  6. Take the square root of the value found in section 5.

Creating a grid

  1. In ArcToolbox, double-click Data Management Toolsà Sampling àCreate Fishnet.
  2. Name your output feature class “Vashon_Island_Grid” and make sure it is in your geodatabase.
  3. From the table of contents, drag the layer of the map you want to overlay into the template extent box.

    This will create a rectangular grid that fully encompasses the layer you indicated.

  4. Under ‘Cell Width’ and ‘Cell Height,’ enter the value found in section 6.
  5. Under "Geometry Type," select POLYGON.
  6. Click OK.

Now, you have a grid overlaying Vashon Island with a point in the center of each square.  Of the layers you just created, you only want to keep the points which intersect with the island

Clipping the grid

  1. Click the Selection tab at the top of the window.
  2. Click Select by Location.
  3. Under ‘Selection method:,’ choose select features from.
  4. Under ‘Target layer(s):,’ choose ‘Vashon_Island_Grid_label.’
  5. Under ‘Source layer:,’ choose ‘Vashon_Island_Project.’
  6. Under ‘Spatial selection method for target layer feature(s):,’ choose ‘intersect the source layer feature.’
  7. Click OK.
  8. Right-click the Vashon_Island_Grid_label layer>Selection>Create Layer from Selected Features.
  9. Right-click the Vashon_Island_Grid_label layer and the Vashon_Island_Grid layer>Remove

Connecting Sample Points to Collected Data

Soil samples were collected at various points on Vashon Island. You will now find the collection point that is closest to you sample points so that you can use the data from these collection points.

Mapping the collection sites

The data for the locations of the collection sites is in a table, not a shapefile. Therefore, you will need to map the points.

  1. Open ArcCatalog.
  2. On the Standard toolbar, click the Connect To Folder button.
  3. Click on Computer>O: Drive>Short_Courses>STAT685
  4. In ArcMap, click on the Catalog tab>Folder Connections>STAT685>sampling_sites.xls>drag in sampling_sites$
  5. Right-click on sampling_sites$>Display XY Data
  6. Ensure that ‘X Field’ is longitude, and ‘Y Field’ is latitude. Under ‘Description’, click Edit.
  7. Scroll up. Click Geographic Coordinate Systems>North America>NAD 1983. Click OK.
  8. Click OK.

    A warning will display. This warning means that the table will be visualized, but it will not create a shapefile, so there will be limited functionality.

  9. Click OK again.

    A new layer called sampling_sites$Events will appear.

  10. Right-click on sampling_sites$Events>Data>Export Data
  11. Under ‘Use the same coordinate system as:’, click the data frame.
  12. For ‘Output feature class,’ change the name to ‘collectionsites’
  13. Click OK.
  14. Click Yes to add the exported feature as a layer.
  15. Right-click the filepath O:\Short_Courses\STAT685\sampling_sites.xls and click Remove.

Joining collection data to the collection sites

The data from the collection sites soil samples is in a different Excel file. For your project, you will need to process this Excel file on your own. For the purposes of this tutorial, a sample Excel file is provided.

  1. Go to the ArcCatalog tab>VashonDataSample.xls>drag in Sample_As$
  2. Right-click collectionsites>Open Attribute Table>Table Options>Joins and Relates>Join
  3. For ‘Choose the field in this layer that the join will be based on:’ select SAMPLECODE. 

    ‘Choose the table to join to this layer, or load the table from disk:’ should automatically be filled with Sample_As$ and ‘Choose the field in the table to base the join on:’ should automatically be filled with SampleCode.

  4. Select these options if they are not already filled.

  5. Click OK.

    This attribute table for CollectionSites now includes values for As_S. Now, you want to export the join so that all of the fields become permanent components of the attribute table.

  6. Right-click on CollectionSites>Data>Export Data
  7. For ‘Output feature class,’ change the name to ‘CollectionSites_As’
  8. Click OK.
  9. Right-click Sample_As$
  10. Click remove.

Finding the nearest collection point

Next, you will connect your sample points to the nearest collection point.

  1. Click collectionsites and SampleRandom to display both on the map.
  2. Click ArcToolbox>Analysis Tools>Proximity>Near
  3. For ‘Input Features’, select SampleRandom. For ‘Near Features,’ select CollectionSites_As.
  4. Click OK.
  5. Right-click Sample_Random.
  6. Select Open Attribute Table.
  7. Click the Table Options button in the top left of the attribute table.
  8. Go to Joins and relates>Join…
  9. Join the field based on NEAR_FID.

    Ensure that your dialog box appears like the one below:

  10. Click OK.
  11. Right-click on SampleRandom>Data>Export Data
  12. For ‘Output feature class,’ change the name to ‘SampleRandom_SiteAs’.
  13. Click OK.
  14. Click yes.
  15. Right-click SampleRandom à Remove.

Exporting an attribute table into Excel

  1. Right-click SampleRandom_SiteAs>Open Attribute Table
  2. Click the Table Options button in the top left of the attribute table.
  3. Click Export.

    The table will automatically save into your geodatabase, where you will not be able to access it. You need to save the file in your folder, but outside your geodatabase.

  4. Click the Browse button to the right of ‘Output Table.’
  5. Click the Up One Level button.
  6. Rename your file “SampleRandom_SiteAs.”
  7. Save the file as a Text File.

  8. Click Save.
  9. Click OK.
  10. Click No.
  11. Repeat these steps for the systematic and stratified points.

 

 

 

 

 

 

 

  • No labels