Manage Subtypes

Provides a Subtype tab and a Subtype Editor window for creating, modifying, and deleting subtypes.

Before using subtypes, you need to be aware of the following limitations:

  • Subtypes can only be created in datasets containing an integer field.
  • This feature is only applicable to PostGIS and UDBX data sources; other data sources are not supported in the current version.
  • Subtype properties cannot be exported and will be lost upon completion of operations.

You can access subtype management through the workspace manager -> context menu of a vector dataset (such as point, line, polygon, or attribute table datasets) -> Attribute Management -> Subtype button.

Create a Subtype

Creating a subtype is a fundamental operation in subtype management, used to add subtypes to a dataset for categorized data management. If a domain has already been set for a field and a subtype is subsequently created, the subtype settings will override the original domain, rendering the previous domain settings ineffective.

Using a road dataset (with the attribute structure shown below) as an example, this section explains how to create a subtype:

Figure: Road Dataset Properties Structure
  1. Click the workspace manager -> context menu of the "Road" dataset -> Attribute Management -> Subtype button to open the Subtype tab and the Subtype Editor window.
  2. Click the Subtype tab -> Manage group -> Subtype Management button (or in the Subtype Editor window, click the radio button in the first column of the table to select the "road type" field (only integer fields can be selected) as the subtype field) to open the Subtype Management dialog box.
  3. In the Subtype Management dialog box, configure the subtype information by following these steps:
    1. Select a Subtype Field: In the Subtype Field dropdown, choose the field for which you want to create a subtype, such as "road type" in this case. Non-integer fields are filtered out, and only integer fields are displayed.
    2. Set the Default Subtype: After providing codes and descriptions in the subtype list, the first subtype is used as the Default Subtype by default, such as "Highway" here.
    3. Add a Subtype: Two methods are provided for adding subtypes:
      • Manual Addition: Click the Add button, and enter the code value and corresponding description in the new row. As shown below, six subtypes are added: "Highway", "National Road", "Provincial Road", "County Road", "Township Road", and "Village Road".
        Figure: Create a New Subtype
      • Automatic Generation: Click the Automatically generated button to generate code values and corresponding descriptions based on the subtype field values. Special attention is required to ensure the generated information accurately reflects your management needs.
  4. After completing the above steps, click the OK button, and then click the Subtype tab -> Manage group -> Save button to save the subtype information to the dataset.
  5. View the effect of subtype creation:
    • Add the "Road" dataset to a map window, and a unique value thematic map will be automatically created based on the subtypes.
    • Open the attribute table of the "Road" dataset; the field values will be displayed using the subtype descriptions. A subtype icon is also displayed in the column header.
    • When viewing the dataset properties structure, an icon will appear before the "road type" field, indicating that this field is a subtype field and only the field alias supports editing.

Edit Select Fields in Subtype Management

In the Subtype Editor window, directly edit the Range and default value information of the fields managed by the subtype to ensure these settings meet the latest requirements or standards. The domain configuration for each subtype will take effect independently and override the original domain settings of the field.

For example, the default value for the "Speed Limit Info" field managed by the "Highway" subtype is "Speed Limit 120", and the Range for the "Pavement Material" field is "Pavement Material", with a default value of "Asphalt". In contrast, the "National Road" subtype only manages the "Speed Limit Info" field, with a default value of "Speed Limit 80".

Figure: Subtype Editor Window

After clicking the Subtype tab -> Manage group -> Save button to save the above content, edit the value of the "road type" field in the "Road" attribute table (double-click the cell and directly select a subtype from the dropdown menu). The values of related fields will automatically update to their "Default Values". For instance, if the "road type" field value is set to "Highway", the "Speed Limit Info" field value will automatically update to "Speed Limit 120", and the "Pavement Material" field value will automatically update to "Asphalt".

Modify a Subtype

Modifying a subtype involves further operations on a dataset that already has subtypes created, including updating subtype information and adjusting the select fields managed by the subtype. This operation ensures the dataset can be flexibly adjusted according to changing requirements, maintaining the effectiveness and accuracy of data management and analysis.

  1. Click the Subtype tab -> Manage group -> Subtype Management button to open the Subtype Management dialog box. The following content can be modified:
    • Switch the Subtype Field: In the Subtype Field dropdown menu, select another integer field as the new subtype field.
    • Modify the Default Subtype: From the Default Subtype dropdown menu, select a new default subtype value to update the current setting.
    • Add a Subtype:Use the Add button to manually enter the code value and description of a new subtype, or use the Automatically generated button to quickly create new subtypes based on existing field values.
    • Modify a Subtype: Double-click the code or description cell of the subtype record you want to modify to make it editable, then directly modify the code or description.
    • Delete a Subtype: Select the subtype record to be deleted, then click the Delete button to remove it.
      Note:

      After selecting a field in the Subtype Field dropdown, at least one subtype record must remain in the subtype list. To clear all subtype information, select Clear All Subtypes from the Subtype Field dropdown options.

  2. Click the Subtype tab -> Manage group -> Save button to save the modifications to the dataset.

Related Topics

Subtype Overview

Range