Exercise: Vector Analysis I

Exercise: Vector Analysis I 1. 2. 3. 4. 5. 6. Open a map document Create an event layer from polygon centroids Selecting points near a line Selecting...
Author: Jemima McGee
2 downloads 0 Views 402KB Size
Exercise: Vector Analysis I 1. 2. 3. 4. 5. 6.

Open a map document Create an event layer from polygon centroids Selecting points near a line Selecting adjacent polygons Line-on-polygon selection Polygon-on-line selection

Open a map document 1. Create a directory on a local drive, say M, called v_an_1. 2. Download data and save the data to the directory v_an_1. Unzip the file. 3. Open ArcMap and set the working directory to the new directory (Geoprocessing > Environments): 4. Open the map document v_an_1.mxd, and save it in this directory. 5. When the map document opens, it will appear with a data frame displaying Pack Forest. Create an event layer from polygon centroids We are interested in which continuous forest inventory (CFI) plot centers are close to streams, and what that distance is. There may be a relationship between amount of timber, species composition, etc. and distance to streams However, for this exercise we only have a CFI polygon layer. Because we have the plots stored as polygons, we need to convert to points. This process will allow us to create a point dataset from the polygons. 1. Select the CFI layer, then Edit/Copy, then Paste layer. Note that you will now have 2 CFI polygon layers in the map. 2. Open the attribute table for the new cfi shapefile. 3. Add a field called x_coord to the table (floating point, precision 10, scale 2). This specifies the field will contain 8 integer places and 2 decimal places. 4. Add a field called y_coord to the table (floating point, precision 10, scale 2).

5. Right-click the x_coord field and select Calculate Geometry to calculate X coordinates. Do the same thing for Y coordinates. Now you should see the X and Y coordinates of the centroid on each record. 6. Export the attribute table to a dBASE table M:\v_an_1\cfi_centroid_table.dbf: Now the exported table is added to the map (see the Source tab). 7. Close the table. 8. Right-click on the the new table in the Table of Contents and select Display XY Data. The dialog will automatically show the default X and Y fields. 9. Click the Edit button for changing the coordinate system of the new points. 10. Select the layer streams_arc to import its coordinate system properties. 11. Click OK to add the points to the map 12. Now you will see the points display as "cfi_centroid_table Events ". 13. Right-click the new layer and Data, then Export Data to M:\v_an_1\cfi_centroid_points.shp. 14. You can now delete the CFI polygon layer copy, cfi_centroid_table Events, and the exported dbf table from the map, but keep the new CFI centroid points layer. We will use these points in the next section.

Selecting points near a line (2 methods) Method 1 (simple) 1. From the Selection menu, choose Select By Location. 2. Select features from cfi_centroid_points that are within a distance of features in Streams with a selection buffer distance of 50 feet, as shown:

While this method allows you to easily select features that are within a specified distance of features in another layer, it does not tell you exactly how far each feature is from the source.

Question 1: How many points are selected? ______________

Clear the selection. (Do not forget this!) Method 2 (more complicated, but more powerful) 1. Right-click the cfi_centroid_points layer and select Joins and Relates > Join.

1. In the first dropdown, select Join data from another layer based on spatial location. 2. Click the radio button for Each point will be given all the attributes of the line that is closest to it, and a distance field showing how close that line is. 3. Specify the output as a shape file M:\v_an_1\cfi_spatial_join_streams. 4. Click OK. 2. Open the newly joined table. You will see all the attributes of the CFI points, along with the fields from the streams layer, and a new field called Distance. The values from the streams layer are those from the stream that was closest to each point. The Distance field, which is created automatically, contains the distance from each point to that closest stream line. 3. Open the properties for the cfi_spatial_join_streams layer and change the symbology to graduated color using the brown monochromatic color ramp based on the Distance field.

4. Turn off the stands layer for a better view. The darker plot centers are far from streams, and the lighter plot centers are closer to streams. 5. Make a selection based on the Distance field: Select points in the cfi_spatial_join_streams layer that are less than 50 feet from the nearest stream using the attribute query: “Distance” < 50 6. Open the attribute table of the cfi_spatial_join_streams, show only Selected records, and then sort ascending based on Distance. While the selection of features is identical in the two methods, by using the joined distance field, not only do you get to select features that are within a specified distance, it is also possible to understand the distribution of the distances.

Question 2: What is the maximum distance from the selected points to the nearest stream (keep two decimal places)? _______________

7. Richt-click the Distance field and select Statistics. The mean distance of plots from streams for those plots within 50 ft of a stream is 22.2 ft.

