in the Geodatabase Schema Due Date: Oct 12, 2013 Sections AA and AB: Assignment Data Assignment 2 data folder on P:\geog482\labAssignment2\data\ Download data from other sources as specifed in the instructions below WRIA9.gdb from Assignment 1 and associated feature datasets and feature classes Deliverables A completed answer sheet, answering all the questions provided below. Learning Objectives Understand and practice creating relationship classes for feature classes in a geodatabase Practice editing data based on relationship classes Understand and practice creating typology in a geodatabase Practice editing topology Introduction A geodatabase is a physical storage location and data format for spatial and non-spatial data within ArcGIS. It can contain feature datasets, feature classes, tables and rasters. One of the advantages of using a geodatabase is to store and apply spatial and attribute behavior to facilitate data validation. You will learn to add relationship classes and create topology with a geodatabase in this assignment. Preparations If your computer doesnt have a P: drive mapped, youll have to map it again. 1 Go to Start Computer Click Map Network Drive Set Drive: equal to P: and folder equal to \\fs2.geog.uw.edu\Courses\Geog482 Copy assignment 2 data from the course data folder to your data folder and unzip them. The labAssignment2 folder contains the following folders and fles: labAssignment2\data\parcel_extr.dbf labAssignment2\data\KING_property_present_landuse.dbf You also need to copy WRIA 9 catchment data from: P:\Geog482\Lab Data\catchments\atchments_wria9.shp Download the following data from King County GIS Data Portal (http://www5.kingcounty.gov/gisdataportal/Default.aspx) to your Assignment 2 data folder and unzip them: Basin boundaries derived from terrain data (topo_basin_kc) Watershed boundaries derived from terrain data (topo_watershed_kc) Importing Data to the Geodatabase We will use WRIA9.gdb from your Assignment 1 data folder in Assignment 2. Import the two attribute tables (PARCEL_EXTR.dbf and King_propertty_present_use.dbf) to WRIA9.gdb using the same method described in Assignment 1. Name the tables as follows: PARCEL_EXTR.dbf ParcelAttribute KING_property_present_landuse PresentLanduse Extracting Data to WRIA 9 As mentioned in Assignment 1, our analysis will mainly focus on the WRIA9 area. Therefore, we need to clip other feature classes and shapefles to the WRIA9 area. These feature classes are parcel (parcel.shp), King County basin (topo_basin_kc.shp), and King County watershed (topo_watershed_kc.shp). Note that catchment_wria9.shp is already clipped to WRIA 9. 1. Select parcels in WRIA 9 2 a.Open ArcMap and add the parcel feature class (Parcel_King) and WRIA9_King (WRIA 9 boundary from King County) from WRIA9.gdb to your map b.Click Selection on the menu bar Select by Location select features from the Parcel_King feature class that intersects with WRIA9_King feature class (This process will take some time to run since the data size is fairly large). c.In your maps TOC, right click the Parcel_King layer Data Export Data Export Selected Features save the Output Feature Class to the Landuse feature dataset in WRIA9.gdb and name it WRIA9_Parcel (set Save as type to File and Personal Geodatabase feature classes so that your geodatabase will be shown in the fle directories). The coordinate system will be automatically set as the feature dataset you export the data into. If you get an error message about fle locks, make sure you dont have ArcCatalog open. 2. Use SQL expression to select basins in WRIA 9. a.Open ArcToolbox Analysis Tools extract Select, then choose and enter the following parameters in the dialog window: InputFeature: topo_basin_kc.shp Output Feature Class: \WRIA9.gdb\DrainageArea\WRIA9_Basin SQL Expression: [WRIA_NO] = 9 b.Repeat the steps above for topo_watershed_kc.shp. Name the output feature class WRIA9_Watershed, and save it in \WRIA9.gdb\DrainageArea as well. 3. In ArcCatalog import catchments_wria9.shp to \WRIA9.gdb\DrainageArea as a single Feature Class and name the output feature class WRIA9_Catchment.
Now you are ready to build geodatabse relationship classes and topology. Part I: Relationship Classes There are several ways to link datasets such as joins, relates, and relationship classes. In ArcMap you can create join and relate to link spatial and non-spatial data together. The joins and relates are not stored in the geodatabase, but stored in the ArcMap document. 3 To create a link between feature classes, or between feature classes and attribute data, we need to create a relationship class in the geodatabase which defnes a persistent link between datasets, i.e., a link that will persist even if we may change data from time to time. For more information on Relationship Classes, see http://resources.arcgis.com/en/help/main/10.2/0017/0017000000mm000000.htm (this may help you answer Question 1). In this assignment, you will create relationship classes in your geodatabase between parcels and the present use of each parcel. First, you will need to create a relationship class between ParcelAttribute and PresentLanduse tables to permanently link the description of present land use code to Parcel feature class, then you will continue to create relationship class between attributes of WRIA9_Parcel feature class and ParcelAttribute table. Relationship Class between ParcelAttribute and PresentLanduse Tables 4. Examine both tables and identify which feld in each table should be used as the key to build relationships. 5. In ArcCatalog, right click WRIA9.gdb New Relationship Class. Then use the wizard to create a relationship class following the steps below: Name of the relationship class: AttributeAndPresentLanduse Original table/feature class: PresentLanduse (will not be highlighted when the next step is done) Destination table/feature class: ParcelAttribute, click Next Select the type of relationship: Simple (peer to peer) relationship, click Next Specify a label for the relationship from the original to destination: ParcelAttribute Specifc a label for the relationship from the destination to original: PresentLanduse select None for the direction of messages that will be propagated, then click Next Select the cardinality for this relationship class: 1 1 (one to one), click Next select No, I do not want to add attributes to this relationship class, click Next select the primary key feld: Presentuse select the foreign key feld: PRESENTUSE 4 click Next, and examine a summary of the relationship class, then click Finish 6. Open the Properties window of the AttributeAndPresentLanduse relationship class by right clicking on it and review the information in the General Tab. The relationship class summary should look like the image below.
Question 1: Describe the diference between a Simple and a Composite relationship class. Provide examples to illustrate your points. Relationship Class between Parcel (WRIA9) feature class and ParcelAttribute table 7. Examine both tables and identify which feld in each table should be used as keys to establish a relationship. 8. In ArcCatalog, right click the Landuse feature dataset New Relationship Class, and use the wizard to create a relationship class: Name of the relationship class: Parcelwria9HasAttribute Original table/feature class: ParcelAttribute Destination table/feature class: WRIA9_Parcel. Click Next. Select the type of relationship: Simple (peer to peer) relationship. Click Next. Specify a label for the relationship from the original to destination: WRIA9_Parcel 5 Specifc a label for the relationship from the destination to original: ParcelAttribute select None for the direction of messages that will be propagated, then click Next. Select the cardinality for this relationship class: 1 1 (one to one). Click Next. Select No, I do not want to add attributes to this relationship class. Click Next. Select the primary key feld: PIN Select the foreign key feld: PIN Click Next, and check a summary of the relationship class, then click Finish Youve just fnished creating relationship classes for the WRIA9_Parcel feature class and the PresentLanduse table (based on two relationship classes). Next, you will use the Identify tool to investigate the information associated with the parcel feature class based on the relationships you just created. 9. Open ArcMap and add WRIA9_Parcel from \WRIA9.gdb\Landuse to your map; also add ParcelAttribute and PresentLanduse tables from WRIA9.gdb. a.Use Select by Attribute Tool to select a parcel in WRIA9_Parcel that has the OBJEECTID of 2 (OBJECTID = 2). Then use Zoom to Selected Features to fnd this parcel (right click WRIA9_Parcel Selection Zoom To selected Features) b.Use the Identify tool to click on the selected parcel, check the plus signs at each level to expand the parcels information, and you will see the present use of this parcel. 6
Question 2: What is the present use of the following parcels: OBJECTID = 96726 and OBJECTID = 169589? Editing Present Landuse using Relationship Class You will edit the PresentLanduse and WRIA9_Parcel using the relationship class created. 10. Open Editor toolbar (View Toolbars Editor). Then click the Editor dropdown menu and click Start Editing. 11. On the editor tool bar, click the Attributes icon to open the Attribute editing window (or click the Editor dropdown menu Editing Windows Attributes). 12. Use the Select by Attribute tool to select WRIA9_Parcel where OBJECTID = 298. The selected parcel will be displayed in the Attribute editing window. Click the plus signs to expand and view the present use of this parcel. 7
13. Click ParcelAttribute change the value in PRESENTUSE feld from 0 to 300
14. Click the Editor dropdown menu and click Save Edit. Then go back to the Attributes editor window and expand to see the present land use again. Question 3: What has been happened after you changed the PRESENTUSE value in ParcelAttribute and saved your edit results? What is the new present land use of the selected parcel? Question 4: Provide two other examples of geodatabase relationship classes that you think should/could be created. Explain the rationale of your suggestions. Part II: Creating Topology Geodatabase topology is a way to maintain the spatial integrity of your data. A topology is always stored in a feature dataset as it requires a common spatial reference in which to model the spatial relationships both within and between feature classes. It is 8 a set of rules about how features within collections of feature classes share geometry through a connectedness relationship as well as how features participate in adjacency and containment relationships. This set of rules is used to improve the user experience for editing features, validating features, and tracing through the geometric relationship between features. Rules are used to model the spatial relationships in the participating feature class or classes. For example, you may defne a rule to ensure contour lines not to intersect themselves or to ensure a parcel must contain at least one address point. In this assignment, you will create three geodatabase topologies for WRIA9_Parcel feature class, WRIA9_Roads feature class, and features in DrainageArea feature dataset. First, you will defne a rule for WRIA9_Parcel feature class so that they dont overlap each other and correct all errors. Second, you will defne rules for WRIA9_Roads feature class to make sure that they dont self-overlap and self-intersect and correct all errors. Finally, you will defne rules for WRIA9_Basin, WRIA9_Catchment, and WRIA9_Watershed in the DrainageArea feature dataset so that: Basin must not overlap Basin must not have gaps Catchment must not overlap Catchment must not have gaps Catchment must be covered by Basin Watershed must not overlap Watershed must not have gaps Watershed must be covered by Basin You will then edit errors identifed based on the specifed rules. Creating Geodatabase Topology for WRIA9 Parcel Feature Class Rules: features (parcels) in WRIA9_Parcel must not overlap 15. In ArcCatalog, right click Landuse feature dataset in WRIA9.gdb New Topology, and use the wizard to create a topology as specifed below: Name for your topology: WRIA9Parcel_Topology Use the default value for cluster tolerance, click Next Select WRIA9_Parcel feature class to participate in the topology, click Next 9 Use the default values for Rank and the number of ranks. Click Next Click Add Rule to specify the rules for the topology, select rule Must Not Overlap and click OK and then Next Review the summary and click Finish Now, ArcCatalog is creating new topology for you. Click Yes to validate the typology. The process will take some time to run. Review the error summary by right clicking the WRIA9Parcel_Topology Properties. In the Properties window click Generate Summary under the Errors tab. Question 5: Provide a screenshot of the Error Summary for WRIA9Parcel_Topology. Fixing Topology Errors for WRIA9ParcelParcel_Topology Fixing Topology Errors for WRIA9ParcelParcel_Topology ***Note: There are many errors in the typology created, in the following steps youll just need to fx two errors to understand typology errors and practice how to fx them.*** When you see topology errors on the spatial data, there are three ways to handle them: edit to fx the error, mark the error as an exception, or simply ignore the error. 16. Create a new map document in ArcMap and add WRIA9Parcel_Topology to see the errors, and click Yes when there is a pop-up window asking whether you want to add all feature classes that participate in WRIA9Parcel_Topology to the map. 17. Activate Editor and click Start Editing. Then click the Editor dropdown menu again and select More Editing Tool Topology. The Topology toolbar will show up. 18. Click the Error Inspector tool on the Topology toolbar, 19. Make sure that you uncheck Visible Extent only before clicking the Search Now button to search Errors from all rules. 20. There are legitimate overlaps between the parcel sections. It is likely that some of these errors are in fact, not errors, but rather the nature of the data. In the Error Inspector window, right click the frst error and select Zoom To to take a closer look at the parcel (as shown below). We will treat this error as an exception, right click the frst error again and select Mark as Exception. Then the selected error parcel will not be highlighted in red color anymore. 10 21. Continue checking the remaining errors, you will come across true errors that need to be fxed. The images below provide an example. To fx such errors, right click the error and select Merge, then select the parcel to be merged, and click OK. After that the overlap polygon will be gone. Choose your own error parcel and fx it using the Merge method. 22. Once you fnished editing some errors, click the Validate Topology tool to validate topology again to see if the number of errors has been reduced. Question 6: Provide another screenshot of the Error Summary of WRIA9Parcel_Topology once youve fxed some of the errors or marked them as exceptions. How is it diferent from the one generated in Question 5? Creating Topology for WRIA9_Roads Feature Class Rules: WRIA9_Roads feature class must not self-overlay WRIA9_Roads feature class must not self-intersect 11 23. In ArcCatalog, right click RoadNetwork feature dataset in WRIA9.gdb New Topology. Use the wizard to create a topology as specifed below: Name for the topology: WRIA9Roads_Topology Use the default value for cluster tolerance. Click Next. Select WRIA9_Roads feature class to participate in the topology. Click Next. Use the default values for Rank and the number of ranks. Click Next. Click on Add Rule to specify the rules for the topology. Select Must Not Self-Overlap, and click OK. Then click Add Rule again and select Must Not Self-Intersect, and click OK. Click Next. Review the summary and click Finish. Now, ArcCatalog is creating new topology for you. Click Yes to validate the typology. Review the error summary by right clicking the WRIA9Roads_Topology Properties click Errors tab click Generate Summary. Question 7: Provide a screenshot of the Error Summary for WRIA9Roads_Topology. Fixing Topology Errors for WRIA9Roads Topology: 24. Create a New map Document in ArcMap and add WRIA9Roads_Topology to see the errors. Click Yes when there is a pop-up window asking whether you want to add all feature classes that participate in WRIA9Roads_Topology to the map. 25. Activate Editor Start Editing. 26. Activate/display Topology toolbar. 27. Click on the Error Inspector tool from the Topology toolbar. 28. Uncheck Visible extent only, and then click the Search Now button to search Errors from all rules. 29. Examine all the errors and fx them based on the suggested methods (e.g., Mark as Exceptions, Subtract, Simplify, etc). You will see the suggested method for each error by right clicking them. 12 Question 8: For WRIA9Roads_Topology, What was the method you used to fx errors from the rule of Must Not Self-Intersect? What was the method you used to fx errors from the rule of Must Not Self-Overlap? 30. Click the Validate Topology tool to validate the topology again.
Question 9: Provide another screenshot of the Error Summary of WRIA9Roads_Topology once the errors have been fxed or marked as an exception. Creating Topology for WRIA9_Basinbasin, WRIA9_Catchment, and WRIA9_Watershed Rules: Basin must not overlap Basin must not have gaps Catchment must not overlap Catchment must not have gaps Catchment must be covered by Basin Watershed must not overlap Watershed must not have gaps Watershed must be covered by Basin 31. In ArcCatalog, right click DrainageArea feature dataset in WRIA9.gdb, and add New Topology. Use the wizard to create a topology as shown below: Name for your topology: DrainageArea_Topology Use the default value for cluster tolerance. Click Next Select WRIA9_Basinbasin, WRIA9_Catchment, and WRIA9_Watershed to participate in the topology. Click Next Use the default values for Rank and the number or ranks. Click Next Click Add Rule to specify the rules for the topology, add the following rules one by one: Basin must not overlap Basin must not have gaps Catchment must not overlap Catchment must not have gaps Catchment must be covered by Basin 13 Watershed must not overlap Watershed must not have gaps Watershed must be covered by Basin Review the summary and click Finish. Now, ArcCatalog is creating new topology for you. Click Yes to validate the typology. Review the error summary by right clicking DrainageArea_Topology Properties click Errors tab click Generate Summary. Question 10: Provide a screenshot of the Error Summary for DrainageArea_Topology. 32. If there are errors in your DrainageArea_Topology, fx them by following the same steps as you did for WRIA9Parcel_Toplogy. Use Mark as Exception for all errors. Question 11: Explain the benefts of using geodatabase topology. Provide examples of other topologies that you would/create for the feature datasets in your geodatabase. Part III: Geodatabase Schema Use ArcGIS Diagrammer to export and view your geodatabase schema (as you did in Assignment 1). Examine the schema diferences between geodatabases in Assignment 1 and 2. Question 12: Provide a screenshot of the schema diagram of WRIA9 geodatabase and explain the diferences between geodatabases from Assignment 2 and Assignment 1. 14