Database Reference
In-Depth Information
Subtypes
Your geodatabase is getting better with each enhancement. We added new attributes to the
feature classes and modified the properties of these attributes. We even assigned domains
to the existing fields in order to reduce errors while creating features and to preserve data
integrity. However, the client has one more request before we move on to the next phase. In
the current geodatabase design, the bars and lounges were merged into one feature class;
this made it difficult to differentiate bars from lounges. The solution to this might be obvi-
ous. We could add a new field named Category , then create a domain with two coded
values, Bar and Lounge , assign this domain to the CATEGORY field, and we are done.
This could definitely work; however, we will do it in a different way this time. We will
break down the bars and lounges into different subtypes for the parent feature class,
Bars_and_Lounges . Subtypes are helpful, especially while editing, since you can spe-
cify a default subtype with predefined default attributes.
Before we can create a subtype, we need a subtype field; so, we need to add this field. Un-
like domains, a subtype field must be an integer. Perform the following steps to start adding
your subtype:
1. Open ArcCatalog and browse to your geodatabase.
2. Right-click on the Bars_and_Lounges feature class and click on Properties... .
Then, select the Fields tab and add a new field of the Short Integer type and name
it CATEGORY .
3. Click on Apply and then click on OK . Close the dialog so that the geodatabase
gets updated with the new field. Don't close ArcCatalog yet; we still need to use
it.
4. Now, we are ready to create our two subtypes. Open the Bars_and_Lounges prop-
erties and select the Subtypes tab.
5. From the Subtype Field drop-down list, select CATEGORY —the field we have
just created.
6. You will notice that an entry is created with the code 0 and a new subtype. Let's re-
name the subtype to Bar and add a new entry with code 1 and name it Lounge .
7. You can click on each subtype and assign default values to them so that when a
new feature of that particular subtype is created, the default values are automatic-
ally populated in the feature, saving a lot of time. See the following screenshot for
more details:
Search WWH ::




Custom Search