Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  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

...

  1.  the File

...

  1.  menu and select Save As….
    -OR-
    On the Standard toolbar, click

...

  1.  the Save

...

  1.  button.

...

...

  1. In the ‘Save As’ window, use the ‘Save in:’ drop-down menu

...

  1. to select

...

  1.  the location of your project folder.

...

...

  1. Double-click

...

  1.  your Project1

...

  1.  folder.

    You will save the map document here, directly inside

...

  1. your Project1

...

  1.  folder, but outside

...

  1. your VashonIsland

...

  1.  geodatabase.

...

  1. For ‘File name:’, type

...

  1.  “Project1Soil

...

  1. and click Save.

...

  1. Click

...

  1.  the Catalog

...

  1.  tab.

    Notice the

...

  1. new Project1Soil

...

  1.  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

...

  1. entire Project1

...

  1.  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.

...

  1. At the top of the Table of Contents, click

...

  1.  the List By Source

...

  1.  button.

...



  1. 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.

...

  1. At the top of the Table of Contents, click

...

  1.  the List By Drawing Order

...

  1.  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

...

  1. the VashonIsland

...

  1.  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.

...

  1. On the Main Menu, click

...

  1.  the File

...

  1.  menu and select Map Document Properties….

...

  1. Towards the bottom of the ‘Map Document Properties’ window, click

...

  1.  the checkbox

...

  1. to Store relative pathnames to data sources

...

  1.  and click OK.

...

...

  1. On the Standard toolbar, click Save

...

  1.  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.

 

 

 

 

 

 

...