Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying ArcGIS for Desktop Cookbook
  • Table Of Contents Toc
ArcGIS for Desktop Cookbook

ArcGIS for Desktop Cookbook

By : Daniela C Docan
1 (1)
close
close
ArcGIS for Desktop Cookbook

ArcGIS for Desktop Cookbook

1 (1)
By: Daniela C Docan

Overview of this book

This book is a good companion to get you quickly acquainted with everything you need to increase your productivity with the ArcGIS Desktop. It would be helpful to have a bit of familiarity with basic GIS concepts. If you have no previous experience with ArcGIS, this book will still be helpful for you because it will help you catch up to the acquainted users from a practical point of view.
Table of Contents (13 chapters)
close
close
12
Index

Creating subtypes

Subtypes are properties of feature classes or non-spatial tables. The subtypes gather the features from a feature class or records from a non-spatial table that share the same attribute values using an attribute field. The attribute field that groups the features must be of the data type Short or Long integer, and it will be named the subtype field. A feature class can have only one subtype field. You can assign different behaviors to individual subtypes from a feature class/table. Generally speaking, the behavior is defined by the actions or characteristics of features in a geodatabase. A subtype has a code and a description. After you have defined the subtypes for a subtype field, you can change everything related to a subtype: change the value or description of code, add more codes, and delete code. The subtypes help you in the geometry editing process and prevent errors when editing feature attribute values. The subtypes maintain the integrity in a geodatabase.

Getting ready

You will continue to work with geodatabase schema by grouping features from the feature classes that you created in the previous Creating a feature class recipe. The integer subtype fields are the following: BD for Buildings, HType for Watercourse and WatercourseL, and CAT for LandUse.

How to do it...

Follow these steps to define subtypes using the context menu in ArcCatalog:

  1. Start ArcCatalog. In Catalog Tree, go to <drive>:\PacktPublishing\Data\MyGeodatabase\ Topo5k.gdb\Buildings.
  2. Right-click on the Buildings feature class, and navigate to Properties | Fields. You will define five subtypes for the BD attribute field. Select the Subtypes tab in the Feature Class Properties window. For Subtype Field, select the drop-down arrow and choose BD. In the Subtypes section, you have a default subtype with Code with the value 0 and Description with the value New Subtype. Change Description of the first subtype by typing Unknown.
  3. Continue to create subtypes as shown in the following table:

    Code

    Description

    Code

    Description

    0

    Unknown

    3

    Industrial and municipal

    1

    Dwelling

    4

    Historical sites, monuments, statues

    2

    Administrative buildings and socialcultural

    5

    Dwelling annex

  4. For Default Subtype, choose the Dwelling subtype. Click on Apply and on OK. Open the Feature Class Properties dialog for the Buildings feature class to check the subtypes you just added. Right-click on the Buildings feature class, and choose Properties | Subtypes. You should see something similar to the following screenshot:
    How to do it...
  5. In Catalog Tree, select the Hydrography feature dataset. Right-click on the Watercourse feature class, and choose Properties | Fields. Select the Subtypes tab in the Feature Class Properties window. You will define five subtypes for the HType attribute field. For Subtype Field select the drop-down arrow, choose HType, and add the following subtypes:

    Code

    Description

    Code

    Description

    0

    Unknown

    3

    Creek

    1

    River

    4

    Canalized stream

    2

    Stream

      
  6. For Default Subtype choose the River subtype. Click on Apply and on OK. Open the Feature Class Properties dialog for the Watercourse feature class to check the subtypes you just added.
  7. Repeat step 4 to create subtypes for the WatercourseL feature class using the same codes and descriptions.
  8. Repeat step 4 to create subtypes for the LandUse feature class using the CAT (Description: Category) attribute field and the following subtypes:

    Code

    Description

    Code

    Description

    0

    Unknown

    21

    Forest

    11

    Arable

    31

    Hydrography

    12

    Pasture

    41

    Transportation

    13

    Meadow

    42

    Other terrains

    14

    Vineyard

    51

    Unproductive

    15

    Fruit orchard

      
  9. For Default Subtype, choose the Arable subtype. Click on Apply and on OK. Open the Feature Class Properties dialog for the LandUse feature class to check the subtypes you just added.
  10. Inspect the results in Subtypes in the Feature Class Properties dialog.

How it works...

The subtypes will help you to edit feature geometry and attribute fields faster. The default subtype is used as the default edit target for the Watercourse feature class when you start an edit session in ArcMap. In the Feature Class Properties dialog, you can add more subtypes for the BD attribute field, and you can delete a subtype or change Code and Description.

Note

If you delete all code, your feature class will not have subtypes anymore, and all rules and behaviors related to subtypes will be corrupt or lost for the feature class.

Sometimes, when you are establishing codes and descriptions for a subtype field, it is impossible to anticipate correctly all possible values. It is good practice to add code that covers all unforeseen values: Code: 42 and Description: Other terrains. Another good practice is to add code that refers to the situation in which you know the values for all other attribute fields, but you are not sure about the subtype, and it will be defined later: Code: 0 and Description: Unknown.

See also

  • For information about how you can enforce attribute values for a feature class table, please refer to the following Creating domains recipe
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
ArcGIS for Desktop Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon