Feature Class Creation: From Scratch
In this section of the lesson, we'll look at creating a new feature class and populating it using the Append tool. To illustrate the process, imagine you're again working for Jen and Barry.
A. Create a new data loader
- Have your enterprise geodatabase instance running and be connected to it via remote desktop connection.
- Open ArcGIS Pro.
We're going to create a new user (jb) to be the data owner for the Jen and Barry's data (that we borrowed from Lesson 3). - Open the Create Database User tool that we used in Lesson 6 (Analysis > Tools > Data Management > Geodatabase Administration).
- Set the Input Database Connection parameter to your dbo_egdb.sde connection.
As we did in the last lesson, leave the Create Operating System Authenticated User box unchecked.
Set the Database User and Database User Password to jb.
Set the Role to editor. (Recall that we created this role last week.)
Click Run.
- Now, use New Database Connection to create a connection to the egdb database through the new jb user. Name the connection jb_egdb.
B. Create a new empty feature class
- Access your new jb_egdb connection.
- Create a new feature dataset called pa (for Jen and Barry's Pennsylvania data).
Import the coordinate system definition from the Jen and Barry's cities shapefile. - Right-click on the pa feature dataset, and select New > Feature Class. You now need to work through a multi-panel dialog.
Assign a name of cities to the feature class.
Set its feature type to Point Features, and click Next to move on to the next panel. - In the Fields panel of the dialog, add the following fields to the feature class:
cities feature Class Fields Name data type population Long Integer total_crim Long Integer crime_inde Double university Short Integer - We'll be accepting the default values for the rest of the settings. You can have a look at the other settings by clicking Next or you can click the Finish button.
New features can be added to the feature class using Pro's editing tools, which were covered in detail in GEOG 484. Another way to populate a feature class is by using the Append tool.
C. Load data with the Append tool
As its name implies, the Append tool is used to append features held in feature classes/shapefiles to another existing feature class. Let's use it to append the features in our Jen and Barry's cities shapefile to the empty cities feature class we just added to our geodatabase.
- Open the Geoprocessing pane.
- Open the Append tool found at Data Management Tools > General > Append.
For Input Datasets, browse to your Jen and Barry's cities shapefile. (In the DataFromLesson3and4 folder.)
For Target Dataset, browse to your egdb.JB.cities feature class. (In the egdb database.)
The next part of the dialog is concerned with whether the fields in the input dataset match the fields in the target dataset. The default must match option checks to see if the fields match (in name and data type) and will not allow the append operation to occur if there is a mismatch. The Use the field map option allows for differences between the datasets.
Because our cities feature class doesn't have all of the fields found in the cities shapefile, select the Use the field map option.
Note that the four fields we defined above when creating the feature class are listed under the Output Fields heading. For each field, we have the ability to, as mentioned on the previous page, populate it in advanced ways, such as by concatenating values from multiple source fields or by summing values from multiple source fields. We're just going to do a straight 1:1 transfer of values, so you can leave the default Field Map settings in place.
Click Run to carry out the append operation.
Points should appear on the map, and of course, the attribute table of the egdb.JB.cities feature class will become populated with data.
A couple of notes on the Append tool that you should keep in mind:
- You're not limited to using this tool to populate a new empty feature class, as we did here. Features can be appended to any existing feature class.
- The real power in the Append tool which we didn't see here is that it allows for the selection of multiple input datasets. So if you had a number of similar shapefiles (e.g., census tracts for three states in three separate shapefiles), you could use the tool to combine all of the features into one feature class.
Always remember to Stop your Instance when you finish or when you take a long break.