University of Washington

Geog582 Autumn 2016Assignment 1Forming the Geodatabase SchemaAssignment Data Download data from other sources as specified in the instructions belowLabAssignment 1 data from the Geography P:/Deliverables A completed answer sheet, answering all the questions provided below. Learning ObjectivesBecome acquainted with geodatabase schemas and elementsCreate a file geodatabase and associated feature datasets and feature classesDefine geodatabase behavior based on domains and subtypesWork with integrity rules for selected domainsWork with SQLPractice ArcGIS DiagrammerIntroductionGIS is becoming an increasingly accessible and important tool for sustainability management. The usefulness of GIS to organizations that deal with natural resource management is determined in large part by the availability, currency and quality of its spatial data resources. Learning how to store and manage spatial data is important for successful use of spatial data for sustainability management. Developing a Geodatabase will enable you to access, manage, manipulate, and analyze spatial data more efficiently and effectively. In this assignment you will build a File Geodatabase for the WRIA09 (Water Resource Inventory Area 09) in King County, Washington State. In addition to revisiting the knowledge and techniques of creating of a basic file geodatabase obtained in Geog 514, you will also learn how to create and work with domains and subtypes. PreparationsFirst create a working folder to hold your data for the assignments in this course (e.g. U:\geog582\data). Next create subfolders within your working folder for each of the assignments (e.g. U:\geog582\data\Assignment1). Copy the LabAssignment1 zipped data folder over to your own U:\ data folder. The LabAssignment1 data.zip contains two files: a raster dataset named orthhabit and an Excel spreadsheet named RatingCodes.xls. *** Always use ArcCatalog to move ArcGIS files to ensure all components of the file are moved. Part 1: Creating a File Geodatabase Geodatabase Elements There are three fundamental data set types that can be stored in a geodatabase. You can store feature classes, tables, and raster datasets in geodatabase. The geodatabase stores the spatial and attribute data as tables within a single relational database environment. The file geodatabase can contain feature classes, feature datasets, rasters, and tables. You can also store behaviors such as topologies, geometric network and relationship classes. You will explore the geodatabase elements used as a basis for creating such relationships, and then further explore the relationships in the following lab assignments. You can learn more about geodatabase at HYPERLINK ". Question 1: What is a feature dataset and what purpose does it serve? What is the difference between a feature class and a feature dataset? (Use the ArcGIS Desktop Help if you are not familiar with the concepts)Geodatabase BehaviorData stored in a geodatabase have functionalities including subtypes, domains and default attribute values. Subtype is a function to categorize data into groups which can be very useful when editing data within one feature class. For example, for a road feature class, we can create a subtype of the roads based on the character of each road and we can then assign a specific speed limit to each group. Attribute domains are rules that describe valid values and constrain the values allowed in an attribute. A domain is a declaration of acceptable attribute data values. Using domains helps ensure data integrity by limiting the choice of values for a particular field. There are two types of attribute domains: coded value domains and range domains. Coded value domains define a set of acceptable values for an attribute. Range domains define a range of acceptable values for an attribute. For more detailed information on domains, please see HYPERLINK ". A default attribute value is useful if you have data that contain the same attribute value for each feature.Question 2: List three advantages of storing data in a geodatabase.Acquiring and Downloading DataMost data needed to build the geodatabase in this assignment will be obtained from the King County GIS Data Portal and the Washington State Department of Ecology (DOE).Go to the King County GIS Data HYPERLINK " and accept the user agreement. On the download page, search and download the following data to your data folder: King County Street Address (st_address)King County Parcel Shapefile (parcel)King County Streams (wtrcrs)Watershed boundaries derived from terrain data (topo_wria_kc)Go to the Department of Ecology GIS Data HYPERLINK " and download the data for Water Resource Inventory Areas (WRIA).Unzip the files after downloading. Note: You downloaded WRIA data from both King County and the Department of Ecology. We will examine these two data sets later.Creating and Populating a GeodatabaseNow you will use ArcCatalog to create a new file geodatabase in your data folder. This geodatabase will hold your geospatial data and supplementary tables for this assignment.Open ArcCatalog and connect to your data folder if it is not connected.In the catalog tree, right click your Assignment 1 data folder NEW File Geodatabase, and name it WRIA9.gdb. Feature datasets are containers within a geodatabase specially designed to hold related GIS layer data (feature classes). As such, they must be assigned a spatial coordinate system, and all feature classes within them must use the same coordinate system. In this assignment you will create five feature datasets within your geodatabase: DrainageArea, HydroNetwork, RoadNetwork, Landuse, and Habitat. To create the first feature dataset, right click WRIA9.gdb NEW Feature Dataset. Name it DrainageArea. For the time being we will ignore the Spatial Reference and set it to “Unknown” coordinate system. However we will come back to this very soon since having a proper coordinate system is crucial to our geodatabase. Click Next to continue. Accept all default settings in X, Y, Z and M tolerance. Click Finish. Now you have DrainageArea feature dataset (with no data in it yet) in WRIA9 geodatabase. Repeat the same process to add the other four feature datasets (HydroNetwork, RoadNetwork, Landuse, and Habitat) to your geodatabase.Projecting Feature DatasetBefore we add feature classes to the geodatabase, the feature datasets must be defined with an appropriate coordinate system. All the feature classes added to the feature datasets must have the same spatial coordinate system. This ensures consistency in spatial reference and allows all the layers to overlay properly. If you do not set the coordinate systems properly, your maps will never overlay appropriately. In ArcCatalog, right click the HydroNetwork feature dataset, then click Properties to open the Feature Dataset Properties dialog window. Under XY Coordinate System, select Import from the Add Coordinate System dropdown menu, select wtrcrs.shp (King County streams shapefile) from your data folder, and click OK. This sets the spatial reference of HydroNetwork to be identical to that of the wtrcrs.shp. Set the Spatial reference for each of the other four feature datasets to be the same as the HydroNetwork feature dataset. Once completed, all of your feature datasets will have the same spatial reference system, ensuring they will all function properly together.Question 3: What is the XY coordinate system of the feature datasets? Importing Data to a GeodatabaseIn the following steps, you will import feature classes, tables, and raster data into your geodatabase.In ArcCatalog, right click the DrainageArea feature dataset that you just created Import Feature class (single).In the dialog window, select and enter the following parameters:Input Features: topo_wria_kc.shp (King County WRIA) from your folder Output Location: DrainageArea feature datasetOutput Feature Class: WRIA_KingKeep other default parameters in the dialog windowClick OK to close the window.Repeat this process for the other four shapefiles (WRIA_poly.shp, parcel.shp, st_address,shp, and wtrcrs.shp) that you downloaded. Save the output feature classes to their corresponding feature datasets as listed below: WRIA_poly.shp import to DrainageArea feature dataset name it WRIA_DOE (to differentiate it from WRIA_King)parcel.shp import to Landuse feature dataset name it Parcel_Kingst_address.shp import to RoadNetwork feature dataset name it Roads_Kingwtrcrs.shp import to HydroNetwork feature dataset name it Streams_KingTo import raster data, right click WRIA9.gdb Import Raster Datasets, set the Input Rasters to orthhabit (downloaded from P:/), and set the Output Geodatabase to WRIA9.gdb. Click OK To import the table file RatingCodes.xls, right click WRIA9.gdb Import Table (Single). Use RatingCodes.xls (Sheet1$) as the Input Rows, name the Output Table RatingCodes, and set the Output Location to WAIR9.gdb. Click OK. Note: You cannot import tables and raster datasets directly to a feature dataset. You have to import them separately to your geodatabase.You now have a file geodatabase with five feature datasets and five feature classes, one table and one raster dataset. This geodatabase represents the foundation of a data analysis project. Extracting Data to the WRIA 9 AreaThe first three assignments in this course will focus on the WRIA 9 area. Therefore, we need to select areas in WRIA9 only and clip other feature classes by the WRIA9 boundary.Open a new ArcMap document and save it. Add WRIA_King and WRIA_DOE to your map. Open ArcToolbox Analysis Tools Extract Select, then choose and enter the following parameters:Input Features: WRIA_KingOutput Feature Class: …\WRIA9.gdb\DrainageArea\WRIA9_KingSQL Expression: [WRIA_NO] = 9826770-556894Repeat the same process to select WRIA9 area from the WRIA_DOE feature class. Select and enter the following parameters:Input Features: WRIA_DOEOutput Feature Class: …\WRIA9.gdb\DrainageArea\WRIA9_DOESQL Expression: [WRIA_NR] = 9Add WRIA9_King and WRIA9_DOE feature classes to your map (if they are not automatically added). Explore both feature classes and examine the differences between them. Question 4: What are the differences between WRIA9 data derived from King County and the Department of Ecology (DOE)? What would be possible reasons for the differences? (Hint: Think about the ways in which these data were created and the purpose of the data within each organization.) In this assignment, we will use WRIA9 data from King County (WRIA9_King). Remove WRIA9_DOE from your map. Now we will clip road feature class for the WRIA9 area, which will be used later to create subtype. Open ArcToolbox Analysis Tools Extract Clip, and then choose and enter the following parameters:Input Feature: Roads feature class (Roads_King) derived from st_address.shp. Clip Features: WRIA9_KingOutput Feature Class: …\WRIA9.gdb\RoadNetwork\WRIA9_RoadsClose ArcMap after examining WRIA9_Roads in your map.Creating a New Feature ClassNow, you will learn how to create a new feature class. We would like to create a new feature class for the wetland habitat areas in WRIA9. We will also create domains for this new feature class.In ArcCatalog right click the Habitat feature dataset that you created earlier, and select New Feature Class.Name this feature class wetland_habitat, select Polygon Features for the Type of Features. Keep the default settings for the coordinate M and Z values. Click Next.Accept default Configuration Keyword, and click Next. Add two fields to the wetland_habitat feature class with the following settings: Field Name: Basin; Data Type: Text; Length: 30Field Name: Rating; Data Type: Double Now, we have a new feature class in the Habitat feature dataset. Next we will set a domain for this feature class.Geodatabase DomainOne of the useful tools for attribute value validation is using a geodatabase domain. It can be as simple as setting values for an attribute field like Yes/No or a range from 0 to 100; it can also be as complex as having a list of vegetation types. In the following steps, you will learn how to create a geodatabase domain from a table stored in the geodatabase.Open ArcMap, and add the new feature class wetland_habitat to your map. You can see that no spatial data is displayed in the map, and the attribute table is empty as well. This is because this feature class does not contain any features (geometry) yet. In ArcToolbox, click Data Management Tools Domains Table To Domain, and select and enter the following parameters in the dialog window:Input: RatingCodesCode Field: Rating_codesDescription Field: DescriptionsInput Workspace:WRIA9.gdbDomain Name: Rating_codesDomain Description: DescriptionsUpdate Option: Append Close ArcMap. In ArcCatalog right click the WRIA9.gdb click Properties to open the Database Properties dialog window click the Domains tab to see if the new domain you just created is listed there. To apply the geodatabase domain to a field, right click the wetland_habitat to open the Feature Class Properties dialog window click the Fields tab select the Rating field set the Domain in the Field Properties to Rating_codes.You’ve just finished adding a Domain to the wetland_habitat feature class. Next, we will assign a default value to this feature class.Setting Default Values for Feature ClassNow, we will learn how to set a default value in the wetland_habitat feature class. This will automatically populate attribute values when digitizing new features. Note: if there are already values in the field that you apply a default value to, these values will not be changed.In ArcCatalog right click the wetland_habitat feature class click Properties to open the Feature Class Properties dialog window click Fields tab select the Basin field enter Green River as the Default Value under Field Properties.You’ve just set geodatabase domain and default values. In the following steps, you will digitize wetland-habitat areas in WRIA9.Question 5: In your own words, describe the concept of “domain” within the geodatabase schema. What are the benefits of using geodatabase domains? DigitizingThe data have been setup to populate a wetland_habitat feature class and apply geodatabase behavior. Now you will digitize wetland-habitat areas using the orthophoto for a small area in WRIA9. Open ArcMap and add orthhabit raster dataset from WRIA9.gdb to your map.Add wetland_habitat feature class to your map. Open Editor Toolbar (Customize Toolbars Editor), click the Editor dropdown menu Start Editing.A Create Features window will pop up (if it doesn’t, you can bring up the dialog window by clicking the Editor dropdown menu Editing Windows Create Features). You can see that wetland_habitat is listed in the box, meaning this is the target layer for digitizing based on the orthophoto. Make sure that Polygon is highlighted under Construction Tools. If you click the Attribute icon , you can see that it is empty now as no attribute information is created yet.Click the Straight Segment tool to start digitizing by clicking around the two large green areas. Double click when you finish digitizing each polygon. You will get two polygons similar to those in the image below.1012189-316228Now if you examine the attributes of the new features by clicking the Attribute icon, you can see that the default value of Basin field (Green River) was automatically entered into the field. Recall that you set the domain for the Rating field to Rating_codes in a previous step. Now you can click the dropdown menu to select the Rating value for each of the two wetland-habitat polygons. Select Unique/outstanding wetland for the large polygon and select Low concern for the small polygon. Stop editing and save the edits. Examine the map and the attribute table of wetland_habitat. Close ArcMap. You have just created a new feature class with two rows/records in the attribute table using the Default Value and the Domain properties that were predefined in your geodatabase. Question 6: List and describe 2 other domains and default values that you could create for any of the feature classes in your geodatabase. Creating SubtypesSubtypes are used to group data in a feature class, and you can then apply behaviors to these groups. To create a subtype, an integer format is required to store necessary information. In the following steps, you will learn how to create a subtype and then populate it based on the group created. Let’s assume that the Department of Ecology would like to study how pollutions from different types of roads contribute to surface water runoff. Three groups of roads are created for this purpose: 1) Highways, 2) Arterial/Collector Roads, and 3) Residential Side Streets. The King County road/street data (st_address.shp), however, classifies roads/streets into five categories: Freeways (F), Primary Streets (P), Collectors (C), Minor Streets (M), and Local Streets (L). You can read the metadata for this shapefile from this HYPERLINK ". These five road classes need to be grouped into the three categories used by the DOE’s study as follows: Freeways (F) HighwaysCollectors (C), Minor Streets (M), and Primary Streets (P) Arterial/Collector RoadsLocal Streets (L) Residential Side Streets. We will create a subtype in this geodatabase to categorize WRIA9_Roads feature class (an import of st_address.shp). In AcrCatalog right click the WRIA9_Roads feature class in RoadNetwork feature dataset click Properties to open the Feature Class Properties dialog window click the Fields tab and add a Short Integer field named Categories. 265374724130Open ArcMap and add WRIA9_Roads feature class. In the following steps, we will compute the values of the Categories field based on the KC_FCC Field (King County’s road classification code). Open the attribute table and click Select by Attributes from the Table Options menu. Create a SQL statement "KC_FCC" = 'F' in the expression box to select features that are classified as Freeways.In the attribute table, choose the option to Show Only the Selected Features. Right click the heading of the Categories field, select Field Calculator, and enter 1 in the expression box. Clear selection after the calculation is completed. Repeat the Select by Attribute process, this time use the following SQL statement: "KC_FCC" = 'M' OR "KC_FCC" = 'C' OR "KC_FCC" = 'P'. Choose the option to show only selected features. Right click the heading of the Categories field, select Field Calculator, and enter 2 in the expression box. Clear selection. Repeat the same processes for features/records whose KC_FCC values are equal to L ("KC_FCC" = 'L'). Assign a value of 3 to this category in the Field Calculator expression box. Close ArcMap. In ArcCatalog right click the WRIA9_Roads feature class click Properties to open its Feature Class Properties dialog window click the Subtypes tab select Categories from the Subtype Field dropdown list. Under Subtypes enter the Code and Description for each category as shown below.CodeDescription1Highways2Arterial/collector Roads3Residential Side Streets2683827361950 Open ArcMap and add WRIA9_Roads feature class. Examine the map to see if there are any changes. Open the attribute table and examine the Categories field to see if there are any changes. Question 7: What has happened to the Categories field after you set up the subtypes in the geodatabase? In the context of the geodatabase (WRIA9.gdb) you created, describe two more examples of how/where a subtype could be used. Part III: Geodatabase SchemaA geodatabase schema defines the physical structure of the geodatabase along with the rules, relationships, and properties of each dataset in the geodatabase. Defining and implementing a schema for a geodatabase is an important task that often requires prototyping and testing of a proposed design. Testing will help you to develop a robust, working system implementation. ArcGIS Diagrammer (also known as ArcDiagrammer) is a tool for creating/viewing schema information. In this assignment we will use ArcGIS Diagrammer view a geodatabase schema. ?A geodatabase schema defines the logical and physical structures of a ?geodatabase ?including the rules, relationships, and properties of each ?dataset as well as the data type formatting for these data. ?Defining and implementing a schema for a geodatabase is an important task that often requires iterative work and testing of a proposed design. Testing will help you to develop a robust, working system implementation.Follow the instructions to install the application.In ArcCatalog, right click WRIA9.gdb Export XML Workspace Document export Schema Only name the output XML file WRIA9.xml.Open ArcGIS Diagrammer, then open WRIA9.xml file that you just created. The schema diagram will be shown on the main window. Examine and compare the structure and the contents of the schema with those in the ArcCatalog. Question 8: Provide a screenshot of the schema diagram of WRIA9 geodatabase.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download