You have just performed several actions. First, you converted a polygon layer to a point layer by using the X,Y coordinates of the polygon centroids. This can be useful when you want to represent or analyze polygon data as a series of points rather than as polygons. Second, you joined a point attribute table and a line attribute table, creating a new point layer. This is a special type of join that always joins attributes of pairs of the closest features, and also automatically calculates the distance between each pair of features. A point-to-line spatial join takes advantage of the spatial relationship of proximity between features of separate layers. Selecting adjacent polygons This process will select only stands that are adjacent to 71-80 year old stands (not including the 71-80 year old stands). 1. Open the Stands attribute table. Right-click the AGE_CLASS_2003 field and select Summarize.

2. The only summary statistic is AREA > Sum. Specify the output table as a dBASE table. Place the summary table in M:\v_an_1\stands_age_class.dbf and add the table to the Table of Contents.

This creates a table with a unique value for each 10-year age class, containing an additional attribute for the total area within each age class.

3. Perform a Relate (Options in the upper left corner, Joins and Relates > Relate) between this table and the original Stands attribute table, as shown below:

4. Select the record in stands_age_class.dbf for 71-80 year old stands. To select records from the Stands table and layer, from the stands_age_class.dbf table, click Options > Related Tables > age_class :polygon. Note you could have performed this selection using a query, but you should get familiar with this alternate, and in some ways, more efficient, method of using summary tables and links. Now your selection includes those stands in the 71-80 year age class. Question 3: How many stands are in the 71-80 years age class? __________ 5. Next, perform a spatial selection to get stands that are adjacent to the currently selected set. From the menu, choose Selection > Select By Location.

6. You want to select features from Stands that intersect the features in Stands, as shown below:

Apply and Close the dialog. 7. Next, in order to get a selected set of stands which are adjacent to those in the 7180 year age class, but excluding those in the 71-80 year age class, from the menu, choose Selection > Select By Attributes. Your selection on Stands should Remove from current selection those stands which are in the 71-80 year age class.

8. Because the default selection symbol is a thick cyan outline, it is not possible to discern between selected polygons and those that are surrounded by selected polygons. We will alter the selection symbol now. Open properties and click the Selection tab for the Stands layer.

9. Double-click the selection symbol to open symbol properties. Choose a Line Fill Symbol.

10. Make sure to use the same color (any color you choose) for the Fill Color and Outline Color.

11. Now you can clearly see those polygons that are selected and those that are not.

Your selection of stands includes those that are adjacent to the 71-80 year age class, but not including the 71-80 year age class.

Question 4: How many stands are adjacent to 71-80 year old stands (not including the 71-80 year age class)?_____

You have just performed a selection of a group of spatial features based on their proximity to a different set of features. This can be useful when analyzing phenomena which are affected by proximity or adjacency. For example, if a pathogen spreads from one area to an adjacent area, you can use this to find possible locations of pathogen spread.

Line-on-polygon selection Which DNR Type 4 & 5 streams pass through young to middle aged stands? 1. Select young to middle aged stands (age < 40 in 2004). ESTAB_YEAR is the year of establishment for each stand. You will need to type in the year value 1964, rather than selecting from the list of values, since there are no stands established in 1964. Choose “Create a new selection”.

2. To make a selection of streams that pass through these selected stands, choose Selection > Select By Location. Make a selection from Streams that intersect with the features in Stands. (Make sure to check “Use selected features).

Apply and Close. 3. Now reduce the selection of streams to only DNR Type 4 & 5 (Selection > Select By Attributes). Make sure to use the Select from current selection method.

4. In order to see the selected streams more clearly, change the selection symbol to a thick blue line:

Question 5: How many DNR Type 4 & 5 streams pass through young to middle aged stands? ______________ You have just selected a set of linear features that traverse a set of polygonal features. This is useful when analyzing the relationship between linear features and their underlying polygons. For example, is the quality of road surface dependent on median household income per census tract? Or is the presence of salmon in a stream reach affected by the basal area per acre within a riparian management zone?

Polygon-on-line selection

Which stands are traversed by tertiary roads? 1. Select all tertiary roads with a query on the Roads layer. Make sure to use the Create a new selection method.

2. Clear previous selection from stands. 3. Use Select By Location to select features from Stands that intersect the features in Roads. Make sure to check “Use selected features

4. You can now see those stands that have at least part of a tertiary road inside the stand boundary.

Question 6: How many stands traversed by tertiary roads? _____________

This type of analysis is the reverse of the previous analysis. In this case, we are interested in what polygons may be affected by linear features. For example, which municipalities does a proposed regional light-rail traverse, or which forest stands may be affected by a diesel fuel spill in a large stream?