geodatabase and arccatalog...texas a&m university department of civil engineering 3 (1) using...

12
Texas A&M University Department of Civil Engineering Geodatabases and ArcCatalog Francisco Olivera, Ph.D., P.E. Srikanth Koka Lauren Walker Aishwarya Vijaykumar Keri Clary Department of Civil Engineering Texas A&M University April 21, 2014 Contents Geodatabases and ArcCatalog................................................................................................. 1 Brief Overview of Geodatabases ..................................................................................................... 1 Goals of the Exercise ....................................................................................................................... 2 Computer and Data Requirements ................................................................................................. 2 Procedure ........................................................................................................................................ 2 1. Creating a Geodatabase ...................................................................................................... 2 2. Creating a Feature Class ...................................................................................................... 3 3. Creating a Feature Dataset .................................................................................................. 5 4. Exporting a Shapefile Into a Geodatabase .......................................................................... 6 5. Exporting Coverages Into a Feature Dataset in a Geodatabase .......................................... 7 6. Exporting Tables into Geodatabases ................................................................................... 8 7. Exporting Geodatabase Feature Classes as Shapefiles ....................................................... 9 8. Creating Relationship Classes .............................................................................................. 9 Brief Overview of Geodatabases A geodatabase is a relational database that contains spatial and/or non-spatial objects. Geodatabases can be used to store and manipulate feature datasets, raster datasets, and other representations of geographic data. The elements of a geodatabase include (a) object classes, which can be feature classes (i.e., contain geographic information) or tables (i.e., do not contain

Upload: others

Post on 09-Jul-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Geodatabase and ArcCatalog...Texas A&M University Department of Civil Engineering 3 (1) Using ArcCatalog, browse to your working folder, right click on it, and then click on New/Personal

Texas A&M University

Department of Civil Engineering

Geodatabases and ArcCatalog

Francisco Olivera, Ph.D., P.E. Srikanth Koka Lauren Walker

Aishwarya Vijaykumar Keri Clary

Department of Civil Engineering Texas A&M University

April 21, 2014

Contents Geodatabases and ArcCatalog ................................................................................................. 1

Brief Overview of Geodatabases ..................................................................................................... 1

Goals of the Exercise ....................................................................................................................... 2

Computer and Data Requirements ................................................................................................. 2

Procedure ........................................................................................................................................ 2

1. Creating a Geodatabase ...................................................................................................... 2

2. Creating a Feature Class ...................................................................................................... 3

3. Creating a Feature Dataset .................................................................................................. 5

4. Exporting a Shapefile Into a Geodatabase .......................................................................... 6

5. Exporting Coverages Into a Feature Dataset in a Geodatabase .......................................... 7

6. Exporting Tables into Geodatabases ................................................................................... 8

7. Exporting Geodatabase Feature Classes as Shapefiles ....................................................... 9

8. Creating Relationship Classes .............................................................................................. 9

Brief Overview of Geodatabases A geodatabase is a relational database that contains spatial and/or non-spatial objects. Geodatabases can be used to store and manipulate feature datasets, raster datasets, and other representations of geographic data. The elements of a geodatabase include (a) oobbjjeecctt ccllaasssseess, which can be feature classes (i.e., contain geographic information) or tables (i.e., do not contain

Page 2: Geodatabase and ArcCatalog...Texas A&M University Department of Civil Engineering 3 (1) Using ArcCatalog, browse to your working folder, right click on it, and then click on New/Personal

Texas A&M University

Department of Civil Engineering 2

geographic information), (b) aannnnoottaattiioonn ccllaasssseess,, and (c) rreellaattiioonnsshhiipp ccllaasssseess. When spatial datasets, such as shapefiles or coverages, are exported into a geodatabase, they are converted into feature classes. Feature classes with identical extent and map projection can be grouped into feature datasets. However, tables cannot be included in feature datasets.

A relationship class relates the objects in a geodatabase. Relationships can have one-to-one, one-to-many, many-to-one and many-to-many cardinalities. Relationships are established through keys, an origin key and a foreign key, corresponding to the origin class and the destination class, respectively.

Goals of the Exercise To introduce you to the creation of geodatabases, feature classes and feature datasets, the migration of data of different formats into geodatabases, and the creation of relationship classes in geodatabases.

Computer and Data Requirements

This exercise has been completed using ArcGIS 10.2. Subsections 1 through 7 require just ArcView, whereas subsection 8, which deals with the creation of relationship classes, requires ArcInfo.

You will be working with the following spatial datasets: A geodatabase called montgomery.mdb, a polygon shapefile of parcels called parcels.shp, a coverage called laterals, a polygon shapefile containing county polygons of Texas called texas_counties.shp, and a table called owner.dat. The geodatabase has two feature datasets called landbase and water which contain several feature classes. Download the ArcCatalogGeodatabases.zip file containing the data. Unzip it and save the files to a working directory in your computer.

Procedure

1. Creating a Geodatabase

First, create a folder on your computer that will be your working folder.

Page 3: Geodatabase and ArcCatalog...Texas A&M University Department of Civil Engineering 3 (1) Using ArcCatalog, browse to your working folder, right click on it, and then click on New/Personal

Texas A&M University

Department of Civil Engineering 3

(1) Using ArcCatalog, browse to your working folder, right click on it, and then click on New/Personal Geodatabase. A new geodatabase will be created in your working folder. A default name will be given to the geodatabase.

(2) To change the name, right click on it, then click on Rename, and rename it Texas. The next step is to load data into the geodatabase.

2. Creating a Feature Class

(1) Using ArcCatalog, browse to the geodatabase you previously created, right click on the geodatabase, and then click on New/Feature Class. A window titled New Feature Class will open.

(2) In this window, enter TXCounties for both Name and Alias. Under the Type frame, select Polygon Features. Click Next. Select a coordinate system for the feature class.

(3) Click the Add Coordinate System button and then click Import to import the spatial reference properties from an existing shapefile. In the window that opens, browse to the shapefile named texas_counties.shp, and click on the shapefile and then on the Add button. Click Next twice.

Page 4: Geodatabase and ArcCatalog...Texas A&M University Department of Civil Engineering 3 (1) Using ArcCatalog, browse to your working folder, right click on it, and then click on New/Personal

Texas A&M University

Department of Civil Engineering 4

(4) In the Field Name column, click on Shape to define the feature type for the feature class. In the Field Properties frame, select Polygon for the Geometry Type. Click Finish.

You have now created a feature class that can store feature objects of the polygon shape type. You will load features into this empty feature class from an existing shapefile.

(5) Right-click on the newly created feature class, and then click Load/Load Data. In the Simple Data Loader window that opens, click Next.

(6) Click on the folder icon located for Input data which will open the Open Geodatabase window. Using this window, browse down to the shapefile named texas_counties.shp, select it and click Open.

(7) The shapefile's path will be added in the window. Add this shapefile to the list of source data to load by clicking on Add. Click Next several times accepting the default options.

(8) Look at the Summary and click Finish. By changing the view type to Preview and preview type to Geography, you can see the features loaded in the map display of ArcCatalog.

Page 5: Geodatabase and ArcCatalog...Texas A&M University Department of Civil Engineering 3 (1) Using ArcCatalog, browse to your working folder, right click on it, and then click on New/Personal

Texas A&M University

Department of Civil Engineering 5

3. Creating a Feature Dataset

In this part of the exercise, you are going to define a feature dataset in which you are going to store the feature class you have just created.

(9) Right click on the Texas geodatabase and then click on New/Feature Dataset. In the window that opens, enter TXFD as the name for feature dataset. Click Next.

(10) In the spatial reference properties window, click Import to import the spatial reference properties from the feature class you previously created and populated. In the browse window that opens, browse to the feature class named TXCounties, click on it and then on the Add button. Click Next twice and then Finish. A new feature dataset will now be added to the geodatabase.

(11) To load the TXCounties feature class inside the feature dataset, right click on the feature class and click on Export/to Geodatabase (single). In the window that opens, click on the folder icon for selecting the Output Location.

(12) Browse to the feature dataset TXFD, select it, and then click Add. Label the Output Feature Class Name as TexasCty. You cannot give the New Feature Class the same name as the Feature Class you are trying to import or it will result in an error. Finally, click OK to populate the feature dataset with a feature class.

Page 6: Geodatabase and ArcCatalog...Texas A&M University Department of Civil Engineering 3 (1) Using ArcCatalog, browse to your working folder, right click on it, and then click on New/Personal

Texas A&M University

Department of Civil Engineering 6

You will now work on loading datasets of different formats into an existing geodatabase called “Montgomery.”

4. Exporting a Shapefile Into a Geodatabase

You will learn how to export shapefiles into geodatabases. When exporting shapefiles (and coverages), the spatial extent is reset to that of the feature dataset.

(13) Using ArcCatalog, browse to the folder where Parcels.shp is located. Right-click on the Parcels.shp shapefile, point to Export in the dropdown list, and then click on to Geodatabase (single) in the next dropdown list.

(14) In the Feature Class to Feature Class window, click on the folder icon located next to the second text box that says Output Location. Navigate to locate the Montgomery geodatabase and double-click it to see the feature datasets inside it.

Page 7: Geodatabase and ArcCatalog...Texas A&M University Department of Civil Engineering 3 (1) Using ArcCatalog, browse to your working folder, right click on it, and then click on New/Personal

Texas A&M University

Department of Civil Engineering 7

(15) Click on the Landbase feature dataset and click ADD. The browser will disappear and the Feature Class to Feature Class window will reappear. In the Output Feature Class Name box, enter Parcelsshp.

(16) Click OK. A dialog box appears once the conversion is completed. You can use ArcCatalog to view the feature class you have just imported into the geodatabase.

5. Exporting Coverages Into a Feature Dataset in a Geodatabase

Coverages can be exported to geodatabases at once or individually. When exporting coverages to geodatabases their spatial extent is reset to that of the feature dataset.

(17) Browse to your working folder where the laterals coverage is located. Right-click on the coverage, point to Export in the dropdown list, and click on to Geodatabase (multiple) in the next dropdown list.

(18) In the Feature Class to Geodatabase (multiple) window, both the arc and tic feature classes are loaded as inputs. Click on the browse folder icon located under Output Geodatabase.

Page 8: Geodatabase and ArcCatalog...Texas A&M University Department of Civil Engineering 3 (1) Using ArcCatalog, browse to your working folder, right click on it, and then click on New/Personal

Texas A&M University

Department of Civil Engineering 8

(19) Navigate to locate the geodatabase “Montgomery” and double-click it to see the feature datasets. Click on the Landbase feature dataset and click ADD.

(20) Click OK to complete exporting the coverage to a geodatabase.

6. Exporting Tables into Geodatabases

The tables in a geodatabase can be only stand-alone classes, as they cannot exist inside a feature dataset. In this part of the exercise, you are going to export a table into geodatabase as a personal geodatabase table.

(21) Using ArcCatalog, browse to your working folder, where the Owner.dat table is located. Right-click on the table, point to Export in the dropdown list, and then click on to Geodatabase (single) in the next dropdown list.

Page 9: Geodatabase and ArcCatalog...Texas A&M University Department of Civil Engineering 3 (1) Using ArcCatalog, browse to your working folder, right click on it, and then click on New/Personal

Texas A&M University

Department of Civil Engineering 9

(22) The Table to Table window appears. Click on the folder icon located next to the second text box that says Output Location. Navigate to locate the geodatabase “Montgomery,” select it and then click Add.

(23) You can change the name of the table in the text box titled Output table. Change the name to “Owner” and click the OK button. The table is now exported to the geodatabase. Use ArcCatalog to view the table.

7. Exporting Geodatabase Feature Classes as Shapefiles

Feature classes in a geodatabase can be exported as shapefiles or as personal geodatabase feature classes of another geodatabase. In this part of the exercise, you are going to export feature classes belonging to a geodatabase as shapefiles.

(24) Using ArcCatalog, browse down to the geodatabase “Montgomery.” Click the geodatabase to see the feature datasets and click on the Landbase feature dataset.

(25) Right-click on the Road-cl feature class, point to Export in the dropdown list and click on the to Shapefile (single) in the next dropdown list. In the Feature Class to Feature Class window, click on the folder icon located next to the second text box that says Output Location.

(26) Navigate to locate your working folder where you want the shapefile to be stored. Select the folder and click Add. Enter a name in the Output Feature Class box. Click OK. The feature class is now exported as shapefile to the folder you have selected.

If the geodatabase feature class is to be exported to another geodatabase instead of locating the folder, you will have to locate the geodatabase.

8. Creating Relationship Classes

Creating and editing relationship classes requires either ArcInfo or ArcEditor; ArcView users will not be able to continue with this exercise.

Page 10: Geodatabase and ArcCatalog...Texas A&M University Department of Civil Engineering 3 (1) Using ArcCatalog, browse to your working folder, right click on it, and then click on New/Personal

Texas A&M University

Department of Civil Engineering 10

A relationship class is an association between two tables, between a table and a feature class or between two feature classes. Relationship classes in a geodatabase can be inside or outside a feature dataset. There are two types of relationship classes – simple relationship classes and composite relationship classes. Suppose object A and object B have a simple relationship between them. If object A is deleted from the database, object B will continue to exist. Simple relationships can be one-to-one or one-to-many or many-to-many. However, if there is a composite relationship between the two objects, the lifetime of one object controls the lifetime of the other. Composite relationships are always one-many but can also be one-to-one.

In this example, we are going to create a relationship class between features in the Parcels feature class with ownership information stored in the table called Owner made in Section 6 of this exercise. The relationship will be based on two fields – one from the Parcels feature class called PROPERTY_I and the other from the owner table called PROPERTY_ID. View these fields using ArcCatalog. You can see them in the map display by clicking Preview tab and selecting “table” option for preview type at the bottom of the screen.

Page 11: Geodatabase and ArcCatalog...Texas A&M University Department of Civil Engineering 3 (1) Using ArcCatalog, browse to your working folder, right click on it, and then click on New/Personal

Texas A&M University

Department of Civil Engineering 11

(27) Using ArcCatalog, browse to the location where the Montgomery geodatabase is located and click it to access the feature datasets.

(28) Right-click on the LandBase feature dataset, and point to New/Relationship Class. In the New Relationship Class window, enter the name for the relationship as “ParcelOwner.”

(29) In the Origin table/feature class box, select Parcelsshp. In the Destination table/feature class, select the Owner table and click Next.

(30) In the next window, select the Simple (peer-to-peer) relationship option and click the Next button. In the next window that asks for the direction of message propagation, leave the selected option that says none and click the Next button.

(31) In the next window that asks for cardinality, select 1-1 (one to one), and click Next. In the next window that asks if a new table has to be created to store the attributes, select the second option, that says No, I do not want to add attributes to this relationship class and click the Next button.

(32) In the next window, select primary key as PROPERTY_I and the foreign key as PROPERTY_ID and click Next. Before the relationship class is created, a summary report appears. Read the information provided and click Finish.

(33) You can now see that the relationship class ParcelOwner has been added to the LandBase feature dataset in the geodatabase.

Page 12: Geodatabase and ArcCatalog...Texas A&M University Department of Civil Engineering 3 (1) Using ArcCatalog, browse to your working folder, right click on it, and then click on New/Personal

Texas A&M University

Department of Civil Engineering 12

These materials may be used for research and educational purposes only. Please credit the authors and the Department of Civil Engineering at Texas A&M University.

All commercial rights reserved. Copyright 2014: Texas A&M University.