Range

Function Description

Range is used to define the value range of a field, representing all possible valid values that a field can have in a database table. For example, the normal water pressure range for a water pipe should not exceed 100 psi. If the value exceeds this range, it indicates abnormal water pressure and requires timely attention.

Function Entry

  • Workspace Manager -> Context Menu of Vector Dataset -> Attribute Management -> Range.
  • Vector Dataset Attribute Panel -> Range Item.

Operation Instructions

  1. Click Workspace Manager -> Context Menu of Vector Dataset -> Attribute Management -> Range button to open the Range item in the Dataset Attribute Panel.
  2. Click the Range column cell corresponding to the field and select domain information from the dropdown options. If no matching domain exists, choose New or click the Manage button on the toolbar to create a new domain. Specific steps are as follows:
    1. Click the Add button in the Manage Domain dialog to add a domain record. You can modify the domain name, type, domain type, and description.
      • Name: Set the name of the domain. The default value is NEW_DOMAIN.
      • Scope of Application: Displays the scope where the domain is applied. By default, it applies to all data.
      • Type: Set the data type applicable to the domain. The default option is Double. The selected type must match the type of existing fields in the data table. For example, if set to Double type, only fields of Double type in the data table can use this domain.
      • Domain Type: Provides two types: Range and Enumeration.
        • Enumeration: Lists all members in the set. After selecting this type, edit the Encode and Description information in the Domain Properties list using the Add and Delete buttons.

          For example, the "landuse" domain includes "Cropland", "Garden Land", "Forest Land", "Grassland", "Commercial Service Land", "Industrial and Mining Storage Land", "Residential Land", "Public Management and Public Service Land", "Special Land", "Transportation Land", "Water and Water Conservancy Facilities Land", and "Other Land". After selecting this domain for the "class" field, when editing the attribute table, you can directly double-click the cell and choose the corresponding land use type from the dropdown menu on the right. If the value of the "class" field is not within this domain, an error icon will be displayed in the cell.

          Figure: Creation and Usage of Enumeration Domain
        • Bounds: Represents the value range of a field, applicable only to numeric fields. After selecting this type, set the Max, Min, and Interval Type values in the Domain Properties list. The Interval Type includes:
          • Closed Interval: Represents a ≤ x ≤ b, where a is the minimum value and b is the maximum value.
          • Open Interval: Represents a < x < b, where a is the minimum value and b is the maximum value.
          • Left Open Right Close: Represents a < x ≤ b, where a is the minimum value and b is the maximum value.
          • Left Close Right Open: Represents a ≤ x < b, where a is the minimum value and b is the maximum value.

          For example, the "Height" domain has a minimum value of "30", a maximum value of "70", and an interval type of "Open Interval". After setting this domain for the "Height" field, when editing the attribute table, if the entered value is not within this range, an error icon will be displayed in the cell.

          Figure: Creation and Usage of Range Domain
      • Description: Set a description for the domain to facilitate quick understanding of its purpose.
    2. In the Domain Properties group, set enumeration or range information to restrict field values.
      • When the domain type is enumeration, set the encoding and description.
      • When the domain type is range, set the maximum, minimum values, and interval type.
  3. After completing the above steps, set the domain information for the field in the Range item of the Dataset Attribute Panel and click the Apply button on the toolbar to complete the domain settings.
  4. Using the domain in the attribute table:
    • If an enumeration-type domain is set for a field, when editing the field cell value in the attribute table, you can select an enumeration value (the domain description) from the dropdown options for assignment.
    • If a range-type domain is set for a field, when editing the field cell value in the attribute table, the entered value must be within the domain range. If it exceeds the range, an error icon will appear on the right side of the input box. When hovering the mouse over the icon, a tooltip will display: "The current value does not match the value field information. Please re-enter.".

Related Topics

Manage Subtypes